-
-
Notifications
You must be signed in to change notification settings - Fork 22
68 lines (66 loc) · 2.59 KB
/
build-from-repos.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
name: Build from repos
on:
schedule:
- cron: '0 4 * * *' # 04:00 each day
jobs:
build:
name: Build
runs-on: ubuntu-24.04
if: github.repository_owner == 'managarm' && github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
path: src
- name: Install prerequisites
run: |
pip3 install xbstrap y4
xbstrap prereqs cbuildrt xbps
- name: Download and unpack rootfs
run: |
curl https://repos.managarm.org/buildenv/managarm-buildenv.tar.gz -o managarm-rootfs.tar.gz
tar xvf managarm-rootfs.tar.gz
- name: Prepare build directory
run: |
mkdir build
cd build
cat << EOF > bootstrap-site.yml
define_options:
mount-using: 'loopback'
pkg_management:
format: xbps
container:
runtime: cbuildrt
rootfs: $GITHUB_WORKSPACE/rootfs
uid: 1000
gid: 1000
src_mount: /var/lib/managarm-buildenv/src
build_mount: /var/lib/managarm-buildenv/build
allow_containerless: true
EOF
xbstrap init ../src
- name: Pull packages
run: |
xbstrap pull-pack --deps-of weston-desktop mlibc mlibc-headers
xbstrap install --deps-of weston-desktop
working-directory: ./build
- name: Download tool archives
run: |
xbstrap download-tool-archive --build-deps-of managarm-system --build-deps-of managarm-kernel --build-deps-of mlibc
working-directory: ./build
- name: Build mlibc from source
run: |
xbstrap install --rebuild mlibc mlibc-headers
working-directory: ./build
- name: Build managarm-kernel from source
run: |
xbstrap install --rebuild managarm-kernel
working-directory: ./build
- name: Build managarm-system from source
run: |
xbstrap install --rebuild managarm-system
working-directory: ./build
- name: Create image
run: |
xbstrap run initialize-empty-image make-image
working-directory: ./build