@@ -17,40 +17,44 @@ This action works with both 32 bits (arm) and 64 bits (aarch64) images.
1717
1818Minimal usage is as follows:
1919
20- jobs:
21- build:
22- runs-on: ubuntu-latest
23- steps:
24- - uses: actions/checkout@v2
25- - uses: pguyot/arm-runner-action@v2
26- with:
27- commands: |
28- commands to run tests
20+ ``` yaml
21+ jobs :
22+ build :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v2
26+ - uses : pguyot/arm-runner-action@v2
27+ with :
28+ commands : |
29+ commands to run tests
30+ ` ` `
2931
3032Typical usage to upload an image as an artifact:
3133
32- jobs:
33- build:
34- runs-on: ubuntu-latest
35- steps:
36- - uses: actions/checkout@v2
37- - uses: pguyot/arm-runner-action@v2
38- id: build_image
39- with:
40- base_image: raspios_lite:2022-04-04
41- commands: |
42- commands to build image
43- - name: Compress the release image
44- if: github.ref == 'refs/heads/releng' || startsWith(github.ref, 'refs/tags/')
45- run: |
46- mv ${{ steps.build_image.outputs.image }} my-release-image.img
47- xz -0 -T 0 -v my-release-image.img
48- - name: Upload release image
49- uses: actions/upload-artifact@v2
50- if: github.ref == 'refs/heads/releng' || startsWith(github.ref, 'refs/tags/')
51- with:
52- name: Release image
53- path: my-release-image.img.xz
34+ ` ` ` yaml
35+ jobs :
36+ build :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : actions/checkout@v2
40+ - uses : pguyot/arm-runner-action@v2
41+ id : build_image
42+ with :
43+ base_image : raspios_lite:2022-04-04
44+ commands : |
45+ commands to build image
46+ - name : Compress the release image
47+ if : github.ref == 'refs/heads/releng' || startsWith(github.ref, 'refs/tags/')
48+ run : |
49+ mv ${{ steps.build_image.outputs.image }} my-release-image.img
50+ xz -0 -T 0 -v my-release-image.img
51+ - name : Upload release image
52+ uses : actions/upload-artifact@v2
53+ if : github.ref == 'refs/heads/releng' || startsWith(github.ref, 'refs/tags/')
54+ with :
55+ name : Release image
56+ path : my-release-image.img.xz
57+ ` ` `
5458
5559Several scenarios are actually implemented as [tests](/.github/workflows).
5660
@@ -211,6 +215,11 @@ If missing, it will be installed. See `shell_package`.
211215If defined as basename filename, it will be used as long as the shell binary
212216exists under PATH after the package is installed.
213217
218+ The option include options, e.g. :
219+ ` ` ` yaml
220+ shell: /bin/bash -eo pipefail
221+ ` ` `
222+
214223# ### `shell_package`
215224
216225The shell package to install, if different from shell. It may be handy
@@ -222,7 +231,8 @@ For example, to use `ksh93` as shell, set `shell` to `ksh93` and
222231# ### `exit_on_fail`
223232
224233Exit immediately if a command exits with a non-zero status. Default is to exit.
225- Set to ` no ` or ` false ` to disable exiting on command failure.
234+ Set to `no` or `false` to disable exiting on command failure. This only works
235+ with `sh`, `bash` and `ksh` shells.
226236
227237# ### `debug`
228238
@@ -266,36 +276,38 @@ base image should match.
266276The following matrix will build on armv6l, armv7l and aarch64 using the latest
267277RaspberryPi OS images.
268278
269- name: Test architecture matrix
270- on: [push, pull_request, workflow_dispatch]
271- jobs:
272- build:
273- runs-on: ubuntu-latest
274- strategy:
275- matrix:
276- arch: [armv6l, armv7l, aarch64]
277- include:
278- - arch: armv6l
279- cpu: arm1176
280- base_image: raspios_lite:latest
281- cpu_info: raspberrypi_zero_w
282- - arch: armv7l
283- cpu: cortex-a7
284- base_image: raspios_lite:latest
285- cpu_info: raspberrypi_3b
286- - arch: aarch64
287- cpu: cortex-a53
288- base_image: raspios_lite_arm64:latest
289- cpu_info: raspberrypi_zero2_w_arm64_w
290- steps:
291- - uses: pguyot/arm-runner-action@v2
292- with:
293- base_image: ${{ matrix.base_image }}
294- cpu: ${{ matrix.cpu }}
295- cpu_info: ${{ matrix.cpu_info }}
296- commands: |
297- test `uname -m` = ${{ matrix.arch }}
298- grep Model /proc/cpuinfo
279+ ` ` ` yaml
280+ name: Test architecture matrix
281+ on: [push, pull_request, workflow_dispatch]
282+ jobs:
283+ build:
284+ runs-on: ubuntu-latest
285+ strategy:
286+ matrix:
287+ arch: [armv6l, armv7l, aarch64]
288+ include:
289+ - arch: armv6l
290+ cpu: arm1176
291+ base_image: raspios_lite:latest
292+ cpu_info: raspberrypi_zero_w
293+ - arch: armv7l
294+ cpu: cortex-a7
295+ base_image: raspios_lite:latest
296+ cpu_info: raspberrypi_3b
297+ - arch: aarch64
298+ cpu: cortex-a53
299+ base_image: raspios_lite_arm64:latest
300+ cpu_info: raspberrypi_zero2_w_arm64_w
301+ steps:
302+ - uses: pguyot/arm-runner-action@v2
303+ with:
304+ base_image: ${{ matrix.base_image }}
305+ cpu: ${{ matrix.cpu }}
306+ cpu_info: ${{ matrix.cpu_info }}
307+ commands: |
308+ test ` uname -m` = ${{ matrix.arch }}
309+ grep Model /proc/cpuinfo
310+ ```
299311
300312Internally, the ` cpu ` value is embedded in a wrapper for ` qemu-arm-static ` and
301313` qemu-aarch64-static ` . The actual qemu invoked depends on executables within
0 commit comments