Skip to content

Commit

Permalink
Enable CI with compilation option fan out
Browse files Browse the repository at this point in the history
This switches to GitHub Actions for CI

This tests each of the #define QCBOR compilation options

Old CI was broken


* Switch to github actions for CI

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

* CI hacking...

---------

Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
  • Loading branch information
laurencelundblade and Laurence Lundblade authored Feb 22, 2024
1 parent 0f01ac6 commit 8147f81
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 20 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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_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'

- os-image: ubuntu-latest
container: ubuntu:22.04
dis-xxx: '-DQCBOR_DISABLE_UNCOMMON_TAGS'


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
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

0 comments on commit 8147f81

Please sign in to comment.