Skip to content

Commit d9693c1

Browse files
committed
ci: check generated seccomp files match
Check that the *.seccomppolicy and *_seccomp.h files match.
1 parent 747860d commit d9693c1

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Check Generated Seccomp Files
2+
on:
3+
pull_request:
4+
5+
permissions: {}
6+
7+
jobs:
8+
check-seccomp:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 2
11+
12+
steps:
13+
- name: Checkout current commit
14+
uses: actions/checkout@v5
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup Python environment
19+
run: |
20+
python -m venv venv && venv/bin/pip install edn_format
21+
22+
- name: Check generated seccomp files
23+
run: |
24+
set -e
25+
source venv/bin/activate
26+
make seccomp-policies
27+
if [ -n "$(git status --porcelain)" ]; then
28+
echo "Generated seccomp files are out of date. Please run 'make seccomp-policies' and commit the changes."
29+
git --no-pager diff
30+
exit 1
31+
else
32+
echo "All generated seccomp files are up to date."
33+
fi

0 commit comments

Comments
 (0)