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

Commit

Permalink
Update to latest rustfmt-nightly
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
thomaseizinger committed May 19, 2021
1 parent 7697eab commit d56df29
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 885 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,18 @@ jobs:
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
CFG_RELEASE: 1.46.0-nightly
CFG_RELEASE_CHANNEL: nightly

steps:
- uses: actions/checkout@v2

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

- name: Install wasm32 target
if: matrix.config.kind == 'test_release'
run: rustup target add wasm32-unknown-unknown --toolchain nightly-2020-06-14

- name: Run setup script
- name: Extract Rust release version and set CFG_RELEASE env variable
run: |
chmod +x setup.sh
./setup.sh
# See https://sed.js.org/?gist=733942438b671befe20b6e7b5dfac57f for an explanation of the regex
echo "CFG_RELEASE=$(cargo --version | sed -rn 's/cargo\s(.*)\s\(.*\)/\1/p')" >> $GITHUB_ENV
- name: Cache cargo
uses: actions/cache@v2
Expand All @@ -49,7 +44,7 @@ jobs:
run: cargo build --verbose
- name: Build release
if: matrix.config.kind == 'test_release'
run: cargo build --target wasm32-unknown-unknown --features "wasm" --release --verbose
run: cargo build --target wasm32-unknown-unknown --release --verbose

- name: Test debug
if: matrix.config.kind == 'test_debug'
Expand Down
Loading

0 comments on commit d56df29

Please sign in to comment.