@@ -14,23 +14,22 @@ jobs:
1414 strategy :
1515 fail-fast : false # Actions seems kind of flaky lately
1616 matrix :
17- builder : [none, docker, ch-image]
17+ builder :
18+ - ch-image
1819 pack_fmt : [squash-mount, tar-unpack, squash-unpack]
1920 keep_sudo : # if false, remove self from sudoers post-install/setup
2021 - false
21- cache : [enabled, disabled]
22- exclude :
22+ cache :
23+ - enabled
24+ include :
2325 - builder : none
24- cache : enabled
25- - builder : docker
26- cache : enabled
27- - builder : ch-image
26+ pack_fmt : squash-mount
27+ keep_sudo : false
2828 cache : disabled
29- include :
3029 - builder : docker
31- pack_fmt : squash-mount
30+ pack_fmt : tar-unpack
3231 keep_sudo : true
33- cache : disabled
32+ cache : enabled
3433 - builder : ch-image
3534 pack_fmt : squash-mount
3635 keep_sudo : false
6564 echo "PATH=$path_new" >> $GITHUB_ENV
6665 # Set sudo umask to something quite restrictive. The default is
6766 # 0022, but we had a "make install" bug (issue #947) that was
68- # tickled by 0027, which is a better setting. For reasons I don' t
69- # understand, this only affects sudo, but since that' s what we want,
67+ # tickled by 0027, which is a better setting. For reasons I don’ t
68+ # understand, this only affects sudo, but since that’ s what we want,
7069 # I left it. Note there are a few dependency installs below that
7170 # have similar permissions bugs; these relax the umask on a
7271 # case-by-case basis.
@@ -104,7 +103,7 @@ jobs:
104103
105104 - name : install/configure dependencies, all
106105 run : |
107- # configure doesn' t tell us about these.
106+ # configure doesn’ t tell us about these.
108107 sudo apt-get install attr pigz pv
109108 # configure does tell us about these.
110109 sudo apt-get install bats squashfs-tools
@@ -162,7 +161,6 @@ jobs:
162161 sudo ldconfig
163162 # Unset setuid on all fusermount3(1) on the system.
164163 sudo chmod -v u-s /usr/bin/fusermount*
165- sudo find / -name 'fusermount*' -ls
166164 ls -lh $(command -v fusermount3)
167165 [[ ! -u $(command -v fusermount3) ]]
168166
@@ -172,7 +170,7 @@ jobs:
172170 run : |
173171 sudo apt-get install -y musl-tools
174172 # At present we use argp to parse command line arguments. This is
175- # not portable; it' s a glibc extension (see #1260). Thus, install a
173+ # not portable; it’ s a glibc extension (see #1260). Thus, install a
176174 # standalone argp.
177175 cd /usr/local/src
178176 git clone --depth=1 https://github.com/ericonr/argp-standalone.git
@@ -211,7 +209,9 @@ jobs:
211209 sudo usermod --add-subgids 10000-65536 $USER
212210
213211 - name : disable bundled lark, ch-image
214- if : ${{ matrix.builder == 'ch-image' && matrix.cache == 'disabled' }}
212+ if : ${{ matrix.builder == 'ch-image'
213+ && matrix.pack_fmt == 'squash-mount'
214+ && matrix.cache == 'disabled' }}
215215 run : |
216216 set -x
217217 # no install, disable
@@ -255,7 +255,7 @@ jobs:
255255 # workflow also use glibc.
256256 if [[ $CH_TEST_PACK_FMT == tar-unpack ]]; then
257257 export CC=musl-gcc
258- # GNU ldd(1) doesn' t work on musl binaries.
258+ # GNU ldd(1) doesn’ t work on musl binaries.
259259 LDD='/lib/ld-musl-x86_64.so.1 --list'
260260 else
261261 LDD=ldd
@@ -330,23 +330,10 @@ jobs:
330330 -v ~/registry-etc:/etc/docker/registry registry:2
331331 docker ps -a
332332
333- - name : configure sudo to user root, group non-root
334- if : ${{ matrix.keep_sudo }}
335- run : |
336- sudo sed -Ei 's/=\(ALL\)/=(ALL:ALL)/g' /etc/sudoers.d/runner
337- sudo cat /etc/sudoers.d/runner
338-
339- - name : remove sudo
340- if : ${{ ! matrix.keep_sudo }}
341- run : |
342- sudo rm /etc/sudoers.d/runner
343- ! sudo echo hello
344-
345333 - name : build/install from tarball
346- if : ${{ matrix.builder == 'docker' && matrix.keep_sudo }}
347334 run : |
348335 # Create and unpack tarball. The wildcard saves us having to put the
349- # version in a variable. This assumes there isn' t already a tarball
336+ # version in a variable. This assumes there isn’ t already a tarball
350337 # or unpacked directory in $ch_prefix, which is true on the clean
351338 # VMs GitHub gives us. Note that cd fails if it gets more than one
352339 # argument, which helps, but this is probably kind of brittle.
@@ -380,29 +367,38 @@ jobs:
380367 bin/ch-run --version
381368 $ch_prefix/from-tarball/bin/ch-run --version
382369
383- - name : run test suite (Git WD, quick)
384- if : ${{ matrix.builder == 'docker' && ! matrix. keep_sudo }}
370+ - name : configure sudo to user root, group non-root
371+ if : ${{ matrix.keep_sudo }}
385372 run : |
386- bin/ch-test --scope=quick all
373+ sudo sed -Ei 's/=\(ALL\)/=(ALL:ALL)/g' /etc/sudoers.d/runner
374+ sudo cat /etc/sudoers.d/runner
375+
376+ - name : remove sudo
377+ if : ${{ ! matrix.keep_sudo }}
378+ run : |
379+ sudo rm /etc/sudoers.d/runner
380+ ! sudo echo hello
387381
388382 - name : run test suite (Git WD, standard)
389383 run : |
390384 bin/ch-test all
391385
392386 - name : run test suite (installed from Git WD, standard)
393- if : ${{ ( matrix.builder == 'docker' && ! matrix.keep_sudo )
394- || ( matrix.builder == 'ch-image '
395- && matrix.cache == 'disabled' ) }}
387+ if : ${{ matrix.builder == 'ch-image'
388+ && matrix.pack_fmt == 'squash-mount '
389+ && matrix.cache == 'enabled' }}
396390 run : |
397391 $ch_prefix/from-git/bin/ch-test all
398392
399393 - name : run test suite (installed from tarball, standard)
400- if : ${{ matrix.builder == 'docker' && matrix.keep_sudo }}
394+ if : ${{ matrix.builder == 'ch-image'
395+ && matrix.pack_fmt == 'squash-mount'
396+ && matrix.cache == 'enabled' }}
401397 run : |
402398 $ch_prefix/from-tarball/bin/ch-test all
403399
404- - name : make uninstall
405- if : ${{ matrix.builder == 'docker' && matrix. keep_sudo }}
400+ - name : uninstall from tarball
401+ if : ${{ matrix.keep_sudo }}
406402 run : |
407403 cd $ch_prefix/charliecloud-*
408404 sudo make uninstall
@@ -419,7 +415,7 @@ jobs:
419415 EOF
420416
421417 - name : rebuild with most things --disable’d
422- if : ${{ matrix.builder == 'docker' && ! matrix.keep_sudo }}
418+ if : ${{ matrix.builder == 'docker' }}
423419 run : |
424420 make distclean
425421 ./configure --prefix=/doesnotexist \
@@ -438,31 +434,29 @@ jobs:
438434 bin/ch-run --version
439435
440436 - name : run test suite (Git WD, standard)
441- if : ${{ matrix.builder == 'docker' && ! matrix.keep_sudo }}
437+ if : ${{ matrix.builder == 'docker' }}
442438 run : |
443439 bin/ch-test all
444440
445441 - name : remove non-essential dependencies
446- if : ${{ matrix.builder == 'docker' && matrix.keep_sudo && matrix.pack_fmt == 'tar-unpack' }}
442+ if : ${{ matrix.builder == 'docker' }}
447443 run : |
448444 set -x
449445 # This breaks lots of dependencies unrelated to our build but YOLO.
450446 sudo dpkg --remove --force-depends \
451447 pigz \
452448 pv \
453449 python3-requests \
454- squashfs-tools \
450+ squashfs-tools
455451 sudo pip3 uninstall -y sphinx sphinx-rtd-theme
456452 if [[ ${{ matrix.pack_fmt }} = squash-mount ]]; then
457- ( cd /usr/local/src/squashfuse && make uninstall )
453+ ( cd /usr/local/src/squashfuse && sudo make uninstall )
458454 fi
459455 ! python3 -c 'import requests'
460456 ! python3 -c 'import lark'
461- test -e bin/ch-image
462- bin/ch-test -f test/build/10_sanity.bats # issue #806
463457
464458 - name : rebuild
465- if : ${{ matrix.builder == 'docker' && matrix.keep_sudo && matrix.pack_fmt == 'tar-unpack' }}
459+ if : ${{ matrix.builder == 'docker' }}
466460 run : |
467461 make distclean
468462 ./configure --prefix=/doesnotexist
@@ -478,7 +472,7 @@ jobs:
478472 bin/ch-run --version
479473
480474 - name : run test suite (Git WD, standard)
481- if : ${{ matrix.builder == 'docker' && matrix.keep_sudo && matrix.pack_fmt == 'tar-unpack' }}
475+ if : ${{ matrix.builder == 'docker' }}
482476 run : |
483477 bin/ch-test all
484478
0 commit comments