Skip to content

Commit

Permalink
Configure CI to run Mirage tests
Browse files Browse the repository at this point in the history
This commit configures the CI to run `just test` on each PR for the main
branch.
  • Loading branch information
CharlyCst committed Jan 21, 2024
1 parent d216e20 commit 025ea2b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
branches: [ "main", "ci" ]
pull_request:
branches: [ "main", "ci" ]

env:
CARGO_TERM_COLOR: always

jobs:
Mirage:
runs-on: ubuntu-22.04
env:
RUSTFLAGS: --deny warnings
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1 # Install `just`
- name: Setup
run: just install-toolchain
- name: Test
run: just test

6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,11 @@ run-dbg:
gdb:
rust-gdb {{mirage_elf}} -q -x "./config/setup.gdb"

# Install the rust toolchain and required components
install-toolchain:
rustup toolchain install $(cat rust-toolchain)
rustup component add rust-src --toolchain "$(cat rust-toolchain)"
rustup component add llvm-tools-preview --toolchain "$(cat rust-toolchain)"

# The following line gives highlighting on vim
# vim: set ft=make :
2 changes: 1 addition & 1 deletion payloads/csr_ops/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn test_csr_op(regs: &[(usize, usize, usize)]) {
check_csrrs(*in_rs1, *in_csr, out_csr, out_rd);
}
// CSRRWI
for (in_rd, in_rs1, in_csr) in regs {
for (in_rd, _, in_csr) in regs {
let (out_csr, out_rd) = unsafe { csrrwi(*in_csr, *in_rd) };
check_csrrwi(*in_csr, out_csr, out_rd);
}
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly-2023-12-22

0 comments on commit 025ea2b

Please sign in to comment.