4545 ch_prefix : /var/tmp
4646
4747 steps :
48- - uses : actions/checkout@v2
48+ - uses : actions/checkout@v3
4949
5050 - name : early setup & validation
5151 run : |
@@ -150,10 +150,11 @@ jobs:
150150 run : |
151151 set -x
152152 sudo apt-get install -y libfuse3-dev
153- # Currently we need the master branch of SquashFUSE.
154153 cd /usr/local/src
155154 git clone https://github.com/vasi/squashfuse.git
156155 cd squashfuse
156+ # Check out the latest release.
157+ git checkout $(git tag -l '[0-9].*' | sort -V | tail -1)
157158 ./autogen.sh
158159 ./configure --prefix=/usr/local
159160 make
@@ -186,28 +187,6 @@ jobs:
186187 /usr/include/x86_64-linux-musl/
187188 sudo ln -s x86_64-linux-gnu/asm /usr/include/x86_64-linux-musl/
188189
189- - name : install/configure dependencies, all Buildah
190- if : ${{ startsWith(matrix.builder, 'buildah') }}
191- run : |
192- command -v buildah
193- buildah --version
194- command -v runc
195- runc --version
196- # As of 2020-11-30, stock registries.conf is pretty simple; it
197- # includes Docker Hub (docker.io) and then quay.io. Still, use ours
198- # for stability.
199- cat /etc/containers/registries.conf
200- cat <<'EOF' | sudo tee /etc/containers/registries.conf
201- [registries.search]
202- registries = ['docker.io']
203- EOF
204-
205- - name : install/configure dependencies, privileged Buildah
206- if : ${{ startsWith(matrix.builder, 'buildah-') }}
207- run : |
208- sudo usermod --add-subuids 10000-65536 $USER
209- sudo usermod --add-subgids 10000-65536 $USER
210-
211190 - name : disable bundled lark, ch-image
212191 if : ${{ matrix.builder == 'ch-image'
213192 && matrix.pack_fmt == 'squash-mount'
@@ -231,7 +210,7 @@ jobs:
231210 test -f ./lib/lark/lark.py
232211 make $ch_makej
233212 sudo make $ch_makej install
234- [[ $(bin/ch-image -v --dependencies) = 'lark path: /home/runner/work/charliecloud/charliecloud/lib/charliecloud/ lark/__init__.py' ]]
213+ [[ $(bin/ch-image -v --dependencies) = 'lark path: /home/runner/work/charliecloud/charliecloud/lib/lark/__init__.py' ]]
235214 [[ $($ch_prefix/from-git/bin/ch-image -v --dependencies) = 'lark path: /usr/local/lib/python3.10/dist-packages/lark/__init__.py' ]]
236215 make clean
237216 # no install, enable: build fails, untested
@@ -260,11 +239,18 @@ jobs:
260239 else
261240 LDD=ldd
262241 fi
263- ./configure --prefix=$ch_prefix/from-git
242+ # Go wild with install directories to make sure it works (see #683).
243+ # We do have a normal install below.
244+ ./configure --prefix=$ch_prefix/from-git \
245+ --datarootdir=$ch_prefix/from-git_dataroot \
246+ --libexecdir=$ch_prefix/from-git_libexec \
247+ --libdir=$ch_prefix/from-git_lib \
248+ --mandir=$ch_prefix/from-git_man \
249+ --docdir=$ch_prefix/from-git_doc \
250+ --htmldir=$ch_prefix/from-git_html
264251 set -x
265252 fgrep 'documentation: yes' config.log
266- [[ $CH_TEST_BUILDER = buildah* ]] && fgrep 'with Buildah: yes' config.log
267- [[ $CH_TEST_BUILDER = docker ]] && fgrep 'with Docker: yes' config.log
253+ [[ $CH_TEST_BUILDER = docker ]] && command -v docker
268254 if [[ $CH_TEST_BUILDER = ch-image ]]; then
269255 fgrep 'with ch-image(1): yes' config.log
270256 fgrep '"lark" module ... bundled' config.log
@@ -296,9 +282,9 @@ jobs:
296282 run : |
297283 set -x
298284 [[ $(bin/ch-image gestalt python-path) = /usr/bin/python3 ]]
299- [[ $(bin/ch-image -v --dependencies) = "lark path: /home/runner/work/charliecloud/charliecloud/lib/charliecloud/ lark/__init__.py" ]]
285+ [[ $(bin/ch-image -v --dependencies) = "lark path: /home/runner/work/charliecloud/charliecloud/lib/lark/__init__.py" ]]
300286 [[ $($ch_prefix/from-git/bin/ch-image gestalt python-path) = /usr/bin/python3 ]]
301- [[ $($ch_prefix/from-git/bin/ch-image -v --dependencies) = "lark path: /var/tmp/from-git/lib /charliecloud/lark/__init__.py" ]]
287+ [[ $($ch_prefix/from-git/bin/ch-image -v --dependencies) = "lark path: /var/tmp/from-git_lib /charliecloud/lark/__init__.py" ]]
302288
303289 - name : late setup & validation, all
304290 run : |
@@ -341,15 +327,15 @@ jobs:
341327 mv charliecloud-*.tar.gz $ch_prefix
342328 cd $ch_prefix
343329 tar xf charliecloud-*.tar.gz
344- rm charliecloud-*.tar.gz # else cd fails with " too many arguments"
330+ rm charliecloud-*.tar.gz # else cd fails with “ too many arguments”
345331 cd charliecloud-*
346332 pwd
347333 # Configure and verify output.
348334 ./configure --prefix=$ch_prefix/from-tarball
349335 set -x
350336 fgrep 'documentation: yes' config.log
351- [[ $CH_TEST_BUILDER = buildah* ]] && fgrep 'with Buildah: yes' config.log
352- [[ $CH_TEST_BUILDER = docker ]] && fgrep 'with Docker: yes' config.log
337+ [[ $CH_TEST_BUILDER = buildah* ]] && command -v buildah
338+ [[ $CH_TEST_BUILDER = docker ]] && command -v docker
353339 [[ $CH_TEST_BUILDER = ch-image ]] && fgrep 'with ch-image(1): yes' config.log
354340 fgrep 'recommended tests, tar-unpack mode: yes' config.log
355341 fgrep 'recommended tests, squash-unpack mode: yes' config.log
@@ -382,20 +368,39 @@ jobs:
382368 - name : run test suite (Git WD, standard)
383369 run : |
384370 bin/ch-test all
371+ # Validate that “rootemu” test phase didn’t run (skipped by default
372+ # on standard scope).
373+ [[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
374+
375+ - name : run root emulation phase
376+ if : ${{ matrix.builder == 'ch-image'
377+ && matrix.pack_fmt == 'squash-mount'
378+ && matrix.cache == 'enabled' }}
379+ run : |
380+ # We only really need to run the root emulation tests once in CI.
381+ # ch-image with an enabled cache is required for these unit tests.
382+ # Since all CI tests that use ch-image with an enabled cache take
383+ # roughly the same amount of time, we arbitrarily chose squash-mount
384+ # as the pack format.
385+ bin/ch-test rootemu
386+ # Validate that “rootemu” test phase ran.
387+ [[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = yes ]]
385388
386389 - name : run test suite (installed from Git WD, standard)
387390 if : ${{ matrix.builder == 'ch-image'
388391 && matrix.pack_fmt == 'squash-mount'
389392 && matrix.cache == 'enabled' }}
390393 run : |
391394 $ch_prefix/from-git/bin/ch-test all
395+ [[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
392396
393397 - name : run test suite (installed from tarball, standard)
394398 if : ${{ matrix.builder == 'ch-image'
395399 && matrix.pack_fmt == 'squash-mount'
396400 && matrix.cache == 'enabled' }}
397401 run : |
398402 $ch_prefix/from-tarball/bin/ch-test all
403+ [[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
399404
400405 - name : uninstall from tarball
401406 if : ${{ matrix.keep_sudo }}
@@ -424,9 +429,10 @@ jobs:
424429 fgrep 'HTML documentation ... no' config.log
425430 fgrep 'man pages ... no' config.log
426431 fgrep 'ch-image(1) ... no' config.log
427- fgrep 'with Docker: yes' config.log
428432 fgrep 'with ch-image(1): no' config.log
429- fgrep 'basic tests, all stages: yes' config.log
433+ # This CI test requires Docker, but the “configure” script doesn’t
434+ # check for Docker, so we do it ourselves with “command -v”.
435+ command -v docker
430436 fgrep 'more complete tests: no' config.log
431437 set +x
432438 # Build.
@@ -437,6 +443,7 @@ jobs:
437443 if : ${{ matrix.builder == 'docker' }}
438444 run : |
439445 bin/ch-test all
446+ [[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
440447
441448 - name : remove non-essential dependencies
442449 if : ${{ matrix.builder == 'docker' }}
@@ -462,8 +469,7 @@ jobs:
462469 ./configure --prefix=/doesnotexist
463470 set -x
464471 fgrep 'documentation: no' config.log
465- fgrep 'with Docker: yes' config.log
466- fgrep 'basic tests, all stages: yes' config.log
472+ command -v docker
467473 fgrep 'more complete tests: no' config.log
468474 fgrep 'recommended tests, squash-mount mode: no' config.log
469475 set +x
@@ -475,6 +481,7 @@ jobs:
475481 if : ${{ matrix.builder == 'docker' }}
476482 run : |
477483 bin/ch-test all
484+ [[ $(cat /tmp/ch-test.tmp.$USER/rootemu) = no ]]
478485
479486 - name : print ending environment
480487 if : ${{ always() }}
0 commit comments