Viewing is open to everyone. Downloading and starring need a GitHub sign-in.
Sign in with GitHub
ci.yml
v0.1.0-build.85
Latest
Commit ede38f5
Sign in with GitHub to download. Each download is recorded with your GitHub username.
| 1 | name: CKey CI |
| 2 | on: |
| 3 | push: |
| 4 | pull_request: |
| 5 | workflow_dispatch: |
| 6 | permissions: |
| 7 | contents: read |
| 8 | jobs: |
| 9 | core: |
| 10 | runs-on: ubuntu-24.04 |
| 11 | strategy: |
| 12 | fail-fast: false |
| 13 | matrix: |
| 14 | include: |
| 15 | - name: release |
| 16 | build_type: Release |
| 17 | cxx_flags: "" |
| 18 | - name: debug-sanitizers |
| 19 | build_type: Debug |
| 20 | cxx_flags: "-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all" |
| 21 | name: core (${{ matrix.name }}) |
| 22 | steps: |
| 23 | - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 |
| 24 | - name: Configure |
| 25 | run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" |
| 26 | - name: Build |
| 27 | run: cmake --build build --parallel 2 |
| 28 | - name: Test |
| 29 | run: ctest --test-dir build --output-on-failure |
| 30 | - name: Field tests are valid, current and encodable |
| 31 | if: matrix.name == 'release' |
| 32 | run: | |
| 33 | python3 tools/field_tests.py --check |
| 34 | python3 tools/field_tests.py --verify-with build/ckey |
| 35 | - name: Safe Action vectors match their independent generator |
| 36 | if: matrix.name == 'release' |
| 37 | run: node tools/safe_actions_vectors.mjs --check |
| 38 | - name: Install and consume the CMake package |
| 39 | if: matrix.name == 'release' |
| 40 | run: | |
| 41 | cmake --install build --prefix "$RUNNER_TEMP/ckey" |
| 42 | cmake -S examples/c -B "$RUNNER_TEMP/example" -DCMAKE_PREFIX_PATH="$RUNNER_TEMP/ckey" |
| 43 | cmake --build "$RUNNER_TEMP/example" |
| 44 | (cd "$RUNNER_TEMP/example" && ./render_and_scan) |
| 45 | |
| 46 | benchmarks: |
| 47 | name: optical benchmarks (synthetic, with QR/Data Matrix via zxing-cpp) |
| 48 | runs-on: ubuntu-24.04 |
| 49 | steps: |
| 50 | - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 |
| 51 | - name: Install zxing-cpp |
| 52 | run: sudo apt-get update && sudo apt-get install -y libzxing-dev |
| 53 | - name: Build |
| 54 | run: | |
| 55 | cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCKEY_BUILD_TESTS=OFF -DCKEY_BENCH_ZXING=ON |
| 56 | cmake --build build --target ckey-bench --parallel 2 |
| 57 | - name: Run |
| 58 | run: ./build/ckey-bench --quick --md benchmarks.md --json benchmarks.json |
| 59 | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
| 60 | with: |
| 61 | name: benchmarks |
| 62 | path: benchmarks.* |