Skip to content

Commit f73da9a

Browse files
committed
updated rust CI action
1 parent 0dfe49b commit f73da9a

1 file changed

Lines changed: 38 additions & 7 deletions

File tree

.github/workflows/rust.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,42 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- name: lint
18-
run: cargo clippy --fix
19-
- name: format
17+
- uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: clippy
20+
- name: Install system dependencies
21+
run: |
22+
sudo apt update
23+
sudo apt install -y pkg-config \
24+
libhdf5-dev \
25+
libhdf5-openmpi-dev \
26+
libnetcdf-dev \
27+
zlib1g-dev
28+
pkg-config --modversion hdf5
29+
pkg-config --modversion netcdf || true
30+
- uses: actions/cache@v4
31+
with:
32+
path: |
33+
~/.cargo/registry
34+
~/.cargo/git
35+
target
36+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37+
restore-keys: ${{ runner.os }}-cargo-
38+
39+
- name: Test
40+
run: cargo test --workspace --all-features --locked --verbose
41+
42+
- name: Lint
43+
run: cargo clippy --workspace --all-features -- -D warnings
44+
- name: Format
2045
run: cargo fmt --all
21-
- name: Build
22-
run: cargo build
23-
- name: Run tests
24-
run: cargo test
46+
47+
# - name: lint
48+
# run: cargo clippy --fix
49+
# - name: format
50+
# run: cargo fmt --all
51+
# - name: Build
52+
# run: cargo build
53+
# - name: Run tests
54+
# run: cargo test
55+

0 commit comments

Comments
 (0)