@@ -41,11 +41,11 @@ jobs:
4141 container : ghcr.io/mwilck/multipath-cross-debian_cross-${{ matrix.os }}-${{ matrix.arch }}
4242 steps :
4343 - name : checkout
44- uses : actions/checkout@v4
44+ uses : actions/checkout@v7
4545 - name : build
4646 run : make -j$(nproc) -Orecurse test-progs.tar
4747 - name : upload binary archive
48- uses : actions/upload-artifact@v4
48+ uses : actions/upload-artifact@v7
4949 with :
5050 name : cross-${{ matrix.os }}-${{ matrix.arch }}
5151 path : test-progs.tar
@@ -67,31 +67,51 @@ jobs:
6767 steps :
6868 - name : set container arch
6969 run : echo CONTAINER_ARCH="${{ matrix.arch }}" >> $GITHUB_ENV
70- if : ${{ matrix.arch != 'armhf' }}
70+ if : matrix.arch != 'armhf'
7171 - name : set container arch
7272 run : echo CONTAINER_ARCH="arm/v7" >> $GITHUB_ENV
73- if : ${{ matrix.arch == 'armhf' }}
73+ if : matrix.arch == 'armhf'
7474 - name : download binary archive
75- uses : actions/download-artifact@v4
75+ uses : actions/download-artifact@v8
7676 with :
7777 name : cross-${{ matrix.os }}-${{ matrix.arch }}
7878 - name : unpack binary archive
7979 run : tar xfv test-progs.tar
8080 - name : enable foreign arch
81- uses : docker/setup-qemu-action@v2
81+ uses : docker/setup-qemu-action@v4
8282 with :
8383 image : tonistiigi/binfmt:latest
84+ - name : Set coredump pattern
85+ run : |
86+ echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
8487 - name : run tests
85- uses : mosteo-actions/docker-run@v1
88+ id : test
89+ run : |
90+ docker run \
91+ --pids-limit 4096 \
92+ --workdir /__w/multipath-tools/multipath-tools \
93+ --platform linux/${{ env.CONTAINER_ARCH }} \
94+ -w /__w/multipath-tools/multipath-tools \
95+ -v${{ github.workspace }}:/__w/multipath-tools/multipath-tools \
96+ ghcr.io/mwilck/multipath-run-debian-${{ matrix.os }} -C tests
97+ continue-on-error : true
98+ - name : Make core dumps accessible
99+ run : |
100+ find . \( -name 'core*' \) -print0 | xargs -0 -r sudo chmod a+x
101+ if : steps.test.outcome != 'success'
102+ - name : save test outputs
103+ run : make test-outputs.tar
104+ if : steps.test.outcome != 'success'
105+ - name : upload test outputs
106+ uses : actions/upload-artifact@v7
86107 with :
87- image : ghcr.io/mwilck/multipath-run-debian-${{ matrix.os }}
88- guest-dir : /__w/multipath-tools/multipath-tools
89- host-dir : ${{ github.workspace }}
90- command : -C tests
91- params : >
92- --workdir /__w/multipath-tools/multipath-tools
93- --platform linux/${{ env.CONTAINER_ARCH }}
94- pull-params : " --platform linux/${{ env.CONTAINER_ARCH }}"
108+ name : test-${{ matrix.os }}-${{ matrix.arch }}
109+ path : test-outputs.tar
110+ overwrite : true
111+ if : steps.test.outcome != 'success'
112+ - name : fail if test failed
113+ run : /bin/false
114+ if : steps.test.outcome != 'success'
95115
96116 root-test :
97117 runs-on : ubuntu-24.04
@@ -113,37 +133,51 @@ jobs:
113133 run : sudo modprobe brd rd_nr=1 rd_size=65536
114134 - name : set container arch
115135 run : echo CONTAINER_ARCH="${{ matrix.arch }}" >> $GITHUB_ENV
116- if : ${{ matrix.arch != 'armhf' }}
136+ if : matrix.arch != 'armhf'
117137 - name : set container arch
118138 run : echo CONTAINER_ARCH="arm/v7" >> $GITHUB_ENV
119- if : ${{ matrix.arch == 'armhf' }}
139+ if : matrix.arch == 'armhf'
120140 - name : download binary archive
121- uses : actions/download-artifact@v4
141+ uses : actions/download-artifact@v8
122142 with :
123143 name : cross-${{ matrix.os }}-${{ matrix.arch }}
124144 - name : unpack binary archive
125145 run : tar xfv test-progs.tar
126146 - name : enable foreign arch
127- uses : docker/setup-qemu-action@v2
147+ uses : docker/setup-qemu-action@v4
128148 with :
129149 image : tonistiigi/binfmt:latest
150+ - name : Set coredump pattern
151+ run : |
152+ echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
130153 - name : run tests
131- uses : mosteo-actions/docker-run@v1
132- with :
133- image : ghcr.io/mwilck/multipath-run-debian-${{ matrix.os }}
134- guest-dir : /__w/multipath-tools/multipath-tools
135- host-dir : ${{ github.workspace }}
136- command : -C tests dmevents.out
137- params : >
138- --workdir /__w/multipath-tools/multipath-tools
139- --platform linux/${{ env.CONTAINER_ARCH }}
140- --privileged
141- -v /dev/ram0:/dev/ram0 -e DIO_TEST_DEV=/dev/ram0
142- pull-params : " --platform linux/${{ env.CONTAINER_ARCH }}"
143154 id : root-test
155+ run : |
156+ docker run \
157+ --workdir /__w/multipath-tools/multipath-tools \
158+ --pids-limit 4096 \
159+ --platform linux/${{ env.CONTAINER_ARCH }} \
160+ --privileged \
161+ -v /dev/ram0:/dev/ram0 -e DIO_TEST_DEV=/dev/ram0 \
162+ -w /__w/multipath-tools/multipath-tools \
163+ -v${{ github.workspace }}:/__w/multipath-tools/multipath-tools \
164+ ghcr.io/mwilck/multipath-run-debian-${{ matrix.os }} \
165+ -C tests dmevents.out
144166 continue-on-error : true
145- - name : show root test output
146- run : for o in tests/*.out; do echo "===== $o ====="; cat "$o"; done
147- - name : fail
167+ - name : Make core dumps accessible
168+ run : |
169+ find . \( -name 'core*' \) -print0 | xargs -0 -r sudo chmod a+x
170+ if : steps.root-test.outcome != 'success'
171+ - name : save test outputs
172+ run : make test-outputs.tar
173+ if : steps.root-test.outcome != 'success'
174+ - name : upload test outputs
175+ uses : actions/upload-artifact@v7
176+ with :
177+ name : root-test-${{ matrix.os }}-${{ matrix.arch }}
178+ path : test-outputs.tar
179+ overwrite : true
180+ if : steps.root-test.outcome != 'success'
181+ - name : fail if root test failed
148182 run : /bin/false
149- if : ${{ steps.root-test.outcome == 'failure' }}
183+ if : steps.root-test.outcome != 'success'
0 commit comments