[test] remove 1G page for libc testcase (#60) #269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |