Skip to content
Snippets Groups Projects
Commit 5ccd6cee authored by Martin Kröning's avatar Martin Kröning :crab:
Browse files

CI: Extract Build and Test check

parent badc54d4
No related branches found
No related tags found
No related merge requests found
......@@ -51,8 +51,42 @@ jobs:
cargo doc --package libhermit-rs --no-deps --document-private-items --target x86_64-unknown-none
cargo doc --package libhermit-rs --no-deps --document-private-items --target aarch64-unknown-none-softfloat
test-x86:
name: x86 tests
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install NASM
run: |
sudo apt-get update
sudo apt-get install nasm
- uses: actions/checkout@v3
- name: Build minimal kernel
run: |
cargo xtask build --arch x86_64 --no-default-features
cargo xtask build --arch aarch64 --no-default-features
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Unit tests
run: cargo test --lib --target x86_64-unknown-linux-gnu
env:
RUSTFLAGS: -Awarnings
- name: Download loader
uses: dsaltares/fetch-gh-release-asset@1.0.0
with:
repo: hermitcore/rusty-loader
file: rusty-loader-x86_64
- name: Integration tests
run: cargo test --tests --no-fail-fast --target x86_64-unknown-none -- --bootloader_path=../rusty-loader-x86_64
env:
RUSTFLAGS: -Awarnings
continue-on-error: true
run-x86_64:
name: Run RustyHermit (x86_64)
runs-on: ubuntu-latest
steps:
- name: Install QEMU, NASM
......@@ -70,16 +104,8 @@ jobs:
uses: actions/checkout@v3
with:
path: libhermit-rs
- name: Build minimal kernel
working-directory: libhermit-rs
run: cargo xtask build --arch x86_64 --no-default-features
- name: Build dev profile
run: cargo build -Zbuild-std=core,alloc,std,panic_abort -Zbuild-std-features=compiler-builtins-mem --target x86_64-unknown-hermit
- name: Unittests on host
working-directory: libhermit-rs
run: cargo test --lib --target x86_64-unknown-linux-gnu
env:
RUSTFLAGS: -Awarnings
- name: Download loader
uses: dsaltares/fetch-gh-release-asset@1.0.0
with:
......@@ -92,9 +118,6 @@ jobs:
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
-kernel rusty-loader-x86_64 \
-initrd target/x86_64-unknown-hermit/debug/rusty_demo
- name: Integration tests
working-directory: libhermit-rs
run: cargo test --tests --no-fail-fast --target x86_64-unknown-none -- --bootloader_path=../rusty-loader-x86_64
- name: Build release profile
run: cargo build -Zbuild-std=core,alloc,std,panic_abort -Zbuild-std-features=compiler-builtins-mem --target x86_64-unknown-hermit --release
- name: Test release profile
......@@ -123,8 +146,8 @@ jobs:
|| qemu_status=$?
test $qemu_status -eq 3
test-aarch64:
name: aarch64 tests
run-aarch64:
name: Run RustyHermit (aarch64)
runs-on: ubuntu-latest
steps:
- name: Checkout rusty-hermit
......@@ -154,9 +177,6 @@ jobs:
# Checkout latest tag
git checkout $latestTag
working-directory: loader
- name: Build minimal kernel
working-directory: libhermit-rs
run: cargo xtask build --arch aarch64 --no-default-features
- name: Build dev profile
run: cargo build -Zbuild-std=core,alloc,std,panic_abort -Zbuild-std-features=compiler-builtins-mem --target aarch64-unknown-hermit --package hello_world
- name: Build loader
......
status = [
"x86 tests",
"aarch64 tests",
"Build",
"Check docs",
"Clippy",
"Format",
"Run RustyHermit (aarch64)",
"Run RustyHermit (x86_64)",
"Test",
"ci/gitlab/git.rwth-aachen.de",
]
delete_merged_branches = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment