diff options
| -rw-r--r-- | .github/workflows/nightly-rust-update.yml | 6 | ||||
| -rw-r--r-- | .travis.yml | 3 | ||||
| -rw-r--r-- | README.md | 10 | ||||
| -rwxr-xr-x | tools/install-tool-dependencies | 9 | ||||
| -rwxr-xr-x | tools/update-nightly | 8 |
5 files changed, 22 insertions, 14 deletions
diff --git a/.github/workflows/nightly-rust-update.yml b/.github/workflows/nightly-rust-update.yml index c7dc962..00ff6e6 100644 --- a/.github/workflows/nightly-rust-update.yml +++ b/.github/workflows/nightly-rust-update.yml @@ -12,10 +12,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: date +nightly-%Y-%m-%d > rust-toolchain - - run: rustup install --profile minimal "$(< rust-toolchain)" - - run: rustup component add clippy rustfmt - - run: cargo install cargo-udeps + - run: tools/update-nightly + - run: tools/install-tool-dependencies - run: tools/checks - uses: peter-evans/create-pull-request@v3 with: diff --git a/.travis.yml b/.travis.yml index 5e41e58..64c0120 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,7 @@ rust: cache: cargo install: - - rustup component add clippy rustfmt - - cargo install cargo-udeps + - tools/install-tool-dependencies - cargo build script: @@ -45,16 +45,10 @@ you're willing to take that chance. To set this up: -* Install additional Rust components: +* Install additional Rust components and Cargo binaries: ```bash - rustup component add clippy rustfmt - ``` - -* Install `cargo-udeps`: - - ```bash - cargo install cargo-udeps + tools/install-tool-dependencies ``` * Configure Git to use these hooks: diff --git a/tools/install-tool-dependencies b/tools/install-tool-dependencies new file mode 100755 index 0000000..27a9015 --- /dev/null +++ b/tools/install-tool-dependencies @@ -0,0 +1,9 @@ +#!/bin/bash -ex + +# tools/install-tool-dependencies +# +# Install Rust and Cargo components used by tool scripts, which are not part of +# Cargo.toml. + +rustup component add clippy rustfmt +cargo install cargo-udeps
\ No newline at end of file diff --git a/tools/update-nightly b/tools/update-nightly new file mode 100755 index 0000000..7567110 --- /dev/null +++ b/tools/update-nightly @@ -0,0 +1,8 @@ +#!/bin/bash -ex + +# tools/update-nightly +# +# Install today's nightly Rust release. + +date "+nightly-%Y-%m-%d" > rust-toolchain +rustup install --profile minimal "$(< rust-toolchain)" |
