From 3c4cf729600e94f83ee3104adf797306e10f77ba Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 28 Sep 2020 11:01:36 +1000 Subject: [PATCH] Set Rust toolchain to 1.41.1 The project does not compile on 1.34.0 because it uses the lockfile format introduced in 1.38.0. Do note that Debian stable at this time uses Rust 1.41.1. Setting a specific toolchain version is good practice for binary project and remove potential issues of incompatible toolchain for users trying to build the project. --- .github/workflows/rust.yml | 21 +++++++++++++-------- Cargo.toml | 3 --- doc/usage.md | 2 +- rust-toolchain | 1 + 4 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 rust-toolchain diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 32f3f28..55d751b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -3,15 +3,20 @@ name: Rust on: [push, pull_request] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Check - run: cargo check - - name: Build - run: cargo build - - name: Run tests - run: cargo test + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + profile: minimal + override: true + - uses: actions/checkout@v1 + - name: Check + run: cargo check + - name: Build + run: cargo build + - name: Run tests + run: cargo test diff --git a/Cargo.toml b/Cargo.toml index dcf086d..3951308 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,6 @@ spec = "config_spec.toml" [profile.release] lto = true -[features] -latest_rust = [] # use latest Rust features (otherwise, support Rust 1.34) - [dependencies] base64 = "0.10" bincode = "1.0" diff --git a/doc/usage.md b/doc/usage.md index 8b3c6b1..44c88f5 100644 --- a/doc/usage.md +++ b/doc/usage.md @@ -4,7 +4,7 @@ ### Build dependencies -Install [recent Rust](https://rustup.rs/) (1.34+, `apt install cargo` is preferred for Debian 10), +Install [recent Rust](https://rustup.rs/) (1.41.1+, `apt install cargo` is preferred for Debian 10), [latest Bitcoin Core](https://bitcoincore.org/en/download/) (0.16+) and [latest Electrum wallet](https://electrum.org/#download) (3.3+). diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..f86fb9c --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +1.41.1