forked from util-linux/util-linux
-
Notifications
You must be signed in to change notification settings - Fork 2
254 lines (245 loc) · 8.17 KB
/
cibuild.yml
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
name: Build test
on:
pull_request:
paths-ignore:
- 'Documentation/**'
- 'lib*/docs/**'
push:
branches:
- 'cibuild'
- 'master'
- 'next'
- 'stable/**'
paths-ignore:
- 'Documentation/**'
- 'lib*/docs/**'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ toJSON(matrix.env) }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
env:
# gcc-13 has false-positives with ubsan
- { COMPILER: "gcc", COMPILER_VERSION: "13", SANITIZE: "yes" }
- { COMPILER: "gcc", COMPILER_VERSION: "13", SANITIZE: "no" }
- { COMPILER: "clang", COMPILER_VERSION: "19", SANITIZE: "yes" }
- { COMPILER: "clang", COMPILER_VERSION: "19", SANITIZE: "no" }
env: ${{ matrix.env }}
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Ubuntu setup
run: sudo -E .github/workflows/cibuild-setup-ubuntu.sh
- name: Configure
run: .github/workflows/cibuild.sh CONFIGUREFAST
- name: Code checks
run: .github/workflows/cibuild.sh CODECHECK
- name: Configure & Make
run: .github/workflows/cibuild.sh MAKE
- name: Check
run: sudo -E .github/workflows/cibuild.sh CHECK
- name: Make install
run: .github/workflows/cibuild.sh INSTALL
coveralls:
permissions:
contents: read # to fetch code (actions/checkout)
checks: write # to create new checks (coverallsapp/github-action)
runs-on: ubuntu-latest
if: github.repository == 'util-linux/util-linux'
concurrency:
group: ${{ github.workflow }}-coveralls-${{ github.ref }}
cancel-in-progress: true
env:
COMPILER: gcc
COMPILER_VERSION: 13
SANITIZE: no
COVERAGE: yes
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Ubuntu setup
run: sudo -E .github/workflows/cibuild-setup-ubuntu.sh
- name: Configure & Make
run: .github/workflows/cibuild.sh CONFIGUREFAST MAKE
- name: Check
run: sudo -E .github/workflows/cibuild.sh CHECK
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.info
meson:
needs: build
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-meson-${{ github.ref }}
cancel-in-progress: true
env:
COMPILER: gcc
COMPILER_VERSION: 13
SANITIZE: no
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Ubuntu setup
run: sudo -E .github/workflows/cibuild-setup-ubuntu.sh
- name: Meson configure
run: .github/workflows/cibuild.sh MESONCONF
- name: Meson build
run: .github/workflows/cibuild.sh MESONBUILD
distcheck:
needs: build
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-distcheck-${{ github.ref }}
cancel-in-progress: true
env:
COMPILER: gcc
COMPILER_VERSION: 13
SANITIZE: no
TRANSLATE_MANPAGES: yes
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Ubuntu setup
run: sudo -E .github/workflows/cibuild-setup-ubuntu.sh
- name: Configure
run: .github/workflows/cibuild.sh CONFIGURE
- name: Make distcheck
run: .github/workflows/cibuild.sh DISTCHECK
build-compat:
strategy:
fail-fast: false
matrix:
include:
- image: ubuntu:18.04
name: build (compat, ${{ matrix.image }})
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-build-compat-${{ github.ref }}
cancel-in-progress: true
env:
COMPILER: none
container:
image: ${{ matrix.image }}
steps:
- name: Repository checkout
uses: actions/checkout@v1
- name: Ubuntu setup
run: .github/workflows/cibuild-setup-ubuntu.sh
- name: Configure
run: .github/workflows/cibuild.sh CONFIGUREFAST
- name: Code checks
run: .github/workflows/cibuild.sh CODECHECK
- name: Configure & Make
run: .github/workflows/cibuild.sh MAKE
- name: Check
run: .github/workflows/cibuild.sh CHECK
build-arch:
name: build (qemu-user, ${{ matrix.arch }})
# FIXME: using Ubuntu 24.04 on the worker causes random segfaults in s390x containers
# using qemu-user-static. Let's switch this, temporarily, to Ubuntu 22.04 which
# doesn't seem to have this issue. Note: the coverage shouldn't change, since
# the "inner" alt-arch containers still use "ubuntu-latest" (24.04 ATTOW).
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ toJSON(matrix) }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- arch: s390x
- arch: riscv64
- arch: armv7
steps:
- name: Repository checkout
uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
dockerRunArgs: --privileged -v /dev:/dev
distro: ubuntu_latest
run: |
export COMPILER=gcc
export COMPILER_VERSION=13
export SANITIZE=no
export QEMU_USER=1
# name: Ubuntu setup
.github/workflows/cibuild-setup-ubuntu.sh
git config --global --add safe.directory "$PWD"
# Configure & Make
.github/workflows/cibuild.sh CONFIGUREFAST MAKE
# Check
.github/workflows/cibuild.sh CHECK
build-openwrt:
name: build (openwrt, ${{ matrix.target }})
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ toJSON(matrix) }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- target: ipq40xx
subtarget: generic
abi: musl_eabi
- target: ath79
subtarget: generic
abi: musl
- target: bcm63xx
subtarget: generic
abi: musl
- target: mpc85xx
subtarget: p2020
abi: musl
- target: x86
subtarget: generic
abi: musl
env:
COMPILER: none
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Ubuntu setup
run: sudo -E .github/workflows/cibuild-setup-ubuntu.sh
- name: OpenWrt environment
run: |
OPENWRT_RELEASE=23.05.4
OPENWRT_SDK=openwrt-sdk-$OPENWRT_RELEASE-${{ matrix.target }}-${{ matrix.subtarget }}_gcc-12.3.0_${{ matrix.abi }}.Linux-x86_64
echo "COMPILER=$COMPILER" >> $GITHUB_ENV
echo "OPENWRT_RELEASE=$OPENWRT_RELEASE" >> $GITHUB_ENV
echo "OPENWRT_SDK=$OPENWRT_SDK" >> $GITHUB_ENV
echo "OPENWRT_TARGET=${{ matrix.target }}" >> $GITHUB_ENV
- name: Cache OpenWRT SDK
id: cache-openwrt-sdk
uses: actions/cache@v4
with:
path: ~/${{ env.OPENWRT_SDK }}
key: ${{ env.OPENWRT_SDK }}
- name: Download toolchain
if: steps.cache-openwrt-sdk.outputs.cache-hit != 'true'
run: |
curl -o ~/${{ env.OPENWRT_SDK }}.tar.xz -C - https://downloads.cdn.openwrt.org/releases/${{ env.OPENWRT_RELEASE }}/targets/${{ matrix.target }}/${{ matrix.subtarget }}/${{ env.OPENWRT_SDK }}.tar.xz
tar xf ~/${{ env.OPENWRT_SDK }}.tar.xz -C ~
- name: Configure
run: |
source .github/workflows/openwrt-sdk-env.sh ~/${{ env.OPENWRT_SDK }}
.github/workflows/cibuild.sh CONFIGUREFAST
- name: Make
run: |
source .github/workflows/openwrt-sdk-env.sh ~/${{ env.OPENWRT_SDK }}
.github/workflows/cibuild.sh MAKE
- name: Check
run: |
source .github/workflows/openwrt-sdk-env.sh ~/${{ env.OPENWRT_SDK }}
if [[ "$OPENWRT_TARGET" = "x86" ]]; then
.github/workflows/cibuild.sh CHECK
fi