File tree Expand file tree Collapse file tree 4 files changed +146
-44
lines changed Expand file tree Collapse file tree 4 files changed +146
-44
lines changed Original file line number Diff line number Diff line change 1+ name : Setup
2+ description : Setup environment for CI
3+
4+ inputs :
5+ targets :
6+ description : Comma-separated list of target triples to install for this toolchain
7+ required : false
8+ components :
9+ description : Comma-separated list of components to be additionally installed
10+ required : false
11+
12+ runs :
13+ using : ' composite'
14+ steps :
15+ - shell : bash
16+ run : |
17+ echo $HOME
18+ echo ${{ runner.os }}
19+
20+ - name : Cache APT packages
21+ if : runner.os == 'Linux'
22+ uses : actions/cache@v4
23+ with :
24+ path : |
25+ /var/cache/apt/archives
26+ /var/lib/apt/lists
27+ key : ${{ runner.os }}-apt-${{ hashFiles('.github/actions/setup/apt-packages.txt') }}
28+ restore-keys : |
29+ ${{ runner.os }}-apt-
30+
31+ - name : Update and install APT packages
32+ if : runner.os == 'Linux'
33+ shell : bash
34+ run : |
35+ sudo apt-get update
36+ xargs -a .github/actions/setup/apt-packages.txt sudo apt-get install -y
37+
38+ - uses : dtolnay/rust-toolchain@stable
39+ with :
40+ toolchain : stable
41+ targets : ${{ inputs.targets }}
42+ components : ${{ inputs.components }}
43+
44+ - uses : Swatinem/rust-cache@v2
45+ with :
46+ key : ${{ runner.os }}-${{ inputs.targets }}-rust-cache
Original file line number Diff line number Diff line change 1+ protobuf-compiler
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+
9+ env :
10+ CARGO_TERM_COLOR : always
11+ RUST_BACKTRACE : 1
12+
13+ concurrency :
14+ group : ${{ github.ref }}
15+ cancel-in-progress : true
16+
17+ jobs :
18+ clippy :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+ - uses : ./.github/actions/setup
23+ with :
24+ components : clippy
25+ - run : cargo clippy
26+
27+ unit-test :
28+ runs-on : ubuntu-latest
29+ steps :
30+ - uses : actions/checkout@v4
31+ - uses : ./.github/actions/setup
32+ - run : cargo test
33+
34+ format-check :
35+ runs-on : ubuntu-latest
36+ steps :
37+ - uses : actions/checkout@v4
38+ - uses : ./.github/actions/setup
39+ with :
40+ components : rustfmt
41+ - run : cargo fmt --all -- --check
You can’t perform that action at this time.
0 commit comments