-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (124 loc) · 4.57 KB
/
build.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
name: Dasharo
on:
push:
branches:
- rel_*
jobs:
build_pcengines:
runs-on: ubuntu-22.04
container:
image: ghcr.io/dasharo/dasharo-sdk:v1.6.0-rc4
options: --user 1001
strategy:
matrix:
vendor: [ pcengines ]
model: [ apu2, apu3, apu4, apu6 ]
payload: [ seabios ]
steps:
- name: Checkout coreboot
run: |
COREBOOT_VERSION=$(echo $GITHUB_REF_NAME | cut -d_ -f2)
CORELABEL=$(echo $COREBOOT_VERSION | awk -F '.' '{if ($3 == "00") print $1"."$2; else print $1"."$2"."$3}')
echo "Extracted Coreboot version: $CORELABEL"
git clone https://review.coreboot.org/coreboot
cd coreboot
git checkout $CORELABEL -b patchqueue
- name: Checkout repository
uses: actions/checkout@v4
with:
# Checkout pull request HEAD commit instead of merge commit
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
ref: ${{ github.event.pull_request.head.sha }}
# Fetch complete history
fetch-depth: 0
path: coreboot/.git/patches
- name: Set Up Git
run: |
cd $GITHUB_WORKSPACE/coreboot
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
ln -s patches .git/patches/patchqueue
touch .git/patches/patchqueue/status
- name: Apply Patches Using Guilt
run: |
cd $GITHUB_WORKSPACE/coreboot
guilt push -a
- name: Checkout coreboot submodules
run: |
cd $GITHUB_WORKSPACE/coreboot
git submodule update --init --recursive --checkout
- name: Build Dasharo
run: |
cd $GITHUB_WORKSPACE/coreboot
cp configs/config.${{ matrix.vendor }}_${{ matrix.payload }}_${{ matrix.model }} .config
make olddefconfig
make BUILD_TIMELESS=1
- name: Search for coreboot.rom
run: |
find $GITHUB_WORKSPACE/coreboot -name coreboot.rom
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.payload }}"
path: |
coreboot/build/coreboot.rom
retention-days: 30
build_q35:
runs-on: ubuntu-22.04
container:
image: ghcr.io/dasharo/dasharo-sdk:v1.6.0-rc4
options: --user 1001
strategy:
matrix:
vendor: [ emulation_qemu ]
model: [ x86_q35 ]
payload: [ smm_tseg_seabios ]
steps:
- name: Checkout coreboot
run: |
COREBOOT_VERSION=$(echo $GITHUB_REF_NAME | cut -d_ -f2)
CORELABEL=$(echo $COREBOOT_VERSION | awk -F '.' '{if ($3 == "00") print $1"."$2; else print $1"."$2"."$3}')
echo "Extracted Coreboot version: $CORELABEL"
git clone https://review.coreboot.org/coreboot
cd coreboot
git checkout $CORELABEL -b patchqueue
- name: Checkout repository
uses: actions/checkout@v4
with:
# Checkout pull request HEAD commit instead of merge commit
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
ref: ${{ github.event.pull_request.head.sha }}
# Fetch complete history
fetch-depth: 0
path: coreboot/.git/patches
- name: Set Up Git
run: |
cd $GITHUB_WORKSPACE/coreboot
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
ln -s patches .git/patches/patchqueue
touch .git/patches/patchqueue/status
- name: Apply Patches Using Guilt
run: |
cd $GITHUB_WORKSPACE/coreboot
guilt push -a
- name: Checkout coreboot submodules
run: |
cd $GITHUB_WORKSPACE/coreboot
git submodule update --init --recursive --checkout
- name: Build Dasharo
run: |
cd $GITHUB_WORKSPACE/coreboot
cp configs/config.${{ matrix.vendor }}_${{ matrix.model }}_${{ matrix.payload }} .config
make olddefconfig
make BUILD_TIMELESS=1
- name: Search for coreboot.rom
run: |
find $GITHUB_WORKSPACE/coreboot -name coreboot.rom
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.payload }}"
path: |
coreboot/build/coreboot.rom
retention-days: 30