Skip to content

Commit 0fec426

Browse files
committed
CI: test O= builds too
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 2874653 commit 0fec426

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/ci.yaml

+15-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
matrix:
1313
mode: [debug, release]
1414
module: [builtin, loadable]
15+
outputdir: [src, build]
16+
17+
env:
18+
MAKE_FLAGS: CC=clang-10 LLVM_CONFIG_PATH=llvm-config-10 -j3
1519

1620
steps:
1721
# Setup
@@ -26,12 +30,21 @@ jobs:
2630
- run: cp .github/workflows/kernel-${{ matrix.mode }}.config .config
2731
- if: matrix.module == 'loadable'
2832
run: sed -i -E 's/^(CONFIG_RUST_EXAMPLE=)(y)$/\1m/g' .config
29-
- run: make CC=clang-10 LLVM_CONFIG_PATH=llvm-config-10 -j3
33+
- if: matrix.outputdir == 'src'
34+
run: make ${MAKE_FLAGS}
35+
- if: matrix.outputdir == 'build'
36+
run: |
37+
mkdir build
38+
mv .config build/.config
39+
make ${MAKE_FLAGS} O=build
3040
3141
# Run
3242
- if: matrix.module == 'builtin'
3343
run: sed -i '/rust_example/d' .github/workflows/qemu-initramfs.desc
34-
- run: usr/gen_init_cpio .github/workflows/qemu-initramfs.desc > qemu-initramfs.img
44+
- if: matrix.outputdir == 'src'
45+
run: usr/gen_init_cpio .github/workflows/qemu-initramfs.desc > qemu-initramfs.img
46+
- if: matrix.outputdir == 'build'
47+
run: build/usr/gen_init_cpio .github/workflows/qemu-initramfs.desc > qemu-initramfs.img
3548
- run: qemu-system-x86_64 -kernel arch/x86/boot/bzImage -initrd qemu-initramfs.img -cpu Cascadelake-Server -smp 2 -append "console=ttyS0 ${{ matrix.module == 'builtin' && 'rust_example.my_i32=123321' || '' }}" -nographic -no-reboot | tee qemu-stdout.log
3649

3750
# Check

0 commit comments

Comments
 (0)