-
Notifications
You must be signed in to change notification settings - Fork 15
147 lines (135 loc) · 4.39 KB
/
devel.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
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Rhino Linux Image Generation (Meta)
on:
workflow_dispatch
jobs:
build:
strategy:
matrix:
include:
- target: amd64
runs-on: buildjet-4vcpu-ubuntu-2204
type: iso
id: build_amd64
- target: arm64
runs-on: buildjet-4vcpu-ubuntu-2204-arm
type: iso
id: build_arm64
- target: pine
runs-on: buildjet-4vcpu-ubuntu-2204-arm
type: tarball
ref: pinephone
id: build_pine_tarball
- target: rpi
runs-on: buildjet-4vcpu-ubuntu-2204-arm
type: tarball
ref: rpi
id: build_rpi_tarball
- target: tab
runs-on: buildjet-4vcpu-ubuntu-2204-arm
type: tarball
ref: pinetab
id: build_tab_tarball
runs-on: ${{ matrix.runs-on }}
container:
image: "ubuntu:latest"
options: --privileged
env:
TERM: xterm
shell: bash
USER: dio
LOGNAME: dio
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.ref }}
- name: Install needed packages
run: |
sudo rm -rf /var/lib/apt/lists/*
sudo sed -i 's/jammy/noble/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get install --reinstall debootstrap mtools dosfstools qemu-user-static binfmt-support dpkg-dev -y
sudo ln -sfn /usr/share/debootstrap/scripts/gutsy /usr/share/debootstrap/scripts/noble
sudo dpkg -i debs/live-build_*_all.deb
sudo mv /usr/share/debootstrap/functions functions
sudo patch -i 0002-remove-WRONGSUITE-error.patch
sudo mv functions /usr/share/debootstrap/functions
sudo cp binary_grub-efi /usr/lib/live/build/binary_grub-efi
if [ "${{ matrix.type }}" == "tarball" ]; then
sudo cp binary_rootfs /usr/lib/live/build/binary_rootfs
fi
- name: Make scripts executable
run: chmod -R +x build.sh etc/auto/config etc/terraform.conf etc/
- name: Build system image
run: |
sudo ./build.sh etc/terraform.conf
if [[ "${{ matrix.type }}" == "iso" ]]; then
echo "OUT_ISO=$(cd builds/${{ matrix.target }}; ls *.iso)" >> $GITHUB_ENV
fi
- uses: actions/[email protected]
if: matrix.type == 'iso'
with:
name: ${{ env.OUT_ISO }}
path: builds/${{ matrix.target }}/${{ env.OUT_ISO }}
- uses: actions/[email protected]
if: matrix.type == 'tarball'
with:
path: binary/
key: tar-${{ matrix.target }}-${{ github.run_id }}
deploy:
needs: build
runs-on: buildjet-4vcpu-ubuntu-2204
container:
image: "ubuntu:latest"
options: --privileged
env:
TERM: xterm
shell: bash
USER: dio
LOGNAME: dio
DEBIAN_FRONTEND: noninteractive
strategy:
matrix:
include:
- target: pinephone-unified
parent: pine
ref: pinephone
out: pinephone-unified
- target: raspberrypi-desktop
parent: rpi
ref: rpi
out: rpi-desktop
- target: raspberrypi-server
parent: rpi
ref: rpi
out: rpi-server
- target: pinetab
parent: tab
ref: pinetab
out: pinetab
- target: pinetab2
parent: tab
ref: pinetab
out: pinetab2
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.ref }}
- uses: actions/[email protected]
with:
path: binary/
key: tar-${{ matrix.parent }}-${{ github.run_id }}
- name: Deploy to partition
run: |
source ./etc/terraform.conf
VER="${VERSION}${SUBVER}"
sudo ./debos-docker --privileged -t image:"Rhino-Linux-${VER}-${{ matrix.out }}.img" -m 10G ${ matrix.target }.yaml
- name: Move to output folder and compress
run: |
sudo mkdir -p builds/${{ matrix.type }}
sudo mv Rhino*${{ matrix.out }}.img builds/${{ matrix.out }}/
sudo xz -v builds/${{ matrix.out }}/Rhino*${{ matrix.out }}.img
echo "OUT_IMAGE=$(cd builds/${{ matrix.out }}; ls *.img.xz)" >> $GITHUB_ENV
- uses: actions/[email protected]
with:
name: ${{ env.OUT_IMAGE }}
path: builds/${{ matrix.out }}/${{ env.OUT_IMAGE }}