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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install latest rust
|
- name: Use correct Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.85
|
cache-workspaces: rust
|
||||||
override: true
|
|
||||||
default: true
|
|
||||||
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check
|
||||||
run: |
|
run: |
|
||||||
|
17
.github/workflows/cargo-clippy.yml
vendored
17
.github/workflows/cargo-clippy.yml
vendored
@ -26,16 +26,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: taiki-e/install-action@just
|
- uses: taiki-e/install-action@just
|
||||||
- name: Install latest rust
|
- name: Use correct Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.85
|
cache-workspaces: rust
|
||||||
override: true
|
components: clippy
|
||||||
default: true
|
|
||||||
components: clippy
|
|
||||||
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: |
|
run: |
|
||||||
|
17
.github/workflows/cargo-fmt.yml
vendored
17
.github/workflows/cargo-fmt.yml
vendored
@ -28,16 +28,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install latest rust
|
- name: Use correct Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.85
|
cache-workspaces: rust
|
||||||
override: true
|
components: rustfmt
|
||||||
default: true
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
|
|
||||||
- name: Run cargo fmt
|
- name: Run cargo fmt
|
||||||
run: |
|
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
|
runs-on: ubuntu-latest-8-cores
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install latest rust
|
- name: Use correct Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cp --update=none rust/rust-toolchain.toml ./ || true
|
||||||
|
- name: Install rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.85
|
cache: false # Configured below.
|
||||||
override: true
|
|
||||||
default: true
|
|
||||||
- name: Install vector
|
- name: Install vector
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev > /tmp/vector.sh
|
||||||
@ -40,6 +42,8 @@ jobs:
|
|||||||
- uses: taiki-e/install-action@nextest
|
- uses: taiki-e/install-action@nextest
|
||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
uses: Swatinem/rust-cache@v2.6.1
|
||||||
|
with:
|
||||||
|
workspaces: rust
|
||||||
- name: cargo test
|
- name: cargo test
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |-
|
run: |-
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
"yargs": "^17.7.2"
|
"yargs": "^17.7.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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: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: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",
|
"install:wasm-pack:cargo": "cargo install wasm-pack",
|
||||||
|
Reference in New Issue
Block a user