-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (40 loc) · 1.35 KB
/
build.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
name: CMake
on:
push:
branches: ['main']
pull_request:
branches: ['main']
env:
CMAKE_GENERATOR: Ninja
jobs:
build:
strategy:
matrix:
# Build with all four build types:
build_type: ['Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel']
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Fetch submodules
run: git submodule update --init
- name: Install ninja
run: sudo apt-get install -y ninja-build
- name: Fetch & install RISC-V GNU Compiler Toolchain
run: |
curl -Lo riscv32-glibc-ubuntu-22.04-nightly.tar.gz 'https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.06.09/riscv32-glibc-ubuntu-22.04-nightly-2023.06.09-nightly.tar.gz'
tar -xf riscv32-glibc-ubuntu-22.04-nightly.tar.gz
echo "${PWD}/riscv/bin" >> $GITHUB_PATH
export PATH=$PATH:${PWD}/riscv/bin
make hh24_defconfig
- name: Build
run: CMAKE_BUILD_TYPE=${{matrix.build_type}} make clean build
- name: Build Statistics
run: |
riscv32-unknown-linux-gnu-size -B kernel/firmware/badger-os.elf
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Firmware
path: |
kernel/firmware/badger-os.elf
kernel/firmware/badger-os.bin