-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fix build failures and expand test coverage #535
Changes from all commits
75d3725
6c8728d
9747560
6fa2dd4
30eca0e
8de334b
3aa33ec
36c8123
c5838e3
027b035
7409812
1b6d1c1
5d6795b
b95f752
0e5dbdd
872dd60
bd81cc4
d8f5cff
d320440
9a0ce5a
9b10a79
dced99b
6d2ca02
7384d92
2ca5dcc
f71f435
01f2328
3e0dd5a
25b9ac0
2c16b2c
ad7f3b9
740b601
1bb3cdf
eb9ea7b
61176c0
004180a
be10551
99c52b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,10 @@ jobs: | |
host-x64: | ||
needs: [detect-code-related-file-changes] | ||
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: [gcc, clang] | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -49,47 +53,95 @@ jobs: | |
sudo chmod +x ./llvm.sh | ||
sudo ./llvm.sh 18 | ||
shell: bash | ||
- name: Install compiler | ||
id: install_cc | ||
uses: rlalik/setup-cpp-compiler@master | ||
with: | ||
compiler: ${{ matrix.compiler }} | ||
- name: default build | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: make -j$(nproc) | ||
if: ${{ always() }} | ||
- name: check + tests | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: | | ||
make clean | ||
make check -j$(nproc) | ||
make tests -j$(nproc) | ||
make misalign -j$(nproc) | ||
make tool -j$(nproc) | ||
if: ${{ always() }} | ||
- name: diverse configurations | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: | | ||
make distclean && make ENABLE_EXT_M=0 check -j$(nproc) | ||
make distclean && make ENABLE_EXT_A=0 check -j$(nproc) | ||
make distclean && make ENABLE_EXT_F=0 check -j$(nproc) | ||
make distclean && make ENABLE_EXT_C=0 check -j$(nproc) | ||
make distclean && make ENABLE_SDL=0 check -j$(nproc) | ||
make distclean && make ENABLE_Zicsr=0 check -j$(nproc) | ||
make distclean && make ENABLE_MOP_FUSION=0 check -j$(nproc) | ||
make distclean && make ENABLE_BLOCK_CHAINING=0 check -j$(nproc) | ||
make distclean && make ENABLE_Zba=0 check -j$(nproc) | ||
make distclean && make ENABLE_Zbb=0 check -j$(nproc) | ||
make distclean && make ENABLE_Zbc=0 check -j$(nproc) | ||
make distclean && make ENABLE_Zbs=0 check -j$(nproc) | ||
make distclean && make ENABLE_Zifencei=0 check -j$(nproc) | ||
if: ${{ always() }} | ||
- name: misalignment test in block emulation | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: | | ||
make -C tests/system/alignment/ | ||
make distclean && make ENABLE_ELF_LOADER=1 ENABLE_EXT_C=0 ENABLE_SYSTEM=1 misalign-in-blk-emu -j$(nproc) | ||
if: ${{ always() }} | ||
- name: MMU test | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: | | ||
make -C tests/system/mmu/ | ||
make distclean && make ENABLE_ELF_LOADER=1 ENABLE_SYSTEM=1 mmu-test -j$(nproc) | ||
if: ${{ always() }} | ||
- name: gdbstub test | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: | | ||
make distclean && make ENABLE_GDBSTUB=1 gdbstub-test -j$(nproc) | ||
if: ${{ always() }} | ||
- name: JIT test | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: | | ||
make ENABLE_JIT=1 clean && make ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_EXT_A=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_EXT_F=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_EXT_C=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_EXT_M=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_Zba=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_Zbb=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_Zbc=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_Zbs=0 ENABLE_JIT=1 check -j$(nproc) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about repeating all diverse configuration tests with JIT enabled? |
||
make ENABLE_JIT=1 clean && make ENABLE_Zicsr=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_Zifencei=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_MOP_FUSION=0 ENABLE_JIT=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_BLOCK_CHAINING=0 ENABLE_JIT=1 check -j$(nproc) | ||
if: ${{ always() }} | ||
- name: undefined behavior test | ||
run: | | ||
make clean && make ENABLE_UBSAN=1 check -j$(nproc) | ||
make ENABLE_JIT=1 clean && make ENABLE_JIT=1 ENABLE_UBSAN=1 check -j$(nproc) | ||
if: ${{ always() }} | ||
- name: boot Linux kernel test | ||
env: | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
run: | | ||
make clean && make ENABLE_SYSTEM=1 && make ENABLE_SYSTEM=1 artifact -j$(nproc) | ||
.ci/boot-linux.sh | ||
make ENABLE_SYSTEM=1 clean | ||
if: ${{ always() }} | ||
|
||
host-arm64: | ||
needs: [detect-code-related-file-changes] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ BIN := $(OUT)/rv32emu | |
CONFIG_FILE := $(OUT)/.config | ||
-include $(CONFIG_FILE) | ||
|
||
CFLAGS = -std=gnu99 -O2 -Wall -Wextra | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we are modifying this, do we also want to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this depends on whether our coding style aims to forbid local variables from shadowing other variables? |
||
CFLAGS = -std=gnu99 -O2 -Wall -Wextra -Werror | ||
CFLAGS += -Wno-unused-label | ||
CFLAGS += -include src/common.h -Isrc/ | ||
|
||
|
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.
Maybe also add:
make distclean && make ENABLE_Zifencei=0 check -j$(nproc)