Fix to not specify the rust toolchain version everywhere (#5614)
* Fix to not specify the rust toolchain version everywhere * Fix to source * Fix warning about non-portable option to cp * Fix to use built-in Swatinem/rust-cache * Fix Swatinem/rust-cache to use the right directory
This commit is contained in:
15
.github/workflows/cargo-check.yml
vendored
15
.github/workflows/cargo-check.yml
vendored
@ -19,15 +19,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install latest rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Use correct Rust toolchain
|
||||
shell: bash
|
||||
run: |
|
||||
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||
- name: Install rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85
|
||||
override: true
|
||||
default: true
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2.6.1
|
||||
cache-workspaces: rust
|
||||
|
||||
- name: Run check
|
||||
run: |
|
||||
|
17
.github/workflows/cargo-clippy.yml
vendored
17
.github/workflows/cargo-clippy.yml
vendored
@ -26,16 +26,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: taiki-e/install-action@just
|
||||
- name: Install latest rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Use correct Rust toolchain
|
||||
shell: bash
|
||||
run: |
|
||||
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||
- name: Install rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85
|
||||
override: true
|
||||
default: true
|
||||
components: clippy
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2.6.1
|
||||
cache-workspaces: rust
|
||||
components: clippy
|
||||
|
||||
- name: Run clippy
|
||||
run: |
|
||||
|
17
.github/workflows/cargo-fmt.yml
vendored
17
.github/workflows/cargo-fmt.yml
vendored
@ -28,16 +28,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install latest rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Use correct Rust toolchain
|
||||
shell: bash
|
||||
run: |
|
||||
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||
- name: Install rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85
|
||||
override: true
|
||||
default: true
|
||||
components: rustfmt
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2.6.1
|
||||
cache-workspaces: rust
|
||||
components: rustfmt
|
||||
|
||||
- name: Run cargo fmt
|
||||
run: |
|
||||
|
14
.github/workflows/cargo-test.yml
vendored
14
.github/workflows/cargo-test.yml
vendored
@ -16,12 +16,14 @@ jobs:
|
||||
runs-on: ubuntu-latest-8-cores
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install latest rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Use correct Rust toolchain
|
||||
shell: bash
|
||||
run: |
|
||||
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||
- name: Install rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85
|
||||
override: true
|
||||
default: true
|
||||
cache: false # Configured below.
|
||||
- name: Install vector
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
||||
@ -40,6 +42,8 @@ jobs:
|
||||
- uses: taiki-e/install-action@nextest
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2.6.1
|
||||
with:
|
||||
workspaces: rust
|
||||
- name: cargo test
|
||||
shell: bash
|
||||
run: |-
|
||||
|
@ -69,7 +69,7 @@
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"scripts": {
|
||||
"install:rust": "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85",
|
||||
"install:rust": "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none && source \"$HOME/.cargo/env\" && (cd rust && (rustup show active-toolchain || rustup toolchain install))",
|
||||
"install:rust:windows": "winget install Microsoft.VisualStudio.2022.Community --silent --override \"--wait --quiet --add ProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended\" && winget install Rustlang.Rustup",
|
||||
"install:wasm-pack:sh": ". $HOME/.cargo/env && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y",
|
||||
"install:wasm-pack:cargo": "cargo install wasm-pack",
|
||||
|
Reference in New Issue
Block a user