Skip to content

Commit

Permalink
Upgrade Rust to v1.58.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stepchowfun committed Jan 16, 2022
1 parent 1704498 commit 9710034
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
set -euo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.56.0 # [ref:rust_1_56_0]
rustup default 1.56.0 # [ref:rust_1_56_0]
rustup toolchain install 1.58.0 # [ref:rust_1_58_0]
rustup default 1.58.0 # [ref:rust_1_58_0]
# Build and test.
RUSTFLAGS='--codegen target-feature=+crt-static' cargo build \
Expand All @@ -75,8 +75,8 @@ jobs:
set -euo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.56.0 # [ref:rust_1_56_0]
rustup default 1.56.0 # [ref:rust_1_56_0]
rustup toolchain install 1.58.0 # [ref:rust_1_58_0]
rustup default 1.58.0 # [ref:rust_1_58_0]
# Build and test.
cargo build --locked --release --target x86_64-apple-darwin
Expand Down Expand Up @@ -131,8 +131,8 @@ jobs:
set -euo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.56.0 # [ref:rust_1_56_0]
rustup default 1.56.0 # [ref:rust_1_56_0]
rustup toolchain install 1.58.0 # [ref:rust_1_58_0]
rustup default 1.58.0 # [ref:rust_1_58_0]
# Fetch the program version.
VERSION="$(cargo pkgid | cut -d# -f2 | cut -d: -f2)"
Expand Down
12 changes: 7 additions & 5 deletions toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ command_prefix: |
cargo-offline () { cargo --frozen --offline "$@"; }
# Use this wrapper for formatting code or checking that code is formatted. We use a nightly Rust
# version for the `trailing_comma` formatting option [tag:rust_fmt_nightly].
cargo-fmt () { cargo +nightly-2021-10-22 --frozen --offline fmt --all -- "$@"; }
# version for the `trailing_comma` formatting option [tag:rust_fmt_nightly]. The nightly version
# was chosen as the latest available release with all components present according to this page:
# https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu.html
cargo-fmt () { cargo +nightly-2022-01-16 --frozen --offline fmt --all -- "$@"; }
tasks:
install_packages:
description: Install system packages.
Expand Down Expand Up @@ -56,18 +58,18 @@ tasks:
- install_packages
- create_user
command: |
# Install stable Rust [tag:rust_1_56_0].
# Install stable Rust [tag:rust_1_58_0].
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-y \
--default-toolchain 1.56.0 \
--default-toolchain 1.58.0 \
--profile minimal \
--component clippy
# Add Rust tools to `$PATH`.
. "$HOME/.cargo/env"
# Install nightly Rust [ref:rust_fmt_nightly].
rustup toolchain install nightly-2021-10-22 --profile minimal --component rustfmt
rustup toolchain install nightly-2022-01-16 --profile minimal --component rustfmt
install_tools:
description: Install the tools needed to build and validate the program.
Expand Down

0 comments on commit 9710034

Please sign in to comment.