Skip to content

Commit 66dbdfb

Browse files
authored
Use standard action to install rust. See #5937 (#5967)
1 parent bbc5542 commit 66dbdfb

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,9 @@ jobs:
6868
- quickwit/**/*.proto
6969
- quickwit/rest-api-tests/**
7070
- .github/workflows/ci.yml
71-
# The following step is just meant to install rustup actually.
72-
# The next one installs the correct toolchain.
73-
- name: Install rustup
74-
if: steps.modified.outputs.rust_src == 'true'
75-
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
7671
- name: Setup stable Rust Toolchain
7772
if: steps.modified.outputs.rust_src == 'true'
78-
run: rustup show active-toolchain || rustup toolchain install
79-
working-directory: ./quickwit
73+
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # stable
8074
- name: Setup cache
8175
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
8276
if: steps.modified.outputs.rust_src == 'true'
@@ -126,17 +120,15 @@ jobs:
126120
- .github/workflows/ci.yml
127121
- name: Install Ubuntu packages
128122
if: always() && steps.modified.outputs.rust_src == 'true'
129-
run: sudo apt-get -y install protobuf-compiler python3 python3-pip
130-
- name: Install rustup
131-
if: steps.modified.outputs.rust_src == 'true'
132-
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
123+
run: sudo apt-get -y install protobuf-compiler
133124
- name: Setup nightly Rust Toolchain (for rustfmt)
134125
if: steps.modified.outputs.rust_src == 'true'
135-
run: rustup toolchain install nightly
126+
uses: dtolnay/rust-toolchain@55d80eb3c5a4228eec5390a083c092095115c6f1 # nightly
127+
with:
128+
components: rustfmt
136129
- name: Setup stable Rust Toolchain
137130
if: steps.modified.outputs.rust_src == 'true'
138-
run: rustup show active-toolchain || rustup toolchain install
139-
working-directory: ./quickwit
131+
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # stable
140132
- name: Setup cache
141133
if: steps.modified.outputs.rust_src == 'true'
142134
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1

.github/workflows/ui-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
- name: Cypress run
3232
command: |
3333
sudo apt-get -y install protobuf-compiler
34-
rustup show active-toolchain || rustup toolchain install
3534
CI=false yarn --cwd quickwit-ui build
3635
RUSTFLAGS="--cfg tokio_unstable" cargo build --features=postgres
3736
mkdir qwdata
@@ -70,8 +69,8 @@ jobs:
7069
node-version: 20
7170
cache: "yarn"
7271
cache-dependency-path: quickwit/quickwit-ui/yarn.lock
73-
- name: Install rustup
74-
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
72+
- name: Setup stable Rust Toolchain
73+
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # stable
7574
- name: Install JS dependencies
7675
run: yarn --cwd quickwit-ui install
7776
working-directory: ./quickwit

0 commit comments

Comments
 (0)