diff options
| author | silvanshade <[email protected]> | 2025-04-03 09:54:48 -0600 |
|---|---|---|
| committer | Henrik Gaßmann <[email protected]> | 2025-04-03 21:55:37 +0200 |
| commit | bafe693a8238803e6abcdba9dce291d209eb82c7 (patch) | |
| tree | 5dcb2def73f7ea8e97e9f91f711e7bac9885f12b | |
| parent | 4aa0811d171d619a04d213fbefbe23fa392db2dc (diff) | |
Add CI tests for pkg-config
| -rw-r--r-- | .github/workflows/ci.yml | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcb7c88..b28a5bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -258,8 +258,8 @@ jobs: - run: docker run -v $(pwd):/io -w /io messense/cargo-xwin cargo xwin test --target x86_64-pc-windows-msvc --features=mmap,rayon,traits-preview,serde,zeroize # Currently only on x86. - c_tests: - name: C tests SIMD=${{ matrix.simd }} TBB=${{ matrix.use_tbb }} + cmake_c_tests: + name: CMake C tests SIMD=${{ matrix.simd }} TBB=${{ matrix.use_tbb }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -302,6 +302,28 @@ jobs: cmake --fresh -S c -B c/build -G Ninja -DBLAKE3_TESTING=ON -DBLAKE3_TESTING_CI=ON -DBLAKE3_EXAMPLES=ON "-DBLAKE3_USE_TBB=${{ matrix.use_tbb }}" cmake --build c/build --target blake3-example + # Currently only on x86. + pkg_config_c_tests: + name: pkg-config C tests TBB=${{ matrix.use_tbb }} BUILD_SHARED_LIBS=${{ matrix.shared_libs }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + use_tbb: ["OFF", "ON"] + shared_libs: ["OFF", "ON"] + steps: + - uses: actions/checkout@v4 + - run: | + sudo apt-get update + sudo apt-get install ninja-build libtbb-dev libtbb12 + - run: cmake --fresh -S c -B c/build -G Ninja -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/target "-DBLAKE3_USE_TBB=${{ matrix.use_tbb }}" "-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }}" + - run: cmake --build c/build --target install + - run: mkdir -p ${{ github.workspace }}/target/bin + - run: echo "PKG_CONFIG_PATH=${{ github.workspace }}/target/lib/pkgconfig" >> $GITHUB_ENV + - run: gcc -O3 -o ${{ github.workspace }}/target/bin/blake3-example c/example.c $(pkg-config --cflags --libs libblake3) -lstdc++ + - if: matrix.use_tbb == 'ON' + run: gcc -O3 -o ${{ github.workspace }}/target/bin/blake3-example-tbb c/example_tbb.c $(pkg-config --cflags --libs libblake3) -lstdc++ + # Note that this jobs builds AArch64 binaries from an x86_64 host. build_apple_silicon: name: build for Apple Silicon |
