Skip to content

Commit 1943d44

Browse files
committed
ci: add a workflow for bootloader
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
1 parent 40914c8 commit 1943d44

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

.github/workflows/bootloader.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build Bootloader
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
pull_request:
7+
branches: ["main"]
8+
paths:
9+
- bootloader/**
10+
- .github/workflows/bootloader.yml
11+
12+
jobs:
13+
build_bootloader:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
artifact_path: target/bootloader-x86_64/linux/arch/x86/boot/bzImage
20+
artifact_name: bootloader-x86_64
21+
- os: ubuntu-24.04-arm
22+
artifact_path: target/bootloader-aarch64/linux/arch/arm64/boot/Image
23+
artifact_name: bootloader-aarch64
24+
runs-on: ${{ matrix.os }}
25+
steps:
26+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
28+
with:
29+
go-version: stable
30+
cache-dependency-path: "**/go.sum"
31+
- name: Install LLVM and Clang
32+
uses: KyleMayes/install-llvm-action@98e68e10c96dffcb7bfed8b2144541a66b49aa02 # v2.0.8
33+
with:
34+
version: "20"
35+
- name: Install dependencies
36+
run: sudo apt-get update && sudo apt-get install -y libelf-dev
37+
- name: Build bootloader
38+
run: ./bootloader/build.sh
39+
- name: Upload artifact
40+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
41+
with:
42+
name: ${{ matrix.artifact_name }}
43+
path: ${{ matrix.artifact_path }}

bootloader/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function fetch_source() {
1414
pushd target
1515

1616
echo "Fetching Linux source..."
17-
wget ${LINUX_SRC} -O linux.tar.xz
17+
wget -q -O linux.tar.xz ${LINUX_SRC}
1818
tar xf linux.tar.xz
1919
mv linux-* linux
2020

0 commit comments

Comments
 (0)