File tree Expand file tree Collapse file tree 2 files changed +70
-1
lines changed Expand file tree Collapse file tree 2 files changed +70
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ pull_request :
6
+
7
+ env :
8
+ qemu_version : 7.0.0
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-20.04
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+ - uses : actions-rs/toolchain@v1
16
+ with :
17
+ profile : minimal
18
+ toolchain : nightly
19
+ components : rustfmt, clippy
20
+ target : riscv64imac-unknown-none-elf
21
+ - name : Check format
22
+ uses : actions-rs/cargo@v1
23
+ with :
24
+ command : fmt
25
+ args : --all -- --check
26
+ - name : Clippy
27
+ uses : actions-rs/cargo@v1
28
+ with :
29
+ command : clippy
30
+
31
+ test :
32
+ runs-on : ubuntu-20.04
33
+ steps :
34
+ - uses : actions/checkout@v3
35
+ - uses : actions-rs/toolchain@v1
36
+ with :
37
+ profile : minimal
38
+ toolchain : nightly
39
+ components : llvm-tools-preview
40
+ target : riscv64imac-unknown-none-elf
41
+
42
+ - name : Cache QEMU
43
+ id : cache-qemu
44
+ uses : actions/cache@v3
45
+ with :
46
+ path : qemu-${{ env.qemu_version }}
47
+ key : qemu-${{ env.qemu_version }}
48
+
49
+ - name : Install ninja-build
50
+ run : sudo apt-get update && sudo apt-get install -y ninja-build
51
+
52
+ - name : Download and Compile QEMU
53
+ if : steps.cache-qemu.outputs.cache-hit != 'true'
54
+ run : |
55
+ wget https://download.qemu.org/qemu-${{ env.qemu_version }}.tar.xz
56
+ tar xf qemu-${{ env.qemu_version }}.tar.xz
57
+ cd qemu-${{ env.qemu_version }}
58
+ ./configure --target-list=riscv64-softmmu
59
+ make -j
60
+
61
+ - name : Install QEMU
62
+ run : |
63
+ cd qemu-${{ env.qemu_version }} && sudo make install
64
+ qemu-system-riscv64 --version
65
+
66
+ - name : Test
67
+ uses : actions-rs/cargo@v1
68
+ with :
69
+ command : test
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ impl AsmArgs {
143
143
} else {
144
144
self . build . dir ( ) . join ( "rustsbi-qemu" )
145
145
} ;
146
- let out = PROJECT_DIR . join ( self . output . clone ( ) . unwrap_or ( format ! (
146
+ let out = PROJECT_DIR . join ( self . output . unwrap_or ( format ! (
147
147
"{}.asm" ,
148
148
bin. file_stem( ) . unwrap( ) . to_string_lossy( )
149
149
) ) ) ;
You can’t perform that action at this time.
0 commit comments