Skip to content

Commit cc88875

Browse files
committed
CI: replace with dtolnay actions
1 parent 815dcf9 commit cc88875

File tree

1 file changed

+32
-28
lines changed

1 file changed

+32
-28
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ jobs:
2626
sudo apt update
2727
sudo apt install -y protobuf-compiler
2828
- name: Setup Rust
29-
run: |
30-
# Nightly to be able to use `--report-time` below
31-
rustup install nightly
32-
rustup override set nightly
29+
uses: dtolnay/rust-toolchain@stable
30+
with:
31+
toolchain: nightly
3332
- name: Download circuits files
3433
run: |
3534
make download-circuits
@@ -50,10 +49,9 @@ jobs:
5049
sudo apt update
5150
sudo apt install -y protobuf-compiler
5251
- name: Setup Rust
53-
run: |
54-
# Nightly to be able to use `--report-time` below
55-
rustup install nightly
56-
rustup override set nightly
52+
uses: dtolnay/rust-toolchain@stable
53+
with:
54+
toolchain: nightly
5755
- name: Download circuits files
5856
run: |
5957
make download-circuits
@@ -81,10 +79,9 @@ jobs:
8179
sudo apt update
8280
sudo apt install -y protobuf-compiler
8381
- name: Setup Rust
84-
run: |
85-
# Nightly to be able to use `--report-time` below
86-
rustup install nightly
87-
rustup override set nightly
82+
uses: dtolnay/rust-toolchain@stable
83+
with:
84+
toolchain: nightly
8885
- name: Build vrf tests
8986
run: |
9087
make build-vrf
@@ -104,9 +101,10 @@ jobs:
104101
sudo apt install -y protobuf-compiler
105102
106103
- name: Setup Rust
107-
run: |
108-
rustup default 1.84
109-
rustup component add rustfmt
104+
uses: dtolnay/rust-toolchain@stable
105+
with:
106+
components: rustfmt
107+
toolchain: 1.84
110108

111109
- name: Setup Rust Cache
112110
uses: Swatinem/rust-cache@v2
@@ -129,9 +127,10 @@ jobs:
129127
sudo apt install -y protobuf-compiler
130128
131129
- name: Setup Rust
132-
run: |
133-
rustup default 1.84
134-
rustup component add rustfmt
130+
uses: dtolnay/rust-toolchain@stable
131+
with:
132+
components: rustfmt
133+
toolchain: 1.84
135134

136135
- name: Setup Rust Cache
137136
uses: Swatinem/rust-cache@v2
@@ -160,9 +159,13 @@ jobs:
160159
sudo apt install -y protobuf-compiler
161160
162161
- name: Setup Rust
162+
uses: dtolnay/rust-toolchain@stable
163+
with:
164+
components: rustfmt, rust-src
165+
toolchain: nightly
166+
167+
- name: Install wasm32 and wasm-bindgen-cli
163168
run: |
164-
rustup default nightly
165-
rustup component add rustfmt rust-src
166169
rustup target add wasm32-unknown-unknown
167170
cargo install -f wasm-bindgen-cli --version 0.2.99
168171
@@ -173,7 +176,6 @@ jobs:
173176

174177
- name: Release build
175178
run: |
176-
rustup component add rust-src rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
177179
make build-wasm
178180
179181
build-tests:
@@ -187,10 +189,11 @@ jobs:
187189
sudo apt update
188190
sudo apt install -y protobuf-compiler
189191
190-
- name: Setup Rust
191-
run: |
192-
rustup default 1.84
193-
rustup component add rustfmt
192+
- name: Setup Rust
193+
uses: dtolnay/rust-toolchain@stable
194+
with:
195+
components: rustfmt
196+
toolchain: 1.84
194197

195198
- name: Setup Rust Cache
196199
uses: Swatinem/rust-cache@v2
@@ -224,9 +227,10 @@ jobs:
224227
sudo apt install -y protobuf-compiler
225228
226229
- name: Setup Rust
227-
run: |
228-
rustup default 1.84
229-
rustup component add rustfmt
230+
uses: dtolnay/rust-toolchain@stable
231+
with:
232+
components: rustfmt
233+
toolchain: 1.84
230234

231235
- name: Setup Rust Cache
232236
uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)