-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (84 loc) · 2.42 KB
/
microvm-kernel.yml
File metadata and controls
96 lines (84 loc) · 2.42 KB
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
name: microvm-kernel
on:
pull_request:
branches:
- '*'
push:
branches:
- master
- main
workflow_dispatch:
jobs:
build:
name: microvm-kernel-${{ matrix.label }}
# runs-on: [actuated-16cpu-24gb-burstable, a102]
runs-on: [actuated-16cpu-24gb, "${{ matrix.label }}" ]
strategy:
matrix:
label: [a102]
steps:
# vmmeter start
- uses: alexellis/setup-arkade@master
- uses: self-actuated/vmmeter-action@master
# vmmeter end
- name: Setup RAM disk for Linux
run: |
mkdir `pwd`/src
# sudo chown -R $(whoami) `pwd`/src
# sudo mount -o size=16G -t tmpfs none `pwd`/src
# sudo chown -R $(whoami) `pwd`/src
# df -h
- name: free RAM
run: free -h
- name: List CPUs
run: nproc
- name: get build toolchain
run: |
sudo apt update -qy
sudo apt-get install -qy \
git \
build-essential \
fakeroot \
libncurses5-dev \
libssl-dev \
ccache \
bison \
flex \
libelf-dev \
dwarves \
bc
- name: clone linux
run: |
time git clone https://github.com/torvalds/linux.git src/linux.git --depth=1 --branch v6.13
- name: make config
run: |
cd src/linux.git
# Generate a default config
#make defconfig
# Generate a minimal config
make allnoconfig
# Turn off a couple of things
scripts/config --disable SYSTEM_TRUSTED_KEYS
scripts/config --disable SYSTEM_REVOCATION_KEYS
scripts/config --disable SYSTEM_TRUSTED_KEYRING
# Make the config
make LOCALVERSION= olddefconfig
cat .config
# - name: Cache vmlinux
# id: cache-vmlinux
# uses: actions/cache@v4
# with:
# path: src/linux.git/vmlinux
# key: vmlinux-${{ hashFiles('./src/linux.git/.config') }}
- name: Make vmlinux
# if: steps.cache-vmlinux.outputs.cache-hit != 'true'
run: |
cd src/linux.git
time make vmlinux -j$(nproc)
du -h ./vmlinux
# - name: Check RAM disk usage and clean it up
# if: always()
# run: |
# df -h `pwd`/src
# sudo umount `pwd`/src || true
# rm -rf `pwd`/src