99 branches : [ master ]
1010 merge_group :
1111
12- env :
13- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
14-
1512jobs :
1613 build-and-check-ubuntu-64bit :
1714
1815 env :
1916 # Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
2017 LC_ALL : C.UTF-8
2118
22- runs-on : ubuntu-22 .04
19+ runs-on : ubuntu-24 .04
2320
2421 steps :
2522 - uses : actions/checkout@v4
4138 gcc-multilib \
4239 g++-multilib \
4340 dejagnu;
41+ # enable unshare
42+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
4443 # install Rust directly using rustup
4544 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
4645
6867 - name : Check for new warnings
6968 run : |
7069 cd gccrs-build
71- < log grep 'warning: ' | grep rust | sort > log_warnings
70+ < log grep 'warning: ' | grep -i rust | sort > log_warnings
7271 if diff -U0 ../.github/log_expected_warnings log_warnings; then
7372 :
7473 else
@@ -104,7 +103,7 @@ jobs:
104103 # Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
105104 LC_ALL : C.UTF-8
106105
107- runs-on : ubuntu-22 .04
106+ runs-on : ubuntu-24 .04
108107
109108 steps :
110109 - uses : actions/checkout@v4
@@ -126,6 +125,8 @@ jobs:
126125 gcc-multilib \
127126 g++-multilib \
128127 dejagnu;
128+ # enable unshare
129+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
129130 # install Rust directly using rustup
130131 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
131132
@@ -148,12 +149,13 @@ jobs:
148149 cd gccrs-build; \
149150 # Add cargo to our path quickly
150151 . "$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]}"
152154
153155 - name : Check for new warnings
154156 run : |
155157 cd gccrs-build
156- < log grep 'warning: ' | grep rust | sort > log_warnings
158+ < log grep 'warning: ' | grep -i rust | sort > log_warnings
157159 if diff -U0 ../.github/glibcxx_ubuntu64b_log_expected_warnings log_warnings; then
158160 :
159161 else
@@ -189,7 +191,7 @@ jobs:
189191 # Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
190192 LC_ALL : C.UTF-8
191193
192- runs-on : ubuntu-22 .04
194+ runs-on : ubuntu-24 .04
193195
194196 steps :
195197 - uses : actions/checkout@v4
@@ -211,6 +213,8 @@ jobs:
211213 gcc-multilib \
212214 g++-multilib \
213215 dejagnu;
216+ # enable unshare
217+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
214218 # install Rust directly using rustup
215219 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
216220
@@ -232,12 +236,13 @@ jobs:
232236 cd gccrs-build; \
233237 # Add cargo to our path quickly
234238 . "$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]}"
236241
237242 - name : Check for new warnings
238243 run : |
239244 cd gccrs-build
240- < log grep 'warning: ' | grep rust | sort > log_warnings
245+ < log grep 'warning: ' | grep -i rust | sort > log_warnings
241246 if diff -U0 ../.github/log_expected_warnings log_warnings; then
242247 :
243248 else
@@ -294,6 +299,8 @@ jobs:
294299 libmpc-dev \
295300 build-essential \
296301 dejagnu;
302+ # enable unshare
303+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
297304 # install Rust directly using rustup
298305 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
299306
@@ -341,8 +348,8 @@ jobs:
341348 run : |
342349 # Add cargo to our path quickly
343350 . "$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]}"
346353
347354 - name : Run Tests
348355 run : |
@@ -435,7 +442,7 @@ jobs:
435442 # Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
436443 LC_ALL : C.UTF-8
437444
438- runs-on : ubuntu-22 .04
445+ runs-on : ubuntu-24 .04
439446
440447 steps :
441448 - uses : actions/checkout@v4
@@ -457,6 +464,8 @@ jobs:
457464 gcc-multilib \
458465 g++-multilib \
459466 dejagnu;
467+ # enable unshare
468+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
460469 # install Rust directly using rustup
461470 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
462471
@@ -479,19 +488,8 @@ jobs:
479488 cd gccrs-build; \
480489 # Add cargo to our path quickly
481490 . "$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]}"
495493
496494 - name : Run Tests
497495 run : |
0 commit comments