Skip to content
This repository was archived by the owner on Dec 17, 2022. It is now read-only.

Commit d56df29

Browse files
Update to latest rustfmt-nightly
To make future upgrades easier, we also make the following changes: 1. Use a rust-toolchain file to clearly specify the requirements of our toolchain. 2. Refer to this toolchain in the CI configuration to avoid duplicating the version requirement. 3. Remove `wasm` feature in favour of cfg-based dependency declarations. 4. Remove `patches` directory as they are now outdated with the recent ap-crates releases. 5. Depend on rustfmt via git because the crates.io release is no longer being updated. The Cargo.lock file tracks which specific Git revision we depend on. Future updates therefore should only require a `cargo update`.
1 parent 7697eab commit d56df29

File tree

9 files changed

+201
-885
lines changed

9 files changed

+201
-885
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,18 @@ jobs:
1717
env:
1818
CARGO_INCREMENTAL: 0
1919
RUST_BACKTRACE: full
20-
CFG_RELEASE: 1.46.0-nightly
2120
CFG_RELEASE_CHANNEL: nightly
2221

2322
steps:
2423
- uses: actions/checkout@v2
2524

26-
- name: Install and use nightly compiler
27-
run: rustup default nightly-2020-06-14
25+
- name: Install toolchain
26+
run: rustup show # This will install the toolchain from the `rust-toolchain` file
2827

29-
- name: Install wasm32 target
30-
if: matrix.config.kind == 'test_release'
31-
run: rustup target add wasm32-unknown-unknown --toolchain nightly-2020-06-14
32-
33-
- name: Run setup script
28+
- name: Extract Rust release version and set CFG_RELEASE env variable
3429
run: |
35-
chmod +x setup.sh
36-
./setup.sh
30+
# See https://sed.js.org/?gist=733942438b671befe20b6e7b5dfac57f for an explanation of the regex
31+
echo "CFG_RELEASE=$(cargo --version | sed -rn 's/cargo\s(.*)\s\(.*\)/\1/p')" >> $GITHUB_ENV
3732
3833
- name: Cache cargo
3934
uses: actions/cache@v2
@@ -49,7 +44,7 @@ jobs:
4944
run: cargo build --verbose
5045
- name: Build release
5146
if: matrix.config.kind == 'test_release'
52-
run: cargo build --target wasm32-unknown-unknown --features "wasm" --release --verbose
47+
run: cargo build --target wasm32-unknown-unknown --release --verbose
5348

5449
- name: Test debug
5550
if: matrix.config.kind == 'test_debug'

0 commit comments

Comments
 (0)