summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2019-09-15 16:26:40 -0700
committerGitHub <noreply@github.com>2019-09-15 16:26:40 -0700
commit109ea76d82219e9185dd5aa89b29ea485ad18640 (patch)
tree88771d6312ec798db124bd6c3f5d857f7cc31e7c /.github
parent88c1ccd5fe657ffb1683515d4b6268eff3bae3c9 (diff)
downloadssh2-rs-109ea76d82219e9185dd5aa89b29ea485ad18640.zip
Set up GitHub Actions CI for Windows (#131)
This commit builds with the msvc toolchain on 64- and 32-bit versions of windows 2016 and 2019 based images
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/windows.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 0000000..6b0e6b9
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,44 @@
+name: Windows
+
+on:
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [windows-2016, windows-2019]
+ env:
+ - TARGET: x86_64-pc-windows-msvc
+ - TARGET: i686-pc-windows-msvc
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v1
+ - name: Dump environment
+ env:
+ MATRIX_CONTEXT: ${{ toJson(matrix) }}
+ TARGET: ${{ matrix.env.TARGET }}
+ run: set
+ - 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"
+ - 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%
+ cargo run --manifest-path systest/Cargo.toml --target %TARGET%