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
|
# WARNING: All jobs in this file are re-named per the manual matrix expansion
# in expand-matrix.
include:
local: test/gitlab.com/base.yml
# Build and install Charliecloud.
build@:
extends: [.base, .rules-quick]
needs: []
parallel:
matrix:
- ci_arch: [amd64]
ci_gc: [gc-yes, gc-no]
ci_distro: [almalinux, alpine, debian]
script:
- mkdir _ci
- install.bash . _ci/from-git
- mkdir _ci/src-tar
- tar -C _ci/src-tar --strip=1 -xf charliecloud-*.tar.gz
- install.bash _ci/src-tar _ci/from-tar
# Quick test to catch obvious failures quickly.
quick@:
extends: [.base, .rules-quick]
needs: ["build@$ci_arch/$ci_gc/$ci_distro"]
variables:
CH_TEST_BUILDER: ch-image
CH_TEST_PACK_FMT: squash-mount
CH_IMAGE_CACHE: enabled
parallel:
matrix:
- ci_arch: [amd64]
ci_gc: [gc-yes, gc-no]
ci_distro: [almalinux, alpine, debian]
script:
- ch-test --scope quick all
- cache.bash save --no-pack
# ch-image without cache as well as other builders are not tested as broadly.
all-lite@:
extends: [.base, .rules-standard]
needs: ["quick@$ci_arch/$ci_gc/$ci_distro"]
variables:
CH_TEST_PACK_FMT: squash-mount
CH_IMAGE_CACHE: disabled
ci_gc: gc-yes
parallel:
matrix:
- ci_arch: [amd64]
ci_distro: [almalinux, alpine, debian]
CH_TEST_BUILDER: [ch-image]
script:
- ch-test all
# Heat up the build cache for the cacheful ch-image modes.
ch-image-cache-heat@:
extends: [.base, .rules-standard]
needs: ["quick@$ci_arch/$ci_gc/$ci_distro"]
variables:
CH_TEST_BUILDER: ch-image
CH_TEST_PACK_FMT: squash-mount
CH_IMAGE_CACHE: enabled
parallel:
matrix:
- ci_arch: [amd64]
ci_gc: [gc-yes, gc-no]
ci_distro: [almalinux, alpine, debian]
script:
- cache.bash restore quick
- ch-test build-images
- cache.bash save --no-pack
# Try to get thorough coverage with cacheful ch-image.
all-ch-image@:
extends: [.base, .rules-standard]
needs: ["ch-image-cache-heat@$ci_arch/$ci_gc/$ci_distro"]
variables:
CH_TEST_BUILDER: ch-image
CH_IMAGE_CACHE: enabled
ci_sudo: sudo-yes
parallel:
matrix:
- ci_arch: [amd64]
ci_gc: [gc-yes]
ci_distro: [almalinux, alpine, debian]
ci_prefix:
- .
- _ci/from-git
- _ci/src-tar
- _ci/from-tar
CH_TEST_PACK_FMT: [squash-mount]
- ci_arch: [amd64]
ci_gc: [gc-no]
ci_distro: [almalinux, alpine, debian]
ci_prefix: [.]
CH_TEST_PACK_FMT: [squash-mount]
- ci_arch: [amd64]
ci_gc: [gc-yes]
ci_distro: [debian]
ci_prefix: [.]
CH_TEST_PACK_FMT: [squash-unpack, tar-unpack]
script:
- cache.bash restore ch-image-cache-heat
# validate config
- ch-test --is-pedantic all
- if [[ $ci_sudo = sudo-yes ]]; then ch-test --is-sudo all; fi
# run test suite
- ch-test all
- |
[[ $(cat "/tmp/ch-test.tmp.$(id -un)/rootemu") = no ]]
# done
- |
if [[ $CH_TEST_PACK_FMT = squash-mount \
&& $ci_prefix = . ]]; then
cache.bash save
fi
# nVidia GPU tests.
# Note: no ARM nVidia runners as of 2025-05-30.
# FIXME: https://gitlab.com/charliecloud/charliecloud/-/issues/2075
.gpu-nvidia:
extends: [.base, .rules-premium]
needs: ["all-ch-image@$ci_arch/$ci_gc/$ci_distro/$ci_prefix/$CH_TEST_PACK_FMT"]
image: $CI_REGISTRY_IMAGE/ci_nvidia:$CI_COMMIT_REF_NAME
tags: [saas-linux-medium-amd64-gpu-standard]
variables:
ci_arch: amd64
ci_gc: gc-yes
ci_distro: debian
ci_prefix: "."
CH_TEST_BUILDER: ch-image
CH_TEST_PACK_FMT: squash-mount
CH_IMAGE_CACHE: enabled
script:
- cache.bash restore all-ch-image
- ls -lhR /usr/local/nvidia
- cat /proc/driver/nvidia/version
- sudo ldconfig
- nvidia-smi
- nvidia-ctk --version
- ls -lh /var/tmp
- ls -lh /var/tmp/pck
- ch-image build -f examples/Dockerfile.nvidia examples
- ch-convert nvidia $CH_TEST_TARDIR/nvidia.sqfs
- mkdir $CH_TEST_IMGDIR
- ln -s $CH_TEST_TARDIR/debian_12ch.sqfs $CH_TEST_IMGDIR/debian_12ch
- ln -s $CH_TEST_TARDIR/nvidia.sqfs $CH_TEST_IMGDIR/nvidia
- ch-test --scope full -f test/run/cdi.bats
# rootemu tests are rather lengthy by themselves
# FIXME: just skip for now
#rootemu:
# extends: .test
# needs: [cacheful]
# variables:
# ci_sudo: sudo-yes
# CH_TEST_BUILDER: ch-image
# CH_TEST_PACK_FMT: squash-mount
# CH_IMAGE_CACHE: enabled
# parallel:
# matrix:
# - ci_arch: [amd64]
# script:
# - cache.bash restore cacheful
# - ch-test rootemu
# - |
# [[ $(cat "/tmp/ch-test.tmp.$(id -un)/rootemu") = yes ]]
|