File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 12
12
matrix :
13
13
mode : [debug, release]
14
14
module : [builtin, loadable]
15
+ outputdir : [src, build]
16
+
17
+ env :
18
+ MAKE_FLAGS : CC=clang-10 LLVM_CONFIG_PATH=llvm-config-10 -j3
15
19
16
20
steps :
17
21
# Setup
@@ -26,12 +30,21 @@ jobs:
26
30
- run : cp .github/workflows/kernel-${{ matrix.mode }}.config .config
27
31
- if : matrix.module == 'loadable'
28
32
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
30
40
31
41
# Run
32
42
- if : matrix.module == 'builtin'
33
43
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
35
48
- 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
36
49
37
50
# Check
You can’t perform that action at this time.
0 commit comments