aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorsilvanshade <[email protected]>2025-04-03 14:22:54 -0600
committerHenrik Gaßmann <[email protected]>2025-04-17 16:53:36 +0200
commit70c8fe96a9535e122f8b70777d01aab8ca18fa73 (patch)
tree1014057ef2869403c1294be565f628101d19bda1 /.github
parent0a56e1973a89ff06eae2ef069196c73dac6b3c54 (diff)
Add C++ std lib to pkg-config
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml18
1 files changed, 13 insertions, 5 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b28a5bc..296716f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -304,25 +304,33 @@ jobs:
# Currently only on x86.
pkg_config_c_tests:
- name: pkg-config C tests TBB=${{ matrix.use_tbb }} BUILD_SHARED_LIBS=${{ matrix.shared_libs }}
+ name: pkg-config C tests TBB=${{ matrix.use_tbb }} BUILD_SHARED_LIBS=${{ matrix.shared_libs }} STDLIB=${{ matrix.stdlib }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
use_tbb: ["OFF", "ON"]
shared_libs: ["OFF", "ON"]
+ stdlib: ["libc++", "libstdc++"]
steps:
- uses: actions/checkout@v4
- - run: |
+ - name: update packages
+ 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 }}"
+ ${{ matrix.stdlib != 'libc++' || 'sudo apt-get install libc++-dev libc++abi-dev' }}
+ - name: configure cmake
+ run: |
+ export CXXFLAGS=${{ matrix.stdlib == 'libc++' && '-stdlib=libc++' || '' }}
+ export CC=${{ matrix.stdlib == 'libc++' && 'clang' || 'gcc' }}
+ export CXX=${{ matrix.stdlib == 'libc++' && 'clang++' || 'g++' }}
+ 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 }}" -DCMAKE_VERBOSE_MAKEFILE=1
- 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++
+ - run: gcc -O3 -o ${{ github.workspace }}/target/bin/blake3-example c/example.c $(pkg-config --cflags --libs libblake3)
- 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++
+ run: gcc -O3 -o ${{ github.workspace }}/target/bin/blake3-example-tbb c/example_tbb.c $(pkg-config --cflags --libs libblake3)
# Note that this jobs builds AArch64 binaries from an x86_64 host.
build_apple_silicon: