Wrap CBOR #66
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
| # Targeting Azure Linux, but currently testing on Ubuntu, as ubuntu-slim doesn't | |
| # support docker-in-docker. | |
| name: Continuous Integration | |
| on: | |
| pull_request: | |
| types: | |
| - labeled | |
| - synchronize | |
| - opened | |
| - reopened | |
| workflow_dispatch: | |
| merge_group: | |
| schedule: | |
| - cron: "0 0 * * 0" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ !contains(github.ref, 'main')}} | |
| permissions: read-all | |
| jobs: | |
| ci: | |
| name: "CI" | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Install dependencies" | |
| shell: bash | |
| run: | | |
| set -ex | |
| sudo ./scripts/setup-ubuntu.sh | |
| - name: "Install Rust" | |
| shell: bash | |
| run: | | |
| set -ex | |
| ./scripts/setup-rust.sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: "Run CI checks" | |
| shell: bash | |
| run: | | |
| set -ex | |
| cargo fmt --all -- --check | |
| - name: "Run tests" | |
| shell: bash | |
| run: | | |
| set -ex | |
| cargo test --workspace | |
| - name: "Run FFI tests" | |
| shell: bash | |
| run: | | |
| set -ex | |
| ./scripts/ffi-test.sh | |
| - name: "Build OpenSSL 3.5" | |
| if: ${{ (github.event.action == 'labeled' && github.event.label.name == 'test-ossl-3.5') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'test-ossl-3.5')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} | |
| shell: bash | |
| run: | | |
| set -ex | |
| echo "Building OpenSSL..." | |
| ./scripts/setup-openssl.sh > /dev/null 2>&1 | |
| - name: "Run tests against OpenSSL 3.5" | |
| if: ${{ (github.event.action == 'labeled' && github.event.label.name == 'test-ossl-3.5') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'test-ossl-3.5')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} | |
| shell: bash | |
| env: | |
| OPENSSL_INCLUDE_DIR: ${{ github.workspace }}/openssl-3.5.5/include | |
| OPENSSL_LIB_DIR: ${{ github.workspace }}/openssl-3.5.5 | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/openssl-3.5.5 | |
| run: | | |
| set -ex | |
| cargo test --workspace --features cose-openssl/pqc,cose-openssl-ffi/pqc | |
| - name: "Run FFI tests against OpenSSL 3.5" | |
| if: ${{ (github.event.action == 'labeled' && github.event.label.name == 'test-ossl-3.5') || (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'test-ossl-3.5')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} | |
| shell: bash | |
| env: | |
| OPENSSL_INCLUDE_DIR: ${{ github.workspace }}/openssl-3.5.5/include | |
| OPENSSL_LIB_DIR: ${{ github.workspace }}/openssl-3.5.5 | |
| run: | | |
| set -ex | |
| ./scripts/ffi-test.sh --pqc |