forked from linuxppc/linux-ci
-
Notifications
You must be signed in to change notification settings - Fork 2
213 lines (179 loc) · 6.44 KB
/
powerpc-kernel+qemu.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: powerpc/kernel+qemu
# Controls when the action will run.
on:
# This allows the build to be triggered manually via the github UI.
workflow_dispatch:
push:
# This triggers the build on a push to any branch
branches:
- '**'
# As long as one of these paths matches
paths:
- '!tools/**' # ignore tools
- '!samples/**' # ignore samples
- '!Documentation/**' # ignore Documentation
- '!arch/**' # ignore arch changes
- 'arch/powerpc/**' # but not arch/powerpc
- 'arch/Kconfig' # or common bits in arch
- '**' # anything else triggers a build
jobs:
kernel:
runs-on: ubuntu-latest
strategy:
matrix:
defconfig: [ppc64_defconfig, mpc885_ads_defconfig]
image: [fedora-40, korg-5.5.0]
include:
# ppc64le_guest_defconfig
- subarch: ppc64le
defconfig: ppc64le_guest_defconfig
image: fedora-40
- subarch: ppc64le
defconfig: ppc64le_guest_defconfig
image: korg-5.5.0
# ppc44x
- defconfig: ppc44x_defconfig
merge_config: /linux/arch/powerpc/configs/ppc44x-qemu.config
image: fedora-40
- defconfig: ppc44x_defconfig
merge_config: /linux/arch/powerpc/configs/ppc44x-qemu.config
image: korg-5.5.0
# corenet64_smp
- defconfig: corenet64_smp_defconfig
image: fedora-40
- defconfig: corenet64_smp_defconfig
image: korg-5.5.0
# g5
- defconfig: g5_defconfig
merge_config: /linux/arch/powerpc/configs/g5-qemu.config
image: fedora-40
- defconfig: g5_defconfig
merge_config: /linux/arch/powerpc/configs/g5-qemu.config
image: korg-5.5.0
# pmac32
- defconfig: pmac32_defconfig
merge_config: /linux/arch/powerpc/configs/pmac32-qemu.config
image: fedora-40
- defconfig: pmac32_defconfig
merge_config: /linux/arch/powerpc/configs/pmac32-qemu.config
image: korg-5.5.0
- defconfig: corenet32_smp_defconfig
image: fedora-40
env:
ARCH: powerpc
TARGET: kernel
CCACHE: 1
SUBARCH: ${{ matrix.subarch }}
IMAGE: ${{ matrix.image }}
DEFCONFIG: ${{ matrix.defconfig }}
MERGE_CONFIG: ${{ matrix.merge_config }}
steps:
- uses: actions/checkout@v4
- name: Register problem matchers
run: |
echo "::add-matcher::.github/problem-matchers/compiler-source.json"
echo "::add-matcher::.github/problem-matchers/compiler-non-source.json"
- name: Load ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ matrix.image }}-${{ matrix.subarch }}-${{ matrix.defconfig }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
mkdir -p ~/.ccache
./arch/powerpc/tools/ci-build.sh
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.defconfig }}-${{ matrix.image }}
path: |
~/output/vmlinux
~/output/.config
~/output/System.map
~/output/modules.tar.bz2
~/output/arch/powerpc/boot/zImage
~/output/arch/powerpc/boot/uImage
~/output/include/config/kernel.release
boot:
runs-on: ubuntu-latest
needs: kernel
strategy:
matrix:
include:
- defconfig: ppc64le_guest_defconfig
machine: pseries+p8+tcg
machine_2: pseries+p9+tcg
packages: qemu-system-ppc64
rootfs: ppc64le-rootfs.cpio.gz
old-image: korg-5.5.0
new-image: fedora-40
- defconfig: ppc64le_guest_defconfig
machine: powernv+p8+tcg
machine_2: powernv+p9+tcg
packages: qemu-system-ppc64
rootfs: ppc64le-rootfs.cpio.gz
old-image: korg-5.5.0
new-image: fedora-40
- defconfig: ppc44x_defconfig
machine: 44x
packages: qemu-system-ppc
rootfs: ppc-rootfs.cpio.gz
old-image: korg-5.5.0
new-image: fedora-40
- defconfig: corenet64_smp_defconfig
machine: ppc64e
machine_2: ppc64e+compat
packages: qemu-system-ppc64
rootfs: ppc64-novsx-rootfs.cpio.gz ppc-rootfs.cpio.gz
old-image: korg-5.5.0
new-image: fedora-40
- defconfig: g5_defconfig
machine: g5
packages: qemu-system-ppc64 openbios-ppc
rootfs: ppc64-rootfs.cpio.gz
old-image: korg-5.5.0
new-image: fedora-40
- defconfig: pmac32_defconfig
machine: mac99
packages: qemu-system-ppc openbios-ppc
rootfs: ppc-rootfs.cpio.gz
old-image: korg-5.5.0
new-image: fedora-40
steps:
- uses: actions/checkout@v4
with:
repository: linuxppc/ci-scripts
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download root disk
run: make -C root-disks ${{ matrix.rootfs }}
- name: APT update
run: sudo apt update
- name: Install dependencies
run: sudo apt install -y ${{ matrix.packages }} python3-pexpect python3-termcolor python3-yaml
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.defconfig }}-${{ matrix.new-image }}
- name: Run qemu-${{ matrix.machine }} with ${{ matrix.new-image }} build kernel
run: ./scripts/boot/qemu-${{ matrix.machine }}
- name: Run qemu-${{ matrix.machine_2 }} with ${{ matrix.new-image }} build kernel
run: ./scripts/boot/qemu-${{ matrix.machine_2 }}
if: matrix.machine_2 != ''
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.defconfig }}-${{ matrix.old-image }}
- name: Run qemu-${{ matrix.machine }} with ${{ matrix.old-image }} build kernel
run: ./scripts/boot/qemu-${{ matrix.machine }}
- name: Run qemu-${{ matrix.machine_2 }} with ${{ matrix.old-image }} build kernel
run: ./scripts/boot/qemu-${{ matrix.machine_2 }}
if: matrix.machine_2 != ''