handle edge cases and CI builds #149
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ubuntu | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| runs-on: [ubuntu-latest] | |
| shared: [ON, OFF] | |
| cxx: [g++-14] | |
| runs-on: ${{matrix.runs-on}} | |
| steps: | |
| - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
| - name: ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: ${{github.job}}-${{matrix.os}}-{{matrix.shared}} | |
| - name: Setup Ninja | |
| run: sudo apt-get install ninja-build | |
| - name: Prepare | |
| run: cmake -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build | |
| env: | |
| CXX: ${{matrix.cxx}} | |
| - name: Build | |
| run: cmake --build build -j=4 | |
| - name: Test | |
| run: ctest --output-on-failure --test-dir build | |
| # Test with OpenSSL 3.2+ to cover Argon2 code path | |
| openssl: | |
| runs-on: ubuntu-25.04 | |
| steps: | |
| - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
| - name: ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: ${{github.job}}-openssl | |
| - name: Setup dependencies | |
| run: sudo apt-get update && sudo apt-get install -y ninja-build libssl-dev libgtest-dev | |
| - name: Prepare | |
| run: cmake -DNCRYPTO_SHARED_LIBS=ON -G Ninja -B build | |
| - name: Build | |
| run: cmake --build build -j=4 | |
| - name: Test | |
| run: ctest --output-on-failure --test-dir build | |
| # Test with OPENSSL_NO_ARGON2 defined (Argon2 tests excluded) | |
| openssl-no-argon2: | |
| runs-on: ubuntu-25.04 | |
| steps: | |
| - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
| - name: ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: ${{github.job}}-openssl-no-argon2 | |
| - name: Setup dependencies | |
| run: sudo apt-get update && sudo apt-get install -y ninja-build libssl-dev libgtest-dev | |
| - name: Prepare | |
| run: cmake -DNCRYPTO_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="-DOPENSSL_NO_ARGON2" -G Ninja -B build | |
| - name: Build | |
| run: cmake --build build -j=4 | |
| - name: Test | |
| run: ctest --output-on-failure --test-dir build |