Skip to content

Commit

Permalink
Require minimum Rust 1.71 to work.
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Nov 8, 2023
1 parent 50363e9 commit f367460
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ jobs:
rust-tests:
name: Run tests
runs-on: ubuntu-latest
continue-on-error: true # TODO: revert this change before merging!!
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
# IMPORTANT: When updating the versions here, make sure you also update
# the `fails-on-too-old-rustc` job and its error message to
# to account for the raised minimum required version.
toolchain: ["1.70", "1.71", "1.72", "stable", "beta"]
toolchain: ["1.71", "1.72", "stable", "beta"]
experimental: [false]
include:
- toolchain: "nightly"
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
id: toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: "1.70" # Rust 1.70 uses rustdoc v24
toolchain: "1.73" # Rust 1.73 uses rustdoc v26
rustflags: ""
cache: false

Expand Down Expand Up @@ -364,7 +364,7 @@ jobs:
- name: Install newer rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: "1.72" # Rust 1.72 uses rustdoc v26
toolchain: "beta" # Rust 1.74-beta uses rustdoc v27
rustflags: ""
cache: false

Expand Down Expand Up @@ -432,7 +432,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore rustdoc
id: cache
Expand Down Expand Up @@ -526,7 +525,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

# rust-libp2p requires protobuf-compiler.
- name: Install protobuf-compiler
Expand Down Expand Up @@ -606,7 +604,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

# rust-libp2p requires protobuf-compiler.
- name: Install protobuf-compiler
Expand Down Expand Up @@ -681,7 +678,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

# rust-libp2p requires protobuf-compiler.
- name: Install protobuf-compiler
Expand Down Expand Up @@ -754,7 +750,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

# rust-libp2p requires protobuf-compiler.
- name: Install protobuf-compiler
Expand Down Expand Up @@ -823,7 +818,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

# This job runs on macOS, not Linux like the rest.
# It should save its cache, because no other job will save it in its place.
Expand Down Expand Up @@ -882,7 +876,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore binary
id: cache-binary
Expand Down Expand Up @@ -946,7 +939,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore binary
id: cache-binary
Expand Down Expand Up @@ -1009,7 +1001,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore binary
id: cache-binary
Expand Down Expand Up @@ -1077,7 +1068,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore cargo index and rustdoc target dir
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -1156,7 +1146,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore cargo index and rustdoc target dir
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -1234,7 +1223,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore binary
id: cache-binary
Expand Down Expand Up @@ -1458,7 +1446,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore binary
id: cache-binary
Expand Down Expand Up @@ -1556,7 +1543,6 @@ jobs:
with:
cache: false
rustflags: ""
toolchain: nightly

- name: Restore binary
id: cache-binary
Expand Down Expand Up @@ -1620,7 +1606,7 @@ jobs:
id: toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: "1.67"
toolchain: "1.70"
rustflags: ""
cache: false

Expand Down Expand Up @@ -1663,7 +1649,7 @@ jobs:
- name: Check output
run: |
cd semver
EXPECTED="$(echo -e "Error: rustc version is not high enough: >=1.68.0 needed, got 1.67.1")"
EXPECTED="$(echo -e "Error: rustc version is not high enough: >=1.71.0 needed, got 1.70.0")"
RESULT="$(cat output | grep Error)"
diff <(echo "$RESULT") <(echo "$EXPECTED")
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl GlobalConfig {
}
})),
handlebars: make_handlebars_registry(),
minimum_rustc_version: semver::Version::new(1, 68, 0),
minimum_rustc_version: semver::Version::new(1, 71, 0),
}
}

Expand Down

0 comments on commit f367460

Please sign in to comment.