Skip to content

Commit d75b979

Browse files
authored
ci: specify rust toolchain version (bnb-chain#49)
* ci: specify rust toolchain version * ci: fix toolchain for fmt * ci: fix toolchain for fmt
1 parent b7adcb8 commit d75b979

File tree

9 files changed

+30
-5
lines changed

9 files changed

+30
-5
lines changed

.github/workflows/bench.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010
CARGO_TERM_COLOR: always
1111
BASELINE: base
1212
IAI_CALLGRIND_RUNNER: iai-callgrind-runner
13+
TOOL_CHAIN: "1.79"
1314

1415
concurrency:
1516
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -27,6 +28,8 @@ jobs:
2728
- name: Install Valgrind
2829
run: sudo apt update && sudo apt install valgrind
2930
- uses: dtolnay/rust-toolchain@stable
31+
with:
32+
toolchain: ${{ env.TOOL_CHAIN }}
3033
- uses: Swatinem/rust-cache@v2
3134
with:
3235
cache-on-failure: true

.github/workflows/dependencies.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
# Needed so we can run it manually
1111

1212
env:
13+
TOOL_CHAIN: "1.79"
1314
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1415
BRANCH: cargo-update
1516
TITLE: "chore(deps): weekly `cargo update`"
@@ -33,7 +34,8 @@ jobs:
3334
steps:
3435
- uses: actions/checkout@v4
3536
- uses: dtolnay/rust-toolchain@nightly
36-
37+
with:
38+
toolchain: ${{ env.TOOL_CHAIN }}
3739
- name: cargo update
3840
# Remove first line that always just says "Updating crates.io index"
3941
run: cargo update --color never 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log

.github/workflows/integration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
env:
1313
CARGO_TERM_COLOR: always
1414
SEED: rustethereumethereumrust
15+
TOOL_CHAIN: "1.79"
1516

1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -36,6 +37,8 @@ jobs:
3637
steps:
3738
- uses: actions/checkout@v4
3839
- uses: dtolnay/rust-toolchain@stable
40+
with:
41+
toolchain: ${{ env.TOOL_CHAIN }}
3942
- name: Install Geth
4043
run: .github/scripts/install_geth.sh
4144
- uses: taiki-e/install-action@nextest

.github/workflows/lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
TOOL_CHAIN: "1.79"
12+
TOOL_CHAIN_NIGHTLY: "nightly-2024-06-28"
1113

1214
jobs:
1315
clippy-binaries:
@@ -29,6 +31,8 @@ jobs:
2931
steps:
3032
- uses: actions/checkout@v4
3133
- uses: dtolnay/rust-toolchain@clippy
34+
with:
35+
toolchain: ${{ env.TOOL_CHAIN }}
3236
- uses: Swatinem/rust-cache@v2
3337
with:
3438
cache-on-failure: true
@@ -58,6 +62,7 @@ jobs:
5862
- uses: dtolnay/rust-toolchain@stable
5963
with:
6064
target: riscv32imac-unknown-none-elf
65+
toolchain: ${{ env.TOOL_CHAIN }}
6166
- uses: taiki-e/install-action@cargo-hack
6267
- uses: Swatinem/rust-cache@v2
6368
with:
@@ -71,6 +76,8 @@ jobs:
7176
steps:
7277
- uses: actions/checkout@v4
7378
- uses: dtolnay/rust-toolchain@stable
79+
with:
80+
toolchain: ${{ env.TOOL_CHAIN }}
7481
- uses: taiki-e/install-action@cargo-hack
7582
- uses: Swatinem/rust-cache@v2
7683
with:
@@ -97,7 +104,7 @@ jobs:
97104
- uses: actions/checkout@v4
98105
- uses: dtolnay/rust-toolchain@master
99106
with:
100-
toolchain: "1.79" # MSRV
107+
toolchain: ${{ env.TOOL_CHAIN }}
101108
- uses: Swatinem/rust-cache@v2
102109
with:
103110
cache-on-failure: true
@@ -114,6 +121,7 @@ jobs:
114121
- uses: dtolnay/rust-toolchain@nightly
115122
with:
116123
components: rustfmt
124+
toolchain: ${{ env.TOOL_CHAIN_NIGHTLY }} # fmt need the nightly flag, please update this if reallly needed
117125
- run: cargo fmt --all --check
118126

119127
codespell:

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth
1414
IMAGE_NAME: ${{ github.repository_owner }}/reth
1515
CARGO_TERM_COLOR: always
16+
TOOL_CHAIN: "1.79"
1617

1718
jobs:
1819
extract-version:
@@ -59,6 +60,7 @@ jobs:
5960
- uses: dtolnay/rust-toolchain@stable
6061
with:
6162
target: ${{ matrix.configs.target }}
63+
toolchain: ${{ env.TOOL_CHAIN }}
6264
- uses: taiki-e/install-action@cross
6365
- uses: Swatinem/rust-cache@v2
6466
with:

.github/workflows/unit.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
env:
1313
CARGO_TERM_COLOR: always
1414
SEED: rustethereumethereumrust
15+
TOOL_CHAIN: "1.79"
1516

1617
concurrency:
1718
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -31,6 +32,8 @@ jobs:
3132
steps:
3233
- uses: actions/checkout@v4
3334
- uses: dtolnay/rust-toolchain@stable
35+
with:
36+
toolchain: ${{ env.TOOL_CHAIN }}
3437
- uses: Swatinem/rust-cache@v2
3538
with:
3639
cache-on-failure: true
@@ -79,6 +82,8 @@ jobs:
7982
submodules: recursive
8083
fetch-depth: 1
8184
- uses: dtolnay/rust-toolchain@stable
85+
with:
86+
toolchain: ${{ env.TOOL_CHAIN }}
8287
- uses: taiki-e/install-action@nextest
8388
- uses: Swatinem/rust-cache@v2
8489
with:
@@ -103,6 +108,8 @@ jobs:
103108
steps:
104109
- uses: actions/checkout@v4
105110
- uses: dtolnay/rust-toolchain@stable
111+
with:
112+
toolchain: ${{ env.TOOL_CHAIN }}
106113
- uses: Swatinem/rust-cache@v2
107114
with:
108115
cache-on-failure: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
1+
FROM lukemathwalker/cargo-chef:latest-rust-1.79 AS chef
22
WORKDIR /app
33

44
LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth

bsc.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
1+
FROM lukemathwalker/cargo-chef:latest-rust-1.79 AS chef
22
WORKDIR /app
33

44
LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth

op.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
1+
FROM lukemathwalker/cargo-chef:latest-rust-1.79 AS chef
22
WORKDIR /app
33

44
LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth

0 commit comments

Comments
 (0)