-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (80 loc) · 2.3 KB
/
kernel.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
86
87
88
89
90
91
92
93
94
name: Kernel
on:
push:
branches:
- "*"
tags-ignore:
- v*
paths-ignore:
- README.md
# define global buildmode variable used by initramfs
# and by tf-build-upload script to specify if we trigger
# a 'debug' or 'release' (production) image
#
# mode release:
# set by default here, theses images are the most
# secure and are production ready, does not ship debugging
# tools and have hardened security
#
# mode debug:
# only set if branch name starts with 'debug-' prefix, theses
# images contains easy remote access and extra debugging tools
#
# -- DEBUG IMAGE SHOULD NEVER BE USED IN A PRODUCTION --
#
env:
BUILDMODE: release
jobs:
kernel:
name: "Zero-OS Kernel Image"
runs-on: ubuntu-latest
container: ubuntu:20.04
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: runbranch
- name: Update global build mode for debugging
if: ${{ contains(github.ref, '-zos-v4-debug-') }}
run: echo "BUILDMODE=debug" >> $GITHUB_ENV
- name: "Install: go"
uses: actions/setup-go@v1
with:
go-version: 1.21
id: go
- name: "Install: requirements"
run: |
bash ./autobuild/tf-build-deps-clean.sh
- name: "Install: rust"
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-musl
default: true
- name: "Fetch: sources"
run: |
export INTERACTIVE="false"
bash initramfs.sh --download
- name: "Build: busybox"
run: |
bash initramfs.sh --busybox
- name: "Build: userland"
run: |
bash initramfs.sh --tools
- name: "Build: extensions"
run: |
bash initramfs.sh --extensions
- name: "Build: cores"
run: |
bash initramfs.sh --cores
- name: "Build: kernel"
run: |
bash initramfs.sh --kernel --modules
- name: "Upload: kernel"
env:
BOOTSTRAP_TOKEN: ${{ secrets.BOOTSTRAP_TOKEN }}
IMAGE_BRANCH: ${{ steps.runbranch.outputs.branch }}
run: |
bash ./autobuild/tf-build-upload.sh