This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
forked from cb-linux/breath
-
Notifications
You must be signed in to change notification settings - Fork 5
198 lines (167 loc) · 6.21 KB
/
test-builds.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
name: Testing builds
on:
schedule:
- cron: "0 3 * * *" # run at the start of every day after functions.py is updated
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test-ubuntu:
strategy:
matrix:
version: [ "22.04", "23.10" ]
de_name: [ "gnome", "kde", "xfce", "lxqt", "budgie", "deepin", "cinnamon", "cli" ]
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
temp-reserve-mb: 11264
swap-size-mb: 1
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted
- name: Copy testing script to root
run: cp ./.github/scripts/build-image.py ./build-image.py
- name: Testing Ubuntu builds
run: sudo python3 ./build-image.py ubuntu ${{ matrix.version }} ${{ matrix.de_name }}
- name: Uploading result as artifact
uses: actions/upload-artifact@v3
with:
name: results_ubuntu_${{ matrix.version }}_${{ matrix.de_name }}
retention-days: 1
path: |
*_results.txt
test-arch:
strategy:
matrix:
de_name: [ "gnome", "kde", "xfce", "lxqt", "budgie", "cinnamon", "cli" ] # deepin
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
temp-reserve-mb: 11264
swap-size-mb: 1
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted
- name: Copy testing script to root
run: cp ./.github/scripts/build-image.py ./build-image.py
- name: Testing Arch builds
run: sudo python3 ./build-image.py arch latest ${{ matrix.de_name }}
- name: Uploading result as artifact
uses: actions/upload-artifact@v3
with:
name: results_arch_latest_${{ matrix.de_name }}
retention-days: 1
path: |
*_results.txt
test-fedora:
strategy:
matrix:
version: [ "39" ]
de_name: [ "gnome", "kde", "xfce", "lxqt", "deepin", "budgie", "cinnamon", "cli" ]
runs-on: ubuntu-latest
steps:
- name: Maximizing build space
uses: easimon/maximize-build-space@master
with:
temp-reserve-mb: 11264
swap-size-mb: 1
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted
- name: Copy testing script to root
run: cp ./.github/scripts/build-image.py ./build-image.py
- name: Testing Fedora builds
run: sudo python3 ./build-image.py fedora ${{ matrix.version }} ${{ matrix.de_name }}
- name: Uploading result as artifact
uses: actions/upload-artifact@v3
with:
name: results_fedora_${{ matrix.version }}_${{ matrix.de_name }}
retention-days: 1
path: |
*_results.txt
test-pop-os:
runs-on: ubuntu-latest
steps:
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Installing dependencies
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted
- name: Copy testing script to root
run: cp ./.github/scripts/build-image.py ./build-image.py
- name: Testing PopOS build
run: sudo python3 ./build-image.py pop-os 22.04 cosmic-gnome
- name: Uploading result as artifact
uses: actions/upload-artifact@v3
with:
name: results_pop-os_22.04_cosmic-gnome
retention-days: 1
path: |
*_results.txt
evaluate-results:
needs: [ test-ubuntu, test-arch, test-fedora, test-pop-os ]
runs-on: ubuntu-latest
steps:
- name: Checking out repository code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Downloading result artifacts
uses: actions/download-artifact@v3
- name: Combining sizes into one json file
run: python3 ./.github/scripts/combine_sizes.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
# Disable setting repo owner as commit author
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes"
commit_message: chore: update os_sizes.json
# Optional glob pattern of files which should be added to the commit
# Defaults to all (.)
# See the `pathspec`-documentation for git
# - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203
# - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec
file_pattern: 'os_sizes.json'
- name: Evaluating results
# Check if the results are not empty and fail the whole workflow if they are
run: |
for file in ./results_*/*_results.txt
do
if [ "$(cat $file)" == "0" ]
then
echo $file >> ./failed_results.txt
fi
done
if [ -s ./failed_results.txt ]
then
echo "Failed to build the following images:"
cat ./failed_results.txt
exit 1
fi