-
Notifications
You must be signed in to change notification settings - Fork 24
88 lines (74 loc) · 2.63 KB
/
main.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
---
# Tools that can save round-trips to github and a lot of time:
#
# yamllint -f parsable pull_request.yml
# pip3 install ruamel.yaml.cmd
# yaml merge-expand pull_request.yml exp.yml &&
# diff -w -u pull_request.yml exp.yml
#
# github.com also has a powerful web editor that can be used without
# committing.
name: main test
# 'workflow_dispatch' allows running this workflow manually from the
# 'Actions' tab
# yamllint disable-line rule:truthy
on: [pull_request, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
# matrix is very flexible and not always "obvious"
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflo
matrix:
# Keep it simple and just build "ourselves"
cfg:
- os: ubuntu-22.04
img_distro: ubuntu
img_rel: jammy
- os: ubuntu-24.04
img_distro: ubuntu
img_rel: noble
arch: [x86_64]
run_opts: [--cxl]
steps:
- uses: actions/checkout@v4
with:
path: run_qemu
- name: apt get requirements
run: |
# update is required first, see
# https://github.com/actions/runner-images/issues/2924
sudo apt-get update
# Kernel deps
sudo apt install -y build-essential flex bison libelf-dev libssl-dev
# run_qemu deps
sudo apt install -y mkosi # this one pulls A LOT
sudo apt install -y dracut-core qemu-utils
# argbash. TODO: mixing generated code and sources in the same git
# repo is generally a bad idea but this particular one changes
# rarely, so it should probably deserve an exception avoiding
# everyone this step.
- name: argbash
run: |
AB_VER=2.10.0
wget https://github.com/matejak/argbash/archive/refs/tags/${AB_VER}.tar.gz
tar xf ${AB_VER}.tar.gz
sudo apt install -y autoconf
sudo make -C argbash-${AB_VER}/resources install PREFIX=/usr/local/
- name: download kernel
uses: actions/checkout@v4
with:
repository: torvalds/linux
ref: v6.12
path: kernel
- name: defconfig
run: cd kernel &&
make defconfig ARCH=${{ matrix.arch }}
- name: build
run: |
mkosi --version
cd kernel
sudo -E distro=${{ matrix.cfg.img_distro }} rev=${{ matrix.cfg.img_rel }} \
../run_qemu/run_qemu.sh -v --no-run ${{ matrix.run_opts }}
# TODO: drop --no-run thanks to "nested KVM" or something?