Skip to content

Commit 618e0bf

Browse files
committed
Share llama-config.cmake path with env. variable
1 parent ccd60da commit 618e0bf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build-cmake-pkg.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,25 @@ jobs:
2525
cmake --build build --config Release
2626
cmake --install build --prefix "$PREFIX" --config Release
2727
28-
tclsh "$PREFIX"/lib/cmake/llama-config.cmake <<'EOF'
28+
export LLAMA_CONFIG="$PREFIX"/lib/cmake/llama/llama-config.cmake
29+
tclsh <<'EOF'
2930
set build(commit) [string trim [exec git rev-parse --short HEAD]]
3031
set build(number) [string trim [exec git rev-list --count HEAD]]
3132
set build(version) "0.0.$build(number)"
3233
33-
set llamaconfig [read [open [lindex $argv 0] r]]
34+
set llamaconfig [read [open "$env(LLAMA_CONFIG)" r]]
3435
set checks [list "set\\(LLAMA_VERSION \\s+$build(version)\\)" \
3536
"set\\(LLAMA_BUILD_COMMIT\\s+$build(commit)\\)" \
3637
"set\\(LLAMA_BUILD_NUMBER\\s+$build(number)\\)"]
3738
39+
puts -nonewline "Checking llama-config.cmake version... "
3840
foreach check $checks {
3941
if {![regexp -expanded -- $check $llamaconfig]} {
42+
puts "\"$check\" failed!"
4043
exit 1
4144
}
4245
}
46+
puts "success."
4347
EOF
4448
4549
cd examples/simple-cmake-pkg

0 commit comments

Comments
 (0)