9
9
branches : [ master ]
10
10
merge_group :
11
11
12
- env :
13
- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
14
-
15
12
jobs :
16
13
build-and-check-ubuntu-64bit :
17
14
18
15
env :
19
16
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
20
17
LC_ALL : C.UTF-8
21
18
22
- runs-on : ubuntu-22 .04
19
+ runs-on : ubuntu-24 .04
23
20
24
21
steps :
25
22
- uses : actions/checkout@v4
41
38
gcc-multilib \
42
39
g++-multilib \
43
40
dejagnu;
41
+ # enable unshare
42
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
44
43
# install Rust directly using rustup
45
44
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
46
45
68
67
- name : Check for new warnings
69
68
run : |
70
69
cd gccrs-build
71
- < log grep 'warning: ' | grep rust | sort > log_warnings
70
+ < log grep 'warning: ' | grep -i rust | sort > log_warnings
72
71
if diff -U0 ../.github/log_expected_warnings log_warnings; then
73
72
:
74
73
else
@@ -104,7 +103,7 @@ jobs:
104
103
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
105
104
LC_ALL : C.UTF-8
106
105
107
- runs-on : ubuntu-22 .04
106
+ runs-on : ubuntu-24 .04
108
107
109
108
steps :
110
109
- uses : actions/checkout@v4
@@ -126,6 +125,8 @@ jobs:
126
125
gcc-multilib \
127
126
g++-multilib \
128
127
dejagnu;
128
+ # enable unshare
129
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
129
130
# install Rust directly using rustup
130
131
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
131
132
@@ -148,12 +149,13 @@ jobs:
148
149
cd gccrs-build; \
149
150
# Add cargo to our path quickly
150
151
. "$HOME/.cargo/env";
151
- make -Otarget -j $(nproc) 2>&1 | tee log
152
+ # Build without network access
153
+ unshare --net --ipc -r /bin/bash -c "make -Otarget -j $(nproc) 2>&1 | tee log ; exit \${PIPESTATUS[0]}"
152
154
153
155
- name : Check for new warnings
154
156
run : |
155
157
cd gccrs-build
156
- < log grep 'warning: ' | grep rust | sort > log_warnings
158
+ < log grep 'warning: ' | grep -i rust | sort > log_warnings
157
159
if diff -U0 ../.github/glibcxx_ubuntu64b_log_expected_warnings log_warnings; then
158
160
:
159
161
else
@@ -189,7 +191,7 @@ jobs:
189
191
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
190
192
LC_ALL : C.UTF-8
191
193
192
- runs-on : ubuntu-22 .04
194
+ runs-on : ubuntu-24 .04
193
195
194
196
steps :
195
197
- uses : actions/checkout@v4
@@ -211,6 +213,8 @@ jobs:
211
213
gcc-multilib \
212
214
g++-multilib \
213
215
dejagnu;
216
+ # enable unshare
217
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
214
218
# install Rust directly using rustup
215
219
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
216
220
@@ -232,12 +236,13 @@ jobs:
232
236
cd gccrs-build; \
233
237
# Add cargo to our path quickly
234
238
. "$HOME/.cargo/env";
235
- make -Otarget -j $(nproc) 2>&1 | tee log
239
+ # Build without network access
240
+ unshare --net --ipc -r /bin/bash -c "make -Otarget -j $(nproc) 2>&1 | tee log ; exit \${PIPESTATUS[0]}"
236
241
237
242
- name : Check for new warnings
238
243
run : |
239
244
cd gccrs-build
240
- < log grep 'warning: ' | grep rust | sort > log_warnings
245
+ < log grep 'warning: ' | grep -i rust | sort > log_warnings
241
246
if diff -U0 ../.github/log_expected_warnings log_warnings; then
242
247
:
243
248
else
@@ -294,6 +299,8 @@ jobs:
294
299
libmpc-dev \
295
300
build-essential \
296
301
dejagnu;
302
+ # enable unshare
303
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
297
304
# install Rust directly using rustup
298
305
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
299
306
@@ -341,8 +348,8 @@ jobs:
341
348
run : |
342
349
# Add cargo to our path quickly
343
350
. "$HOME/.cargo/env";
344
- PATH=$HOME/gcc-5.4.0/bin:$PATH \
345
- make -C gccrs-build -j $(nproc)
351
+ # Build without network access
352
+ PATH="$HOME/gcc-5.4.0/bin:$PATH" unshare --net --ipc -r /bin/bash -c " make -C gccrs-build -j $(nproc) ; exit \${PIPESTATUS[0]}"
346
353
347
354
- name : Run Tests
348
355
run : |
@@ -435,7 +442,7 @@ jobs:
435
442
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
436
443
LC_ALL : C.UTF-8
437
444
438
- runs-on : ubuntu-22 .04
445
+ runs-on : ubuntu-24 .04
439
446
440
447
steps :
441
448
- uses : actions/checkout@v4
@@ -457,6 +464,8 @@ jobs:
457
464
gcc-multilib \
458
465
g++-multilib \
459
466
dejagnu;
467
+ # enable unshare
468
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
460
469
# install Rust directly using rustup
461
470
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
462
471
@@ -479,19 +488,8 @@ jobs:
479
488
cd gccrs-build; \
480
489
# Add cargo to our path quickly
481
490
. "$HOME/.cargo/env";
482
- make -Otarget -j $(nproc) 2>&1 | tee log
483
-
484
- # Skip warnings check
485
- # - name: Check for new warnings
486
- # run: |
487
- # cd gccrs-build
488
- # < log grep 'warning: ' | sort > log_warnings
489
- # if diff -U0 ../.github/log_expected_warnings log_warnings; then
490
- # :
491
- # else
492
- # echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.'
493
- # exit 1
494
- # fi >&2
491
+ # Build without network access
492
+ unshare --net --ipc -r /bin/bash -c "make -Otarget -j $(nproc) 2>&1 | tee log ; exit \${PIPESTATUS[0]}"
495
493
496
494
- name : Run Tests
497
495
run : |
0 commit comments