|
| 1 | +name: Proofs |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + |
| 6 | +concurrency: |
| 7 | + # Update of a developer branch cancels the previously scheduled workflow |
| 8 | + # run for this branch. However, the 'main' branch and tag workflow runs |
| 9 | + # are never canceled. |
| 10 | + # |
| 11 | + # We use a trick here: define the concurrency group as 'workflow run ID' + |
| 12 | + # 'workflow run attempt' because it is a unique combination for any run. |
| 13 | + # So it effectively discards grouping. |
| 14 | + # |
| 15 | + # Important: we cannot use `github.sha` as a unique identifier because |
| 16 | + # pushing a tag may cancel a run that works on a branch push event. |
| 17 | + group: ${{ ( |
| 18 | + github.ref == 'refs/heads/main' || |
| 19 | + startsWith(github.ref, 'refs/tags/')) && |
| 20 | + format('{0}-{1}', github.run_id, github.run_attempt) || |
| 21 | + format('{0}-{1}', github.workflow, github.ref) }} |
| 22 | + cancel-in-progress: true |
| 23 | + |
| 24 | +jobs: |
| 25 | + cbmc: |
| 26 | + if: | |
| 27 | + github.event_name == 'push' || |
| 28 | + github.event_name == 'pull_request' && |
| 29 | + github.event.pull_request.head.repo.full_name != github.repository |
| 30 | + strategy: |
| 31 | + matrix: |
| 32 | + LUA: |
| 33 | + - "lua" |
| 34 | + fail-fast: false |
| 35 | + runs-on: ubuntu-24.04 |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v4 |
| 38 | + |
| 39 | + - name: Setup common packages |
| 40 | + run: | |
| 41 | + sudo apt install -y cmake make cbmc |
| 42 | +
|
| 43 | + - name: Running CMake (PUC Rio Lua -current) |
| 44 | + run: | |
| 45 | + cmake -DCMAKE_C_COMPILER=goto-cc -DENABLE_CBMC_PROOFS=ON \ |
| 46 | + -DUSE_LUA=ON -DCMAKE_BUILD_TYPE=Debug \ |
| 47 | + -S . -B build |
| 48 | + if: ${{ matrix.LUA == 'lua' }} |
| 49 | + |
| 50 | + - name: Building |
| 51 | + run: | |
| 52 | + cmake --build build --parallel $(nproc) --target build_cbmc_proofs |
0 commit comments