-
Notifications
You must be signed in to change notification settings - Fork 17
Utilize GitHub Actions for building and running via QEMU #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase the latest main
branch.
.github/workflows/ci.yml
Outdated
- name: Setup RISC-V Toolchain | ||
run: .ci/setup-toolchain.sh | ||
|
||
- name: Verify toolchain installation | ||
run: | | ||
riscv32-unknown-elf-gcc --version | ||
qemu-system-riscv32 --version | ||
env: | ||
CROSS_COMPILE: riscv32-unknown-elf- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate with LLVM based toolchains as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this project support LLVM/Clang ?
I think the makefile and the /arch/riscv/build.mk does not support LLVM/Clang.
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
AR = $(CROSS_COMPILE)ar
DUMP = $(CROSS_COMPILE)objdump
LDFLAGS = -melf32lriscv --gc-sections
ASFLAGS = -march=rv32imzicsr -mabi=ilp32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this project support LLVM/Clang ? I think the makefile and the /arch/riscv/build.mk does not support LLVM/Clang.
Send a pull request for flexible CROSS_COMPILE
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
work in progress.
There should be only a commit, discarding unrelated ones. |
Already.
Sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check https://cbea.ms/git-commit/ carefully and rework git commit messages.
761c4b2
to
bdf027c
Compare
.github/workflows/ci.yml
Outdated
|
||
on: | ||
push: | ||
branches: [main, ci] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is 'ci' branch ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That ci branch was my temporary testing branch.
I've updated the workflow so the CI runs on all branches by default.
.ci/setup-toolchain.sh
Outdated
#!/bin/bash | ||
set -e | ||
|
||
URL="https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.06.13/riscv32-elf-ubuntu-22.04-gcc-nightly-2025.06.13-nightly.tar.xz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I know the reason why you download ubuntu-22.04
toolchain ?
Since your runner is ubuntu-24.04
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the same problem while working on LLVM support, so I temporarily included the updated setup-toolchain.sh
with LLVM support in this PR.
Please have a look.
Introduce GitHub Actions-based CI that builds the kernel using the GNU RISC-V toolchain and runs selected apps (e.g., cpubench) in QEMU. Results are extracted and posted to PRs. Toolchain setup, build, and QEMU test logic are modularized into scripts in .ci/. Features: - Support multiple apps per run - CI comments results on PR automatically - Timeout prevents hangs Limitations: - Currently GNU-only (LLVM WIP) - cpubench doesn't exit cleanly due to preemptive mode Fixes: #2 Supersedes: sysprog21#11
Fixes #2
Improves upon PR: #11
This PR introduces a GitHub Actions CI workflow that:
Features:
run-qemu-tests.sh
Limitations:
→ Need a more standardized test app in future