Skip to content

Commit

Permalink
ci: Use swatinem/rust-cache@v2 in all CI workflows. (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
jetuk authored Aug 1, 2024
1 parent ba8e5ea commit a0b942a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Deploy book
on:
# Deploy the book when the Rust (Linux) workflow completes on main
workflow_run:
workflows: ["Rust (Linux)"]
branches: [main]
workflows: [ "Rust (Linux)" ]
branches: [ main ]
types:
- completed

Expand All @@ -18,6 +18,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: swatinem/rust-cache@v2
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: swatinem/rust-cache@v2
- name: Run Clippy
run: cargo clippy --all-targets --features highs,cbc --all --exclude ipm-simd
- name: Install latest mdbook
Expand All @@ -44,6 +45,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose --no-default-features --package [email protected]
- name: Run tests
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -98,6 +99,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: swatinem/rust-cache@v2
- name: Run Clippy
run: cargo clippy --all-targets --features highs,cbc
- name: Build
Expand Down

0 comments on commit a0b942a

Please sign in to comment.