-
Notifications
You must be signed in to change notification settings - Fork 10
85 lines (71 loc) · 2.46 KB
/
bootstrap.yaml
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
name: bootstrap
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
bootstrap:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [arm, arm64, riscv64, x86_64]
steps:
- name: checkout haiku (from github due to performance)
uses: actions/checkout@v3
with:
repository: haiku/haiku
path: haiku
- name: tag current commit from haiku
working-directory: haiku
run: git tag $(git ls-remote https://review.haiku-os.org/haiku refs/tags/hrev* | awk '/'$(git rev-parse HEAD)'/ { gsub(/refs\/tags\//, ""); print $2 }')
- name: checkout buildtools (from github due to performance)
uses: actions/checkout@v3
with:
repository: haiku/buildtools
path: buildtools
- name: checkout haikuporter
uses: actions/checkout@v3
with:
repository: haikuports/haikuporter
path: haikuporter
- name: checkout haikuports
uses: actions/checkout@v3
with:
repository: haikuports/haikuports
path: haikuports
- name: checkout haikuports.cross
uses: actions/checkout@v3
with:
path: haikuports.cross
- name: create build directory
run: mkdir build
- name: install ubuntu packages
run: sudo apt install -y nasm
- name: install jam
working-directory: buildtools/jam
run: |
make
./jam0 install
- name: generate cache key, based on host, target, haiku and buildtools
id: cache-key
run: echo "key=${{ runner.os }}-${{ matrix.target }}-$(git -C haiku rev-parse HEAD)-$(git -C buildtools rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Cache build (${{ steps.cache-key.outputs.key }})
id: cache-build
uses: actions/cache/restore@v3
with:
path: build
key: ${{ steps.cache-key.outputs.key }}
- name: configure for ${{ matrix.target }}
working-directory: build
run: ../haiku/configure --build-cross-tools ${{ matrix.target }} --cross-tools-source ../buildtools --bootstrap ../haikuporter/haikuporter ../haikuports.cross ../haikuports -j$(nproc)
- name: jam @bootstrap-raw for ${{ matrix.target }}
working-directory: build
run: jam -j$(nproc) -q @bootstrap-raw
- name: save build files in cache (${{ steps.cache-key.outputs.key }})
uses: actions/cache/save@v3
if: always()
with:
path: build
key: ${{ steps.cache-key.outputs.key }}