From 728fbcde6b6f1105b54376d41c03ab5eae5604f1 Mon Sep 17 00:00:00 2001 From: anshuldata Date: Thu, 21 Nov 2024 03:28:57 +0530 Subject: [PATCH] build: Enable C unit tests for workflow (#128) --- .github/workflows/c_tests.yml | 29 +++++++++++++++++++++++++++++ Makefile | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/c_tests.yml diff --git a/.github/workflows/c_tests.yml b/.github/workflows/c_tests.yml new file mode 100644 index 0000000..2697fb0 --- /dev/null +++ b/.github/workflows/c_tests.yml @@ -0,0 +1,29 @@ +name: C Unit tests + +on: [push, pull_request,repository_dispatch] + +defaults: + run: + shell: bash + +jobs: + unitTests: + name: C unit tests + runs-on: macos-latest + env: + GEN: ninja + + steps: + - name: Install Ninja + run: brew install ninja + + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: true + + - name: Build Substrait with C unit test + run: make release_c_unit_test + + - name: Run C unit tests + run: ./build/release/extension/substrait/test/c/test_substrait_exe diff --git a/Makefile b/Makefile index b7b8625..15fcdf6 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,9 @@ release_js: release debug_r: debug release_r: release +release_c_unit_test: + EXT_RELEASE_FLAGS=-DSUBSTRAIT_EXTENSION_TEST_EXE=ON $(MAKE) release + %_python: export BUILD_PYTHON=1 %_python: export BUILD_FTS=1 %_python: export BUILD_VISUALIZER=1