--- /dev/null
+name: windows
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+jobs:
+ test:
+ runs-on: windows-latest
+ name: (${{ matrix.target }}, ${{ matrix.channel }})
+ strategy:
+ # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
+ # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
+ # In order to prevent overusing too much of that 60 limit, we throttle the
+ # number of rustfmt jobs that will run concurrently.
+ max-parallel: 2
+ fail-fast: false
+ matrix:
+ target: [
+ i686-pc-windows-gnu,
+ i686-pc-windows-msvc,
+ x86_64-pc-windows-gnu,
+ x86_64-pc-windows-msvc,
+ ]
+ channel: [ nightly ]
+ include:
+ - channel: nightly
+ target: i686-pc-windows-gnu
+
+ env:
+ CFG_RELEASE_CHANNEL: nightly
+ CFG_RELEASE: nightly
+
+ steps:
+ # The Windows runners have autocrlf enabled by default
+ # which causes failures for some of rustfmt's line-ending sensitive tests
+ - name: disable git eol translation
+ run: git config --global core.autocrlf false
+ - name: checkout
+ uses: actions/checkout@v2
+
+ # Run build
+ - name: setup
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.channel }}-${{ matrix.target }}
+ target: ${{ matrix.target }}
+ override: true
+ profile: minimal
+ default: true
+
+ - name: Add mingw32 to path for i686-gnu
+ run: |
+ echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
+ if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
+ shell: bash
+
+ - name: Add mingw64 to path for x86_64-gnu
+ run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
+ if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
+ shell: bash
+
+ - name: cargo-make
+ run: cargo install --force cargo-make
+
+ - name: build
+ run: |
+ rustc -Vv
+ cargo -V
+ cargo build
+ shell: cmd
+
+ - name: test
+ run: cargo test
+ shell: cmd