Skip to content

Commit

Permalink
Upgrade to the actions-rust-lang/setup-rust-toolchain action. (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi authored Oct 10, 2023
1 parent 8bd2479 commit d00f0a1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 42 deletions.
46 changes: 17 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ jobs:
with:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
- name: Install rust + caching
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Set up python
id: setup-python
Expand Down Expand Up @@ -150,15 +148,11 @@ jobs:
with:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable
- name: Install rust + caching
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- uses: r7kamura/rust-problem-matchers@v1

- name: cargo clippy
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings --allow deprecated

Expand All @@ -179,10 +173,8 @@ jobs:
with:
persist-credentials: true

- name: Install rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
- name: Install rust + caching
uses: actions-rust-lang/setup-rust-toolchain@v1

# Test all crates except trustfall_stubgen,
# which is only tested if it has changed since its tests are a bit long.
Expand Down Expand Up @@ -215,17 +207,15 @@ jobs:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
cache: false

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
./trustfall_core/fuzz
- uses: r7kamura/rust-problem-matchers@v1

- name: cargo clippy
run: |
cd trustfall_core/fuzz
Expand Down Expand Up @@ -253,17 +243,15 @@ jobs:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
cache: false

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
./experiments/trustfall_rustdoc
- uses: r7kamura/rust-problem-matchers@v1

- name: cargo clippy
run: |
cd experiments/trustfall_rustdoc
Expand Down Expand Up @@ -294,10 +282,8 @@ jobs:
with:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
- name: Install rust + caching
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
Expand Down Expand Up @@ -357,8 +343,8 @@ jobs:
with:
persist-credentials: false

- name: Install rust # necessary for `npm run build:wasm` later
uses: dtolnay/rust-toolchain@stable
- name: Install rust + caching # necessary for `npm run build:wasm` later
uses: actions-rust-lang/setup-rust-toolchain@v1

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -396,7 +382,9 @@ jobs:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: Publishing?
id: version
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: cargo update
# Remove first line that always just says "Updating crates.io index"
Expand Down Expand Up @@ -171,7 +173,9 @@ jobs:
persist-credentials: false

- name: Install rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: cargo update
# Remove first line that always just says "Updating crates.io index"
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/publish-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: Show python version
run: |
python --version
Expand Down Expand Up @@ -120,7 +122,9 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: Show python version
run: |
python --version
Expand Down Expand Up @@ -155,6 +159,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: Show python version
run: |
python3 --version
Expand Down Expand Up @@ -227,8 +235,6 @@ jobs:
with:
persist-credentials: false

- uses: Swatinem/rust-cache@v2

- id: check
run: |
set +e
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/publish-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
persist-credentials: true

- name: Install rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: Tag the version
run: |
Expand All @@ -57,8 +57,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2

- id: check
run: |
set +e
Expand All @@ -84,8 +82,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2

- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v1
with:
Expand Down

0 comments on commit d00f0a1

Please sign in to comment.