@@ -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,29 +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 : dbhi/qus/action@main
81+ uses : docker/setup-qemu-action@v4
82+ with :
83+ image : tonistiigi/binfmt:latest
84+ - name : Set coredump pattern
85+ run : |
86+ echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
8287 - name : run tests
83- 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
84107 with :
85- image : ghcr.io/mwilck/multipath-run-debian-${{ matrix.os }}
86- guest-dir : /__w/multipath-tools/multipath-tools
87- host-dir : ${{ github.workspace }}
88- command : -C tests
89- params : >
90- --workdir /__w/multipath-tools/multipath-tools
91- --platform linux/${{ env.CONTAINER_ARCH }}
92- 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'
93115
94116 root-test :
95117 runs-on : ubuntu-24.04
@@ -111,35 +133,51 @@ jobs:
111133 run : sudo modprobe brd rd_nr=1 rd_size=65536
112134 - name : set container arch
113135 run : echo CONTAINER_ARCH="${{ matrix.arch }}" >> $GITHUB_ENV
114- if : ${{ matrix.arch != 'armhf' }}
136+ if : matrix.arch != 'armhf'
115137 - name : set container arch
116138 run : echo CONTAINER_ARCH="arm/v7" >> $GITHUB_ENV
117- if : ${{ matrix.arch == 'armhf' }}
139+ if : matrix.arch == 'armhf'
118140 - name : download binary archive
119- uses : actions/download-artifact@v4
141+ uses : actions/download-artifact@v8
120142 with :
121143 name : cross-${{ matrix.os }}-${{ matrix.arch }}
122144 - name : unpack binary archive
123145 run : tar xfv test-progs.tar
124146 - name : enable foreign arch
125- uses : dbhi/qus/action@main
126- - name : run tests
127- uses : mosteo-actions/docker-run@v1
147+ uses : docker/setup-qemu-action@v4
128148 with :
129- image : ghcr.io/mwilck/multipath-run-debian-${{ matrix.os }}
130- guest-dir : /__w/multipath-tools/multipath-tools
131- host-dir : ${{ github.workspace }}
132- command : -C tests dmevents.out
133- params : >
134- --workdir /__w/multipath-tools/multipath-tools
135- --platform linux/${{ env.CONTAINER_ARCH }}
136- --privileged
137- -v /dev/ram0:/dev/ram0 -e DIO_TEST_DEV=/dev/ram0
138- pull-params : " --platform linux/${{ env.CONTAINER_ARCH }}"
149+ image : tonistiigi/binfmt:latest
150+ - name : Set coredump pattern
151+ run : |
152+ echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
153+ - name : run tests
139154 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
140166 continue-on-error : true
141- - name : show root test output
142- run : for o in tests/*.out; do echo "===== $o ====="; cat "$o"; done
143- - 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
144182 run : /bin/false
145- if : ${{ steps.root-test.outcome == 'failure' }}
183+ if : steps.root-test.outcome != 'success'
0 commit comments