summaryrefslogtreecommitdiff
path: root/.github/workflows/windows.yml
blob: bee87265854860df5631dbbc0f10b403d50be2b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Windows

on:
  push:
    branches:
    - master
  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: 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%