Add tests to CI

This commit is contained in:
Arnaud 2025-12-18 10:35:59 +01:00
parent 2cdb50b8d0
commit 1fd1cc10bc
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 20 additions and 0 deletions

View File

@ -90,6 +90,19 @@ jobs:
if: matrix.tests == 'tools' || matrix.tests == 'all'
run: make -j${ncpu} testTools
## Part 5 C Binding ##
- name: C Binding build
if: matrix.tests == 'cbindingtest' || matrix.tests == 'all'
run: |
make -j${ncpu} libstorage
- name: C Binding test
if: matrix.tests == 'cbindingtest' || matrix.tests == 'all'
run: |
cd examples/c
gcc -o storage storage.c -L../../build -lstorage -Wl,-rpath,../../ -pthread
LD_LIBRARY_PATH=../../build ./storage
status:
if: always()
needs: [build]

View File

@ -72,6 +72,12 @@ tools_test () {
job
}
c_binding_test () {
job_tests="cbindingtest"
job_includes=""
job
}
# finds all files named test*.nim in the specified directory
find_tests () {
local dir=$1
@ -129,6 +135,7 @@ all_tests () {
contract_test
integration_test
tools_test
c_binding_test
}
# outputs jobs for the specified operating systems and all test types