From 1fd1cc10bcd968ce64f852f633721397a9b07fa1 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Thu, 18 Dec 2025 10:35:59 +0100 Subject: [PATCH] Add tests to CI --- .github/workflows/ci-reusable.yml | 13 +++++++++++++ tools/scripts/ci-job-matrix.sh | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/ci-reusable.yml b/.github/workflows/ci-reusable.yml index b6131b18..e1a6b61e 100644 --- a/.github/workflows/ci-reusable.yml +++ b/.github/workflows/ci-reusable.yml @@ -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] diff --git a/tools/scripts/ci-job-matrix.sh b/tools/scripts/ci-job-matrix.sh index 15dfa9fb..835cb025 100755 --- a/tools/scripts/ci-job-matrix.sh +++ b/tools/scripts/ci-job-matrix.sh @@ -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