-
Notifications
You must be signed in to change notification settings - Fork 42
157 lines (152 loc) · 5.15 KB
/
bwrap.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
# SPDX-FileCopyrightText: 2023 fosslinux <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Run under bubblewrap
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
pass1:
name: Run up to Linux build under bubblewrap
runs-on: ubuntu-latest
steps:
- name: Install bubblewrap
run: sudo apt install bubblewrap
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
# There is a strange bug(?) in nongnu, when you clone a git repository
# against a commit != HEAD with depth=1, it errors out.
fetch-depth: 0
- name: Query cache for sources
id: cache
uses: actions/cache/restore@v3
with:
path: |
tmp/externals/distfiles
key: cache-${{ hashFiles('steps/*/sources') }}
- name: Get sources
if: steps.cache.outputs.cache-hit != 'true'
run: ./download-distfiles.sh
- name: Cache sources
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: |
tmp/externals/distfiles
key: cache-${{ hashFiles('steps/*/sources') }}
- name: Run bootstrap
run: ./rootfs.py --bwrap --external-sources --build-kernels --preserve --cores 2 --internal-ci pass1
- name: Archive created packages
if: failure() # archive failed builds progress
uses: actions/upload-artifact@v3
with:
name: packages
path: tmp/external/repo/**
- name: Tar pass1 image
run: tar -cf pass1_image.tar tmp
- name: Archive pass1_image
uses: actions/upload-artifact@v3
with:
name: internal_pass1_image
path: pass1_image.tar
pass2:
name: Run up to Python bootstrap under bubblewrap
needs: pass1
runs-on: ubuntu-latest
steps:
- name: Install bubblewrap
run: sudo apt install bubblewrap
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
# There is a strange bug(?) in nongnu, when you clone a git repository
# against a commit != HEAD with depth=1, it errors out.
fetch-depth: 0
- name: Get pass1_image
uses: actions/download-artifact@v3
with:
name: internal_pass1_image
- name: Extract pass1_image
run: tar -xf pass1_image.tar
- name: Query cache for sources
id: cache
uses: actions/cache/restore@v3
with:
path: |
externals/distfiles
key: cache-${{ hashFiles('steps/*/sources') }}
- name: Get sources
if: steps.cache.outputs.cache-hit != 'true'
run: ./download-distfiles.sh
- name: Cache sources
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: |
externals/distfiles
key: cache-${{ hashFiles('steps/*/sources') }}
- name: Run bootstrap
run: ./rootfs.py --bwrap --external-sources --build-kernels --preserve --cores 2 --internal-ci pass2
- name: Archive created packages
if: always() # archive failed builds progress
uses: actions/upload-artifact@v3
with:
name: internal_packages_pass2
path: tmp/externals/repo/**
pass3:
name: Run remaining builds under bubblewrap
needs: pass2
runs-on: ubuntu-latest
steps:
- name: Install bubblewrap
run: sudo apt install bubblewrap
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
# There is a strange bug(?) in nongnu, when you clone a git repository
# against a commit != HEAD with depth=1, it errors out.
fetch-depth: 0
- name: Get pass1_image
uses: actions/download-artifact@v3
with:
name: internal_pass1_image
- name: Extract pass1_image
run: tar -xf pass1_image.tar
# By doing this, all packages that have already been compiled will come from the preseed.
- name: Get packages repo progress
uses: actions/download-artifact@v3
with:
name: internal_packages_pass2
path: tmp/externals/repo-preseeded/
- name: Query cache for sources
id: cache
uses: actions/cache/restore@v3
with:
path: |
externals/distfiles
key: cache-${{ hashFiles('steps/*/sources') }}
- name: Get sources
if: steps.cache.outputs.cache-hit != 'true'
run: ./download-distfiles.sh
- name: Cache sources
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: |
externals/distfiles
key: cache-${{ hashFiles('steps/*/sources') }}
- name: Run bootstrap
run: ./rootfs.py --bwrap --external-sources --build-kernels --preserve --cores 2 --internal-ci pass3
- name: Archive created packages
if: always() # archive failed builds
uses: actions/upload-artifact@v3
with:
name: packages
path: tmp/externals/repo/**