-
Notifications
You must be signed in to change notification settings - Fork 7
224 lines (215 loc) · 6.34 KB
/
images.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
name: Iso building
concurrency:
group: ci-${{ github.head_ref || github.ref }}-${{ github.repository }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
paths:
- 'conf/**'
- 'specs/**'
- 'scripts/**'
- '.github/workflows/**'
branches: [ master, develop ]
pull_request:
paths:
- 'conf/**'
- 'specs/**'
- 'scripts/**'
- '.github/workflows/**'
branches: [ master, develop ]
schedule:
- cron: '0 1 * * *'
create:
tags:
- v*
jobs:
iso:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# - spec: "micro"
# name: "Mocaccino Micro"
# - spec: "micro-dev"
# name: "Mocaccino Micro Development version"
- spec: "community"
name: "Mocaccino Community Desktop"
- spec: "gnome"
name: "Mocaccino GNOME Desktop"
- spec: "mate"
name: "Mocaccino MATE Desktop"
- spec: "kde"
name: "Mocaccino KDE Desktop"
- spec: "xfce"
name: "Mocaccino XFCE Desktop"
- spec: "minimal"
name: "Mocaccino Desktop Minimal"
steps:
- uses: actions/checkout@v4
- uses: fkirc/skip-duplicate-actions@master
- name: Install Luet and deps 🔧
run: |
sudo apt-get install -y xorriso squashfs-tools dosfstools
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh
sudo luet install -y repository/mocaccino-extra
sudo luet install -y utils/jq utils/yq extension/makeiso
- name: ${{matrix.name}} ISO Build 🔧
env:
LUET_NOLOCK: "true"
LUET_CONFIG_PROTECT_SKIP: "true"
SPEC: ${{matrix.spec}}
run: |
sudo -E HTTP_TIMEOUT="900" luet-makeiso specs/$SPEC.yaml
mkdir isobuild
mv *.iso *.sha256 isobuild/
- uses: actions/upload-artifact@v4
with:
name: mOS-${{ matrix.spec }}.iso.zip
path: |
isobuild/*.iso
isobuild/*.sha256
# qemu:
# runs-on: ubuntu-latest
# needs: iso
# strategy:
# matrix:
# include:
# - spec: "minimal"
# flavor: "Minimal"
# steps:
# - uses: actions/checkout@v4
# - name: Download ISO
# uses: actions/download-artifact@v4
# with:
# name: mOS-${{ matrix.spec }}.iso.zip
# - name: Install deps
# run: |
# sudo apt-get update
# sudo apt-get install -y qemu qemu-system qemu-kvm
# sudo -E make deps
# sudo luet install -y utils/packer
# - name: Build QEMU Image 🔧
# run: |
# build=$(date +%Y%m%d)
# PACKER_ARGS="-var='accellerator=none' -var='sleep=5m' -var=build=$build -var='flavor=${{ matrix.flavor }}' -only qemu" make packer
# - uses: actions/upload-artifact@v4
# with:
# name: mOS-${{ matrix.spec }}.qcow
# path: |
# packer/*.tar.gz
vbox:
runs-on: macos-latest
needs: iso
strategy:
matrix:
include:
- spec: "minimal"
flavor: "Minimal"
steps:
- uses: actions/checkout@v4
- name: Download ISO
uses: actions/download-artifact@v4
with:
name: mOS-${{ matrix.spec }}.iso.zip
- name: Install deps
run: |
brew tap hashicorp/tap
brew install hashicorp/tap/packer
- name: Build VBox Image 🔧
run: |
packer plugins install github.com/hashicorp/virtualbox
packer plugins install github.com/hashicorp/vagrant
build=$(date +%Y%m%d)
PACKER_ARGS="-var='sleep=5m' -only virtualbox-iso -var=build=$build -var='flavor=${{ matrix.flavor }}'" make packer
ls packer
- uses: actions/upload-artifact@v4
with:
name: mOS-${{ matrix.spec }}.ova
path: |
packer/*.tar.gz
vbox-vagrant:
runs-on: macos-latest
needs: iso
strategy:
matrix:
include:
- spec: "minimal"
flavor: "Minimal"
steps:
- uses: actions/checkout@v4
- name: Download ISO
uses: actions/download-artifact@v4
with:
name: mOS-${{ matrix.spec }}.iso.zip
- name: Install deps
run: |
brew tap hashicorp/tap
brew install hashicorp/tap/packer
- name: Build VBox Image 🔧
run: |
packer plugins install github.com/hashicorp/virtualbox
packer plugins install github.com/hashicorp/vagrant
build=$(date +%Y%m%d)
PACKER_ARGS="-var='sleep=5m' -var='vagrant=true' -var=build=$build -var='flavor=${{ matrix.flavor }}' -only virtualbox-iso" make packer
ls packer
- uses: actions/upload-artifact@v4
with:
name: mOS-${{ matrix.spec }}.box
path: |
packer/*.box
tests:
runs-on: macos-latest
needs: vbox-vagrant
strategy:
matrix:
include:
- spec: "minimal"
flavor: "Minimal"
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
- uses: actions/checkout@v4
- name: Download vagrant box
uses: actions/download-artifact@v4
with:
name: mOS-${{ matrix.spec }}.box
path: packer
- name: Run tests 🔧
run: |
go install -mod=mod github.com/onsi/ginkgo/v2/[email protected]
make test
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: iso
strategy:
matrix:
include:
- spec: "gnome"
name: "Mocaccino GNOME Desktop"
- spec: "mate"
name: "Mocaccino MATE Desktop"
- spec: "kde"
name: "Mocaccino KDE Desktop"
- spec: "xfce"
name: "Mocaccino XFCE Desktop"
- spec: "minimal"
name: "Mocaccino Minimal Desktop"
steps:
- uses: actions/checkout@v4
- name: Download ISO
uses: actions/download-artifact@v4
with:
name: mOS-${{ matrix.spec }}.iso.zip
path: release
- name: Release
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_PATH: release/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHR_COMPRESS: xz