Update CI workflows to use Debian packages only #694
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: libfido2 Tests | |
| on: | |
| push: | |
| branches: [ 'master', 'main', 'release/**' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_wolfprovider: | |
| uses: ./.github/workflows/build-wolfprovider.yml | |
| with: | |
| wolfssl_ref: ${{ matrix.wolfssl_ref }} | |
| openssl_ref: ${{ matrix.openssl_ref }} | |
| replace_default: ${{ matrix.replace_default }} | |
| strategy: | |
| matrix: | |
| wolfssl_ref: [ 'master', 'v5.8.0-stable' ] | |
| openssl_ref: [ 'openssl-3.5.0' ] | |
| replace_default: [ true ] | |
| test_libfido2: | |
| runs-on: ubuntu-22.04 | |
| container: | |
| image: debian:bookworm | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| needs: build_wolfprovider | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| wolfssl_ref: [ 'master', 'v5.8.0-stable' ] | |
| openssl_ref: [ 'openssl-3.5.0' ] | |
| libfido2_ref: [ 'main', '1.15.0' ] | |
| replace_default: [ true ] | |
| force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ] | |
| exclude: | |
| - libfido2_ref: 'main' | |
| force_fail: 'WOLFPROV_FORCE_FAIL=1' | |
| env: | |
| WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages | |
| OPENSSL_PACKAGES_PATH: /tmp/openssl-packages | |
| WOLFPROV_PACKAGES_PATH: /tmp/wolfprov-packages | |
| steps: | |
| - name: Checkout wolfProvider | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Checking OpenSSL/wolfProvider packages in cache | |
| uses: actions/cache/restore@v4 | |
| id: wolfprov-cache | |
| with: | |
| path: | | |
| ${{ env.WOLFSSL_PACKAGES_PATH }} | |
| ${{ env.OPENSSL_PACKAGES_PATH }} | |
| ${{ env.WOLFPROV_PACKAGES_PATH }} | |
| key: openssl-wolfprov-debian-packages-${{ github.sha }}${{ matrix.replace_default && '-replace-default' || '' }} | |
| fail-on-cache-miss: true | |
| - name: Install wolfSSL/OpenSSL/wolfprov packages | |
| run: | | |
| printf "Installing OpenSSL/wolfProvider packages:\n" | |
| ls -la ${{ env.WOLFSSL_PACKAGES_PATH }} | |
| ls -la ${{ env.OPENSSL_PACKAGES_PATH }} | |
| ls -la ${{ env.WOLFPROV_PACKAGES_PATH }} | |
| apt install --reinstall -y \ | |
| ${{ env.WOLFSSL_PACKAGES_PATH }}/libwolfssl_*.deb | |
| apt install --reinstall -y \ | |
| ${{ env.OPENSSL_PACKAGES_PATH }}/openssl_*.deb \ | |
| ${{ env.OPENSSL_PACKAGES_PATH }}/libssl3_*.deb \ | |
| ${{ env.OPENSSL_PACKAGES_PATH }}/libssl-dev_*.deb | |
| apt install --reinstall -y \ | |
| ${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb | |
| - name: Install test dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y build-essential cmake pkg-config libudev-dev \ | |
| zlib1g-dev libcbor-dev libpcsclite-dev pcscd | |
| - name: Checkout libfido2 | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Yubico/libfido2 | |
| path: libfido2_repo | |
| ref: ${{ matrix.libfido2_ref }} | |
| fetch-depth: 1 | |
| - name: Build and install libfido2 | |
| working-directory: libfido2_repo | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/libfido2-install .. | |
| make -j$(nproc) | |
| make install | |
| - name: Run libfido2 tests | |
| working-directory: libfido2_repo/build | |
| run: | | |
| export ${{ matrix.force_fail }} | |
| # Run tests, excluding regress_dev which requires hardware/fails in CI | |
| ctest --exclude-regex "regress_dev" 2>&1 | tee libfido2-test.log | |
| # Check test results directly in YAML | |
| if grep -q "100% tests passed" libfido2-test.log; then | |
| TEST_RESULT=0 | |
| else | |
| TEST_RESULT=1 | |
| fi | |
| $GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} libfido2 | |