| name: CI |
| |
| on: [push, pull_request] |
| |
| # Fan out for the two compilers |
| # Fan out disabling on feature at a time -- too slow to do the full combo fan out |
| jobs: |
| main: |
| strategy: |
| fail-fast: false |
| matrix: |
| c-compiler: [gcc, clang] |
| |
| config: |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_DISABLE_NON_INTEGER_LABELS' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_DISABLE_TAGS' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DUSEFULBUF_DISABLE_ALL_FLOAT' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_DISABLE_FLOAT_HW_USE' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_DISABLE_PREFERRED_FLOAT' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_DISABLE_ENCODE_USAGE_GUARDS' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS' |
| |
| - os-image: ubuntu-latest |
| container: ubuntu:22.04 |
| dis-xxx: '-DQCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS' |
| |
| |
| name: ${{ matrix.config.dis-xxx }} • ${{ matrix.c-compiler }} • ${{ matrix.config.container }} |
| |
| runs-on: ${{ matrix.config.os-image }} |
| container: ${{ matrix.config.container }} |
| |
| steps: |
| - uses: actions/checkout@v3 |
| |
| - name: Install build tools |
| run: | |
| set -ex |
| export DEBIAN_FRONTEND=noninteractive |
| apt-get update |
| apt-get install -y build-essential cmake ${{ matrix.c-compiler }} |
| echo "CC=${{ matrix.c-compiler }}" >> $GITHUB_ENV |
| |
| |
| - name: Build QCBOR |
| run: | |
| set -ex |
| make warn CMD_LINE=${{ matrix.config.dis-xxx }} |
| |
| - name: Run tests |
| run: ./qcbortest |