-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (43 loc) · 1.45 KB
/
main.yml
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
name: Build driver
on:
push:
branches:
- 'master'
- 'releases/**'
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: limelight
script: ./install_limelight.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-11/2023-12-11-raspios-bookworm-arm64-lite.img.xz
- name: raspi
script: ./install_pi.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-11/2023-12-11-raspios-bookworm-arm64-lite.img.xz
name: "Build for ${{ matrix.name }}"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- uses: pguyot/arm-runner-action@HEAD
id: install_deps
with:
image_additional_mb: 1500
base_image: ${{ matrix.base_image }}
commands: ${{ matrix.script }}
- name: Compress built image
run: |
export IMAGE=photonvision_$(git describe --tags --match=v*)_${{ matrix.name }}.img
mv ${{ steps.install_deps.outputs.image }} $RUNNER_TEMP/$IMAGE
tar -cJf $RUNNER_TEMP/$IMAGE.tar.xz $RUNNER_TEMP/$IMAGE
- uses: actions/upload-artifact@master
with:
name: photon-image-${{ matrix.name }}
path: $RUNNER_TEMP/$IMAGE.tar.xz