This repository was archived by the owner on Nov 26, 2025. It is now read-only.
forked from Azure-stars/starry-next
-
Notifications
You must be signed in to change notification settings - Fork 36
137 lines (131 loc) · 4.43 KB
/
ci.yml
File metadata and controls
137 lines (131 loc) · 4.43 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI
on: [push, pull_request]
env:
qemu-version: 9.2.4
jobs:
clippy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust-toolchain: [nightly, nightly-2025-05-20]
arch: [x86_64, riscv64, aarch64, loongarch64]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, clippy, rustfmt
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat, loongarch64-unknown-none
- name: Setup ArceOS
run: ./scripts/get_deps.sh
- name: Check rust version
run: rustc --version --verbose
- uses: arceos-org/setup-musl@v1
with:
arch: ${{ matrix.arch }}
- name: Check code format
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: cargo fmt --all -- --check
- name: Clippy
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make clippy ARCH=${{ matrix.arch }}
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64, loongarch64]
rust-toolchain: [nightly, nightly-2025-05-20]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, llvm-tools
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat, loongarch64-unknown-none
- uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-bin-cache
cache-targets: false
- run: cargo install cargo-binutils
- run: ./scripts/get_deps.sh
- uses: arceos-org/setup-musl@v1
with:
arch: ${{ matrix.arch }}
- name: Build for ${{ matrix.arch }}
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}
run: make ARCH=${{ matrix.arch }} build
test-musl:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64, loongarch64]
rust-toolchain: [nightly-2025-05-20]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, llvm-tools
- uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-bin-cache
cache-targets: false
- run: cargo install cargo-binutils
- run: ./scripts/get_deps.sh
- uses: arceos-org/setup-musl@v1
with:
arch: ${{ matrix.arch }}
- uses: arceos-org/setup-qemu@v1
with:
version: ${{ env.qemu-version }}
arch_list: x86_64,aarch64,riscv64,loongarch64
- name: Build rustup target
if: ${{ matrix.arch != 'riscv64' }}
run: rustup target add ${{ matrix.arch }}-unknown-linux-musl
- name: Run tests for musl applications
run: make test ARCH=${{ matrix.arch }}
test-oscomp:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64, riscv64, aarch64, loongarch64]
rust-toolchain: [nightly-2025-05-20]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rust-src, llvm-tools
- uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-bin-cache
cache-targets: false
- run: cargo install cargo-binutils
- run: ./scripts/get_deps.sh
- uses: arceos-org/setup-musl@v1
with:
arch: ${{ matrix.arch }}
- uses: arceos-org/setup-qemu@v1
with:
version: ${{ env.qemu-version }}
arch_list: x86_64,aarch64,riscv64,loongarch64
- uses: ./.github/workflows/actions/setup-testcases
with:
image-release-url: https://github.com/Azure-stars/testsuits-for-oskernel/releases/download/v0.2
arch: ${{ matrix.arch }}
- name: Unzip testcases
run: |
gunzip sdcard-${{ matrix.arch }}.img.gz
- name: Build python environment
run: sudo apt-get install -y python3 python3-pip
- name: Run tests for oscomp musl testcases
run: make oscomp_test ARCH=${{ matrix.arch }} LIBC=musl
- name: Run tests for oscomp glibc testcases
run: make oscomp_test ARCH=${{ matrix.arch }} LIBC=glibc