Repository navigation
86 lines (81 loc) · 2.71 KB
/
Copy pathriscv64-smoke.yml
File metadata and controls
86 lines (81 loc) · 2.71 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
name: RISC-V Boot Smoke
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: riscv64-smoke-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
kernel:
name: Kernel (riscv64)
runs-on: ubuntu-24.04
container: dragonos/dragonos-dev:v1.24
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build kernel
shell: bash -ileo pipefail {0}
env:
ARCH: riscv64
HOME: /root
CARGO_BUILD_JOBS: 4
run: |
source /root/.cargo/env
find . -type f \( -name '*.toml' -o -name Makefile \) -exec sed -i 's/git\.mirrors\.dragonos\.org\.cn/github.com/g' {} +
make ARCH="$ARCH" ROOTFS_MANIFEST=default NPROCS=4 kernel
- name: Upload RISC-V boot payloads
uses: actions/upload-artifact@v4
with:
name: riscv64-payloads
path: |
bin/kernel/kernel.elf
bin/sysroot/efi/boot/bootriscv64.efi
if-no-files-found: error
retention-days: 7
boot:
name: Boot (${{ matrix.mode }})
needs: kernel
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
mode: [sbi, u-boot, edk2]
steps:
- uses: actions/checkout@v4
- name: Install boot dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
acpica-tools bison build-essential ca-certificates curl device-tree-compiler \
dosfstools fdisk flex gcc-riscv64-linux-gnu libc6-dev-riscv64-cross git libssl-dev \
bzip2 mtools nasm python3 python3-dev python3-setuptools \
qemu-system-misc swig util-linux uuid-dev xz-utils
- uses: actions/download-artifact@v4
with:
name: riscv64-payloads
path: bin
- name: Cache boot dependencies
uses: actions/cache@v4
with:
path: bin/riscv64-smoke-cache
key: riscv64-smoke-${{ runner.os }}-${{ matrix.mode }}-${{ hashFiles('tools/riscv64/opensbi-smoke.sh') }}
- name: Boot and exercise the userspace shell
env:
DRAGONOS_KERNEL_ELF: ${{ github.workspace }}/bin/kernel/kernel.elf
DRAGONOS_EFI: ${{ github.workspace }}/bin/sysroot/efi/boot/bootriscv64.efi
run: tools/riscv64/opensbi-smoke.sh '${{ matrix.mode }}'
- name: Upload smoke logs
if: always()
uses: actions/upload-artifact@v4
with:
name: riscv64-smoke-${{ matrix.mode }}
path: bin/riscv64-smoke-logs/**/*.log
if-no-files-found: ignore
retention-days: 7