File tree 1 file changed +35
-9
lines changed
1 file changed +35
-9
lines changed Original file line number Diff line number Diff line change @@ -2,21 +2,47 @@ name: Rust
2
2
3
3
on :
4
4
push :
5
- branches : [ "main" ]
5
+ branches : ["main"]
6
6
pull_request :
7
- branches : [ "main" ]
7
+ branches : ["main"]
8
8
9
9
env :
10
10
CARGO_TERM_COLOR : always
11
11
12
12
jobs :
13
13
build :
14
-
15
- runs-on : ubuntu-latest
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ matrix :
17
+ include :
18
+ - os : macos-14
19
+ target : aarch64-apple-darwin
20
+ - os : ubuntu-latest
21
+ target : x86_64-unknown-linux-gnu
22
+ - os : windows-latest
23
+ target : x86_64-pc-windows-msvc
16
24
17
25
steps :
18
- - uses : actions/checkout@v3
19
- - name : Build
20
- run : cargo build --verbose
21
- - name : Run tests
22
- run : cargo test --verbose
26
+ - name : Checkout repository
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Cache dependencies
30
+ uses : swatinem/rust-cache@v2
31
+
32
+ - name : Build
33
+ uses : ClementTsang/cargo-action@v0.0.6
34
+ with :
35
+ args : --release --target ${{ matrix.target }} --verbose
36
+ command : build
37
+
38
+ - name : Run tests
39
+ uses : ClementTsang/cargo-action@v0.0.6
40
+ with :
41
+ args : --target ${{ matrix.target }} --verbose
42
+ command : test
43
+
44
+ - name : Upload executable
45
+ uses : actions/upload-artifact@v4
46
+ with :
47
+ name : cgol-tui-${{ matrix.os }}
48
+ path : target/${{ matrix.target }}/release/cgol-tui*
You can’t perform that action at this time.
0 commit comments