Skip to content

Commit 779da7c

Browse files
Merge pull request #14 from JeromeSchmied/ci
ci
2 parents 5a20411 + 3612829 commit 779da7c

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

.github/workflows/rust.yml

+35-9
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,47 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ["main"]
88

99
env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
1313
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
1624

1725
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*

0 commit comments

Comments
 (0)