Create devicetree for x86_64 #587
Workflow file for this run
This file contains 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: | |
pull_request: | |
merge_group: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install NASM | |
run: | | |
sudo apt-get update | |
sudo apt-get install nasm | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Clippy | |
run: cargo xtask clippy | |
env: | |
RUSTFLAGS: -Dwarnings | |
fmt: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Check Formatting | |
run: cargo fmt -- --check | |
run: | |
name: Run | |
strategy: | |
matrix: | |
target: [x86_64, x86_64-uefi, x86_64-fc, aarch64, riscv64] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install QEMU, NASM (ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install qemu-system-x86 qemu-system-arm qemu-system-misc nasm | |
- name: Install QEMU, NASM (macos) | |
if: matrix.os == 'macos-latest' | |
run: | | |
# enable once it works again | |
# brew update | |
brew install qemu nasm | |
- name: Install QEMU, NASM (windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
choco install qemu --version=2023.5.31 --checksum64=20d26b460ec045b2cad4bdc4af59713db3110ab95dd73821a590571e4fc1ce1b972e9647867c16e061d1f7381de362ac9c9bfc027f47cdcce8a186818b595ffb | |
echo "C:\Program Files\qemu" >> $GITHUB_PATH | |
choco install nasm | |
echo "C:\Program Files\NASM" >> $GITHUB_PATH | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Install stable Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build | |
run: cargo xtask build --target ${{ matrix.target }} | |
- name: Run loader (x86_64) | |
if: matrix.target == 'x86_64' | |
run: | | |
qemu-system-x86_64 \ | |
-cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ | |
-smp 1 -m 64M \ | |
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \ | |
-display none -serial stdio \ | |
-kernel target/x86_64/debug/hermit-loader \ | |
-initrd data/x86_64/hello_world | |
qemu-system-x86_64 \ | |
-cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ | |
-smp 1 -m 64M \ | |
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \ | |
-display none -serial stdio \ | |
-kernel target/x86_64/debug/hermit-loader \ | |
-initrd data/x86_64/hello_c | |
- name: Run loader (aarch64) | |
if: matrix.target == 'aarch64' | |
run: | | |
qemu-system-aarch64 \ | |
-machine virt,gic-version=3 -cpu cortex-a72 -smp 1 -m 512M \ | |
-display none -serial stdio -semihosting \ | |
-kernel target/aarch64/debug/hermit-loader \ | |
-device guest-loader,addr=0x48000000,initrd=data/aarch64/hello_world | |
- name: Run loader (riscv64) | |
if: matrix.target == 'riscv64' | |
run: | | |
qemu-system-riscv64 \ | |
-machine virt \ | |
-cpu rv64 \ | |
-smp 1 \ | |
-m 32M \ | |
-display none -serial stdio \ | |
-kernel target/riscv64/debug/hermit-loader \ | |
-initrd data/riscv64/hello_world | |
- name: Build (release) | |
run: cargo xtask build --target ${{ matrix.target }} --release | |
- name: Run loader (release, x86_64) | |
if: matrix.target == 'x86_64' | |
run: | | |
qemu-system-x86_64 \ | |
-cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ | |
-smp 1 -m 64M \ | |
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \ | |
-display none -serial stdio \ | |
-kernel target/x86_64/release/hermit-loader \ | |
-initrd data/x86_64/hello_world | |
qemu-system-x86_64 \ | |
-cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ | |
-smp 1 -m 64M \ | |
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \ | |
-display none -serial stdio \ | |
-kernel target/x86_64/release/hermit-loader \ | |
-initrd data/x86_64/hello_c | |
- name: Run loader (release, aarch64) | |
if: matrix.target == 'aarch64' | |
run: | | |
qemu-system-aarch64 \ | |
-machine virt,gic-version=3 -cpu cortex-a72 -smp 1 -m 512M \ | |
-display none -serial stdio -semihosting \ | |
-kernel target/aarch64/release/hermit-loader \ | |
-device guest-loader,addr=0x48000000,initrd=data/aarch64/hello_world | |
- name: Run loader (release, riscv64) | |
if: matrix.target == 'riscv64' | |
run: | | |
qemu-system-riscv64 \ | |
-machine virt \ | |
-cpu rv64 \ | |
-smp 1 \ | |
-m 32M \ | |
-display none -serial stdio \ | |
-kernel target/riscv64/release/hermit-loader \ | |
-initrd data/riscv64/hello_world |