summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Sasaki <yusuke.sasaki.nuem@gmail.com>2020-01-16 16:28:33 +0900
committerWez Furlong <wez@wezfurlong.org>2020-01-17 17:19:41 -0800
commit6b8c3ecb4b1ba32139cbc25d0605bebc6862c604 (patch)
tree9e96ab56c7a254c5b771251e100c8fb895b55772
parentb4d4e7a69e4bb46e43d0660d48322df5b2ca0fa6 (diff)
downloadssh2-rs-6b8c3ecb4b1ba32139cbc25d0605bebc6862c604.zip
use actions-rs/toolchain for Rust installation
-rw-r--r--.github/workflows/linux.yml7
-rw-r--r--.github/workflows/macos.yml7
-rw-r--r--.github/workflows/windows.yml18
3 files changed, 15 insertions, 17 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index d249ff7..8408a56 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -19,14 +19,15 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install Rust
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${{ matrix.rust_toolchain }}
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: ${{ matrix.rust_toolchain }}
- name: Build and test
run: |
- source $HOME/.cargo/env
rustc -V
cargo -V
cargo build
tests/run_integration_tests.sh
rustdoc --test README.md -L target
cargo run --manifest-path systest/Cargo.toml
-
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 61a3654..a7e566e 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -18,12 +18,15 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install Rust
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: nightly
+ override: true
- name: Build and test
run: |
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
- source $HOME/.cargo/env
rustc -V
cargo -V
cargo build
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index ee30606..14ade20 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -20,23 +20,17 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- - name: Download Rust Installer
- # GitHub Actions doesn't automatically apply the environment from the matrix,
- # so we get to do that for ourselves here
- env:
- TARGET: ${{ matrix.env.TARGET }}
- run: |
- $wc = New-Object System.Net.WebClient
- $wc.DownloadFile("https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe", "install-rust.exe")
- shell: powershell
- name: Install Rust
- run: install-rust.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- shell: cmd
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: nightly
+ override: true
+ target: ${{ matrix.env.TARGET }}
- name: Build and test
env:
TARGET: ${{ matrix.env.TARGET }}
run: |
- SET PATH=C:\Program Files (x86)\Rust\bin;%PATH%
rustc -V
cargo -V
cargo test --no-run --target %TARGET%