-
Notifications
You must be signed in to change notification settings - Fork 2
158 lines (151 loc) · 6.55 KB
/
Copy pathci.yml
File metadata and controls
158 lines (151 loc) · 6.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Github Actions CI
permissions: {}
on:
pull_request:
branches:
- main
jobs:
freebsd13:
name: FreeBSD
runs-on: ubuntu-26.04
steps:
- uses: vmactions/freebsd-vm@7ca82f79fe3078fecded6d3a2bff094995447bbd
with:
sync: no
release: "15.0"
usesh: true
run: |
set -e
set -o pipefail
set -u
set -x
uname -rms
pkg install -y cmake git python3 devel/py-pytest vim
python3 --version
git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
cd wd
git fetch -- origin ${{ github.event.pull_request.head.sha }}
git checkout FETCH_HEAD
export CFLAGS="-Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined"
export UBSAN_OPTIONS=print_stacktrace=1
export TERM=xterm
cmake -B build -S .
cmake --build build
cmake --build build --target check
cmake --install build
linux:
name: Linux
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined
UBSAN_OPTIONS: print_stacktrace=1
steps:
- run: uname -rms
- run: python3 --version
- run: sudo apt-get update
- run: sudo apt-get install --no-install-recommends -y python3-pytest vim xxd
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD
- run: cmake -B build -S wd
- run: cmake --build build
- run: cmake --build build --target check
- run: sudo cmake --install build
linux_shared:
name: Linux, shared libraries
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined
UBSAN_OPTIONS: print_stacktrace=1
steps:
- run: uname -rms
- run: python3 --version
- run: sudo apt-get update
- run: sudo apt-get install --no-install-recommends -y python3-pytest vim xxd
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD
- run: cmake -DBUILD_SHARED_LIBS=ON -B build -S wd
- run: cmake --build build
- run: cmake --build build --target check
- run: sudo cmake --install build
linux_release:
name: Linux, release build
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined
UBSAN_OPTIONS: print_stacktrace=1
steps:
- run: uname -rms
- run: python3 --version
- run: sudo apt-get update
- run: sudo apt-get install --no-install-recommends -y python3-pytest vim xxd
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD
- run: cmake -DCMAKE_BUILD_TYPE=Release -B build -S wd
- run: cmake --build build
- run: cmake --build build --target check
- run: sudo cmake --install build
macos:
name: macOS
runs-on: macos-26-intel
env:
CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined
UBSAN_OPTIONS: print_stacktrace=1
steps:
- run: uname -rms
- run: python3 --version
- run: env PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m pip install pytest
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD
- run: cmake -B build -S wd
- run: cmake --build build
- run: cmake --build build --target check
- run: sudo cmake --install build
c_format:
name: C format
runs-on: ubuntu-26.04
steps:
- run: uname -rms
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD
- run: cd wd && git ls-files -z '**/*.c' '**/*.h' | xargs -0 -- clang-format-22 --dry-run --style=file --Werror
c_analysis:
name: C analysis
runs-on: ubuntu-26.04
steps:
- run: uname -rms
- run: python3 --version
- run: sudo apt-get update
- run: sudo apt-get install --no-install-recommends -y vim xxd
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD
- run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build -S wd
- run: cmake --build build
- run: python3 -m pip install --user codechecker
- run: CodeChecker analyze --analyzers clangsa --enable sensitive build/compile_commands.json --output reports
- run: CodeChecker parse reports
py_format:
name: Python format
runs-on: ubuntu-26.04
env:
DEBIAN_FRONTEND: noninteractive
steps:
- run: uname -rms
- run: python3 --version
- run: sudo apt-get update
- run: sudo apt-get install --no-install-recommends -y black python3-isort python3-pytest
- run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd
- run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD
- run: cd wd && git ls-files -z '**/*.py' | xargs -0 -- python3 -m black --check --
- run: cd wd && git ls-files -z '**/*.py' | xargs -0 -- python3 -m isort --profile=black --check --
- run: python3 -m pip install --user pylint
- run: cd wd && git ls-files -z '**/*.py' | xargs -0 -- python3 -m pylint --