1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-12-01 02:44:37 +01:00
actix-extras/.github/workflows/windows.yml
Yuki Okushi 2e9ab0625e
Tweak actions (#1305)
* Add benchmark action

* Fix Windows build
2020-01-23 06:23:53 +09:00

90 lines
2.8 KiB
YAML

name: CI (Windows)
on: [push, pull_request]
env:
VCPKG_HASH: 3f62e5d55d1a7d8905df35d5c441d6e9ad64ffdf
VCPKGRS_DYNAMIC: 1
jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
version:
- stable
- nightly
name: ${{ matrix.version }} - x86_64-pc-windows-msvc
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-pc-windows-msvc
profile: minimal
override: true
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.version }}-x86_64-pc-windows-msvc-cargo-build-${{ hashFiles('**/Cargo.lock') }}
- name: Cache vcpkg package
uses: actions/cache@v1
id: cache-vcpkg
with:
path: vcpkg
key: windows_x64-${{ env.VCPKG_HASH }}-vcpkg
- name: Install OpenSSL
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
shell: pwsh
run: |
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
git reset --hard $VCPKG_HASH
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
.\vcpkg install openssl:x64-windows
Copy-Item .\installed\x64-windows\bin\libcrypto-1_1-x64.dll .\installed\x64-windows\bin\libcrypto.dll
Copy-Item .\installed\x64-windows\bin\libssl-1_1-x64.dll .\installed\x64-windows\bin\libssl.dll
Get-ChildItem .\installed\x64-windows\bin
Get-ChildItem .\installed\x64-windows\lib
- name: check build
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests
- name: tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features --no-fail-fast -- --nocapture
--skip=test_h2_content_length
--skip=test_reading_deflate_encoding_large_random_rustls
--skip=test_params
--skip=test_simple
--skip=test_expect_continue
--skip=test_http10_keepalive
--skip=test_slow_request