File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99jobs :
1010 build-and-test :
1111 runs-on : ubuntu-latest
12- strategy :
13- matrix :
14- target : [ "x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu" ]
1512 steps :
13+ # 1. Checkout repo
1614 - name : Checkout code
1715 uses : actions/checkout@v3
1816
17+ # 2. Setup Rust stable
1918 - name : Setup Rust
2019 uses : actions-rs/toolchain@v1
2120 with :
2221 toolchain : stable
2322 override : true
2423
25- - name : Cache cargo registry and build
26- uses : actions/cache@v3
27- with :
28- path : |
29- ~/.cargo/registry
30- ~/.cargo/git
31- target
32- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
33- restore-keys : |
34- ${{ runner.os }}-cargo-
35-
36- - name : Add Rust target
37- run : rustup target add ${{ matrix.target }}
38-
39- - name : Build project
40- run : cargo build --release --target ${{ matrix.target }}
24+ # 3. Build release binary
25+ - name : Build pmcli
26+ run : cargo build --release
4127
28+ # 4. Run tests
4229 - name : Run tests
43- run : cargo test --all --release --target ${{ matrix.target }}
30+ run : cargo test --all --release
4431
45- - name : Check formatting
32+ # 5. Check formatting
33+ - name : Check code formatting
4634 run : cargo fmt --all -- --check
4735
48- - name : Lint code
36+ # 6. Lint code
37+ - name : Lint with Clippy
4938 run : cargo clippy --all-targets --all-features -- -D warnings
50-
51- - name : Upload release binary (optional)
52- if : github.event_name == 'push'
53- uses : actions/upload-artifact@v3
54- with :
55- name : pmcli-${{ matrix.target }}
56- path : target/${{ matrix.target }}/release/pmcli
You can’t perform that action at this time.
0 commit comments