Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
- defconfig
- defconfig+debug

backend:
- gcc
- llvm

output:
- src
# subdir
Expand Down Expand Up @@ -108,7 +112,8 @@ jobs:
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

# Setup: `rustc_codegen_gcc`.
- run: |
- if: matrix.backend == 'gcc'
run: |
sudo apt-get -y --no-install-recommends purge cpp gcc
curl --proto '=https' --tlsv1.2 -sSfLO https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
sudo dpkg -i gcc-15.deb
Expand All @@ -123,7 +128,6 @@ jobs:

echo "MAKE_KRUSTFLAGS=KRUSTFLAGS=-Zcodegen-backend=$(pwd)/rustc_codegen_gcc/target/release/librustc_codegen_gcc.so" >> $GITHUB_ENV


cd rustc_codegen_gcc
echo 'gcc-path = "/usr/lib"' > config.toml
#sed -i '/channel/d' rust-toolchain
Expand Down Expand Up @@ -181,13 +185,20 @@ jobs:
${{ env.OUTPUT_DIR }}vmlinux

# Check `.comment` section.
- run: |
- if: matrix.backend == 'gcc'
run: |
readelf --string-dump .comment ${{ env.OUTPUT_DIR }}rust/core.o
objcopy --dump-section .comment=comment ${{ env.OUTPUT_DIR }}rust/core.o
grep --text "^.rustc version .* with libgccjit" comment
grep --text 'libgccjit' comment
grep --text 'GCC: ' comment

- if: matrix.backend == 'llvm'
run: |
readelf --string-dump .comment ${{ env.OUTPUT_DIR }}rust/core.o
objcopy --dump-section .comment=comment ${{ env.OUTPUT_DIR }}rust/core.o
grep --text "^.rustc version" comment

# Prepare image.
- run: ${{ env.OUTPUT_DIR }}usr/gen_init_cpio ci/qemu-initramfs.desc > qemu-initramfs.img

Expand Down Expand Up @@ -232,7 +243,7 @@ jobs:
grep '] rust_print: Info message (level 6) with args$' qemu-stdout
grep '] rust_print: A line that is continued with args$' qemu-stdout

- run: grep '] ok 4 rust_doctests_kernel$' qemu-stdout
- run: grep '] ok 7 rust_doctests_kernel$' qemu-stdout

- run: python ci/check_panics.py qemu-stdout

Expand Down
Loading