-
-
Notifications
You must be signed in to change notification settings - Fork 4
276 lines (265 loc) · 6.85 KB
/
ci.yaml
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
name: CI
on:
push: {}
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
format-check:
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:x86_64
steps:
- uses: actions/checkout@v3
- name: configure
run: |
apk add --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing muon
apk add clang16-extra-tools
meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=disabled \
-Dzlib=disabled \
-Dlz4=disabled \
-Dlzma=disabled \
-Dzstd=disabled \
-Dthreads=disabled \
-Dfuse-old=disabled \
-Dtest=false \
-Ddoc=false
- name: muon fmt
run: |
if ! find . \( -name meson.build -or -name meson_options.txt \) -print0 \
| xargs -0 muon fmt -q; then
find . \( -name meson.build -or -name meson_options.txt \) -print0 \
| xargs -0 muon fmt -i;
git diff
exit 1
fi
- name: clang-format
run: |
ninja -C /tmp/build clang-format-check
test:
needs:
- format-check
strategy:
matrix:
arch:
#- i386
- x86_64
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:${{ matrix.arch }}
options: --privileged
steps:
- uses: actions/checkout@v3
- name: configure
run: |
apk add zlib-dev lz4-dev xz-dev zstd-dev
CC=gcc meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=enabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dthreads=enabled \
-Dfuse-old=enabled \
-Dtest=extended \
-Ddoc=false
- name: test
run: |
ninja -C /tmp/build test
fuzzer:
needs:
- format-check
runs-on: ubuntu-latest
container:
image: gottox/sqsh-build:x86_64
steps:
- uses: actions/checkout@v3
- name: configure
run: |
apk add zlib-dev lz4-dev xz-dev zstd-dev
CC=clang meson setup /tmp/build \
-Dwerror=true \
-Dexamples=false \
-Dcurl=enabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dthreads=enabled \
-Dtest=false \
-Dfuzzer=true \
-Ddoc=false
- name: fuzzer
run: |
ninja -C /tmp/build test
build:
needs:
- format-check
runs-on: ubuntu-latest
container: gottox/sqsh-build:${{ matrix.arch }}
strategy:
matrix:
cc:
- gcc
- clang
feature:
- enabled
- disabled
arch:
#- i386
- x86_64
steps:
- uses: actions/checkout@v3
- name: configure
run: |
meson wrap update-db
CC=${{ matrix.cc }} meson setup /tmp/build \
-Dwerror=false \
-Dexamples=true \
-Dcurl=${{ matrix.feature }} \
-Dzlib=${{ matrix.feature }} \
-Dlz4=${{ matrix.feature }} \
-Dlzma=${{ matrix.feature }} \
-Dzstd=${{ matrix.feature }} \
-Dfuse-old=${{ matrix.feature }} \
-Dtest=false \
-Ddoc=false
- name: build
run: |
ninja -C /tmp/build
build-linux32:
needs:
- format-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
sudo apt update
sudo apt install --yes meson build-essential gcc-multilib g++-multilib
- name: configure
env:
CROSS_FILE: |
[binaries]
c = 'gcc'
cpp = 'g++'
ar = 'gcc-ar'
strip = 'strip'
[built-in options]
c_args = ['-m32']
c_link_args = ['-m32']
cpp_args = ['-m32']
cpp_link_args = ['-m32']
[host_machine]
system = 'linux'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'
run: |
echo "$CROSS_FILE" > cross-file.txt
meson setup --cross-file cross-file.txt /tmp/build \
-Dwerror=false \
-Dexamples=true \
-Dtest=false \
-Ddoc=false
- name: build
run: |
ninja -C /tmp/build
build-openbsd:
needs:
- format-check
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
strategy:
matrix:
arch:
- x86_64
- arm64
steps:
- uses: actions/checkout@v3
- uses: "cross-platform-actions/[email protected]"
with:
operating_system: openbsd
architecture: ${{ matrix.arch }}
version: 7.2
run: |
sudo pkg_add git meson squashfs-tools curl lz4 xz zstd
CC=clang meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=enabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dfuse-old=enabled \
-Dfuse=disabled \
-Dtest=extended \
-Ddoc=false
# fuse needs root privileges on OpenBSD
sudo meson test -C /tmp/build -t 5
build-mac:
needs:
- format-check
runs-on: macos-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- run: |
brew install git meson squashfs lz4 xz zstd macfuse
- run: |
meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=disabled \
-Dzlib=enabled \
-Dlz4=enabled \
-Dlzma=enabled \
-Dzstd=enabled \
-Dfuse-old=enabled \
-Dfuse=disabled \
-Dtest=extended \
-Ddoc=false
- run: |
meson test -C /tmp/build -t 5
doxygen:
needs:
- build
- test
runs-on: ubuntu-latest
container: gottox/sqsh-build:latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: configure
run: |
git config --global --add safe.directory $PWD
CC=clang meson setup /tmp/build \
-Dwerror=true \
-Dexamples=true \
-Dcurl=disabled \
-Dzlib=disabled \
-Dlz4=disabled\
-Dlzma=disabled \
-Dzstd=disabled \
-Dtest=false \
-Ddoc=true
- name: generate
run: |
cd /tmp/build
meson compile doc
- name: deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref_type == 'tag' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /tmp/build/doc/html
destination_dir: doxygen