fix(ci): add --threads:on to all nim c commands
Commit 6aaabb5 added std/locks usage in vector/engine.nim (HNSW thread-safety).
std/locks requires --threads:on. Local builds worked because /etc/nim/nim.cfg
had threads:on, but GitHub Actions runners (setup-nim-action) compile without
threads by default, causing the test job to fail silently at runtime.
Also updated baradadb.nimble tasks for consistency.
Fixes GitHub Actions CI failure on test / clients-ci workflows.
This commit is contained in:
@@ -24,10 +24,10 @@ jobs:
|
|||||||
run: nimble install --depsOnly -y
|
run: nimble install --depsOnly -y
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: nim c -d:ssl --path:src -r tests/test_all.nim
|
run: nim c -d:ssl --threads:on --path:src -r tests/test_all.nim
|
||||||
|
|
||||||
- name: Compile benchmarks
|
- name: Compile benchmarks
|
||||||
run: nim c -d:release benchmarks/bench_all.nim
|
run: nim c -d:release --threads:on benchmarks/bench_all.nim
|
||||||
|
|
||||||
- name: Compile stress test
|
- name: Compile stress test
|
||||||
run: nim c -d:ssl --threads:on --path:src tests/stress_test.nim
|
run: nim c -d:ssl --threads:on --path:src tests/stress_test.nim
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Check for unused declarations and imports
|
- name: Check for unused declarations and imports
|
||||||
run: |
|
run: |
|
||||||
nim c -d:ssl --path:src tests/test_all.nim 2>&1 | tee build.log || true
|
nim c -d:ssl --threads:on --path:src tests/test_all.nim 2>&1 | tee build.log || true
|
||||||
echo "--- Checking for XDeclaredButNotUsed hints ---"
|
echo "--- Checking for XDeclaredButNotUsed hints ---"
|
||||||
grep -E "XDeclaredButNotUsed|UnusedImport" build.log | while read -r line; do
|
grep -E "XDeclaredButNotUsed|UnusedImport" build.log | while read -r line; do
|
||||||
echo "::warning::$line"
|
echo "::warning::$line"
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build binaries
|
- name: Build binaries
|
||||||
run: |
|
run: |
|
||||||
nim c -d:release --opt:speed -d:ssl -o:build/baradadb src/baradadb.nim
|
nim c -d:release --opt:speed -d:ssl --threads:on -o:build/baradadb src/baradadb.nim
|
||||||
nim c -d:release -o:build/backup src/barabadb/core/backup.nim
|
nim c -d:release --threads:on -o:build/backup src/barabadb/core/backup.nim
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t baradb:latest .
|
run: docker build -t baradb:latest .
|
||||||
@@ -160,15 +160,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Nim unit tests
|
- name: Run Nim unit tests
|
||||||
working-directory: clients/nim
|
working-directory: clients/nim
|
||||||
run: nim c --path:src -r tests/test_client.nim
|
run: nim c --threads:on --path:src -r tests/test_client.nim
|
||||||
|
|
||||||
- name: Run Nim integration tests
|
- name: Run Nim integration tests
|
||||||
working-directory: clients/nim
|
working-directory: clients/nim
|
||||||
run: nim c --path:src -r tests/test_integration.nim
|
run: nim c --threads:on --path:src -r tests/test_integration.nim
|
||||||
|
|
||||||
- name: Run Nim example
|
- name: Run Nim example
|
||||||
working-directory: clients/nim
|
working-directory: clients/nim
|
||||||
run: nim c --path:src -r examples/basic.nim || true
|
run: nim c --threads:on --path:src -r examples/basic.nim || true
|
||||||
|
|
||||||
test-rust:
|
test-rust:
|
||||||
needs: build-server
|
needs: build-server
|
||||||
|
|||||||
+4
-4
@@ -15,13 +15,13 @@ requires "checksums >= 0.2.0"
|
|||||||
|
|
||||||
# Tasks
|
# Tasks
|
||||||
task build_debug, "Build debug version":
|
task build_debug, "Build debug version":
|
||||||
exec "nim c -d:ssl --debugger:native --linedir:on -o:build/baradadb src/baradadb.nim"
|
exec "nim c -d:ssl --threads:on --debugger:native --linedir:on -o:build/baradadb src/baradadb.nim"
|
||||||
|
|
||||||
task build_release, "Build release version":
|
task build_release, "Build release version":
|
||||||
exec "nim c -d:ssl -d:release --opt:speed -o:build/baradadb src/baradadb.nim"
|
exec "nim c -d:ssl --threads:on -d:release --opt:speed -o:build/baradadb src/baradadb.nim"
|
||||||
|
|
||||||
task test, "Run all tests":
|
task test, "Run all tests":
|
||||||
exec "nim c --path:src -d:ssl -r tests/test_all.nim"
|
exec "nim c --path:src -d:ssl --threads:on -r tests/test_all.nim"
|
||||||
|
|
||||||
task bench, "Run benchmarks":
|
task bench, "Run benchmarks":
|
||||||
exec "nim c --path:src -d:ssl -d:release -r benchmarks/bench_all.nim"
|
exec "nim c --path:src -d:ssl --threads:on -d:release -r benchmarks/bench_all.nim"
|
||||||
|
|||||||
Reference in New Issue
Block a user