Skip to content

Commit 112377c

Browse files
committed
Update dependencies, rewrite build scripts
1 parent ef22b6b commit 112377c

8 files changed

Lines changed: 383 additions & 355 deletions

File tree

.github/workflows/rust.yml

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,31 @@ on:
88

99
jobs:
1010
build:
11-
name: build
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
os: [macos-latest, ubuntu-latest]
11+
runs-on: ubuntu-22.04
1712
steps:
18-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up cargo cache
16+
uses: actions/cache@v3
17+
continue-on-error: false
18+
with:
19+
path: |
20+
~/.cargo/bin/
21+
~/.cargo/registry/index/
22+
~/.cargo/registry/cache/
23+
~/.cargo/git/db/
24+
target/
25+
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
26+
restore-keys: ${{ runner.os }}-cargo-release-
27+
1928
- name: Build
20-
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
29+
run: cargo build --release --verbose
30+
31+
- name: Upload binary
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: bin
35+
path: target/release/rshijack
2336

2437
cross:
2538
runs-on: ubuntu-latest
@@ -68,18 +81,36 @@ jobs:
6881
name: rshijack-${{ matrix.arch.name }}
6982
path: target/${{ matrix.arch.name }}/release/rshijack
7083

71-
clippy:
72-
name: clippy
73-
runs-on: ubuntu-latest
84+
unit-test:
85+
runs-on: ${{ matrix.os }}
86+
strategy:
87+
fail-fast: false
88+
matrix:
89+
os: [macos-latest, ubuntu-22.04]
7490
steps:
75-
- uses: actions/checkout@v2
76-
- uses: actions-rs/toolchain@v1
77-
with:
78-
profile: minimal
79-
toolchain: stable
80-
override: true
81-
components: clippy
82-
- uses: actions-rs/cargo@v1
91+
- uses: actions/checkout@v3
92+
93+
- name: Set up cargo cache
94+
uses: actions/cache@v3
95+
continue-on-error: false
8396
with:
84-
command: clippy
85-
args: --workspace --tests -- --deny warnings
97+
path: |
98+
~/.cargo/bin/
99+
~/.cargo/registry/index/
100+
~/.cargo/registry/cache/
101+
~/.cargo/git/db/
102+
target/
103+
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
104+
restore-keys: ${{ runner.os }}-cargo-debug-
105+
106+
- name: Run clippy
107+
run: cargo clippy -- -D warnings
108+
- name: Run tests
109+
run: cargo test --verbose
110+
111+
fmt:
112+
runs-on: ubuntu-22.04
113+
steps:
114+
- uses: actions/checkout@v3
115+
- name: Run cargo fmt
116+
run: cargo fmt --all -- --check

0 commit comments

Comments
 (0)