forked from PhotonVision/photon-image-modifier
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (118 loc) · 4.32 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
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
name: Build driver
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: crschardt/arm-runner-action@gpt-support
# id: install_deps
# with:
# # image_additional_mb: 1500
# # bind_mount_repository: true
# base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.2.1/ubuntu-24.04-preinstalled-server-arm64-orangepi-5.img.xz
# # commands: |
# # touch ./test
# - name: disk diagnostics
# shell: bash
# run: |
# mv ${{ steps.install_deps.outputs.image }} testimage.img
# parted --script testimage.img print free
# # - name: Compress built image
# # run: |
# # mv ${{ steps.install_deps.outputs.image }} testimage.img
# # sudo xz -T 0 -v testimage.img
# # - uses: actions/[email protected]
# # with:
# # name: testimage.img.xz
# # path: testimage.img.xz
# # if-no-files-found: error
# # retention-days: 1
# name: Build driver
# on:
# push:
# branches: [ master ]
# tags:
# - 'v*'
# pull_request:
# branches: [ master ]
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-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
- name: limelight3
script: ./install_limelight3.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-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-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
- name: snakeyes
script: ./install_snakeyes.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
- name: opi5
script: ./install_opi5.sh
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.2.1/ubuntu-24.04-preinstalled-server-arm64-orangepi-5.img.xz
- name: opi5plus
script: ./install_opi5.sh
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.1.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5-plus.img.xz
name: "Build for ${{ matrix.name }}"
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- uses: crschardt/arm-runner-action@HEAD
id: install_deps
with:
image_additional_mb: 1500
bind_mount_repository: true
base_image: ${{ matrix.base_image }}
commands: |
chmod +x ${{matrix.script}}
${{ matrix.script }}
- name: Compress built image
run: |
mv ${{ steps.install_deps.outputs.image }} photonvision_${{ matrix.name }}.img
parted --script photonvision_${{ matrix.name }}.img print free
sudo xz -T 0 -v photonvision_${{ matrix.name }}.img
- uses: actions/[email protected]
with:
name: photonvision_${{ matrix.name }}.img.xz
path: photonvision_${{ matrix.name }}.img.xz
if-no-files-found: error
retention-days: 1
# release:
# needs: [build]
# runs-on: ubuntu-22.04
# steps:
# # Download literally every single artifact
# - uses: actions/[email protected]
# - run: find
# # Push to dev release
# - uses: pyTooling/Actions/[email protected]
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# tag: 'Dev'
# rm: true
# files: |
# **/*.xz
# if: github.event_name == 'push'
# # Upload all xz archives to GH tag if tagged
# - uses: softprops/[email protected]
# with:
# files: |
# **/*.xz
# if: startsWith(github.ref, 'refs/tags/v')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}