Skip to content

Commit 909e6ba

Browse files
committed
ci: introduce workflow for building proofs
1 parent b448557 commit 909e6ba

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

.github/workflows/cflite_pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
types: [opened, reopened, synchronize]
1515
paths-ignore:
1616
- 'cmake/BuildLua.cmake'
17+
- 'proofs'
1718
- 'README.md'
1819
# Lua is not supported by OSS Fuzz,
1920
# https://github.com/google/oss-fuzz/issues/13782.

.github/workflows/oss-fuzz.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
types: [opened, reopened, synchronize]
99
paths:
1010
- '.github/workflows/oss-fuzz.yml'
11+
- 'proofs'
1112
# Lua is not supported by OSS Fuzz,
1213
# https://github.com/google/oss-fuzz/issues/13782.
1314
- 'tests/capi/**'

.github/workflows/proofs.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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

Comments
 (0)