You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
distant/.github/workflows/ci-windows.yml

81 lines
2.5 KiB
YAML

name: CI (Windows)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
name: "Test Rust ${{ matrix.rust }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: windows-latest, target: x86_64-pc-windows-msvc }
steps:
- uses: actions/checkout@v2
- name: Install Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v1
- name: Check Cargo availability
run: cargo --version
- uses: Vampire/setup-wsl@v1
- uses: dorny/paths-filter@v2
id: changes
with:
base: ${{ github.ref }}
filters: |
cli:
- 'src/**'
- 'Cargo.*'
core:
- 'distant-core/**'
ssh2:
- 'distant-ssh2/**'
lua:
- 'distant-lua/**'
- 'distant-lua-tests/**'
- name: Run distant-core tests (default features)
run: cargo test --verbose -p distant-core
if: steps.changes.outputs.core == 'true'
- name: Run distant-core tests (all features)
run: cargo test --verbose --all-features -p distant-core
if: steps.changes.outputs.core == 'true'
- name: Build distant-ssh2 (default features)
run: cargo build --verbose -p distant-ssh2
if: steps.changes.outputs.ssh2 == 'true'
- name: Build distant-ssh2 (all features)
run: cargo build --verbose --all-features -p distant-ssh2
if: steps.changes.outputs.ssh2 == 'true'
- name: Build CLI
run: cargo build --verbose
shell: bash
if: steps.changes.outputs.cli == 'true'
- name: Build CLI (no default features)
run: cargo build --verbose --no-default-features
shell: bash
if: steps.changes.outputs.cli == 'true'
- uses: xpol/setup-lua@v0.3
with:
lua-version: "5.1.5"
if: steps.changes.outputs.lua == 'true'
- name: Build Lua (Lua 5.1)
run: |
cd ${{ github.workspace }}\distant-lua
cargo build --verbose --no-default-features --features lua51
shell: cmd
env:
LUA_INC: ${{ github.workspace }}\.lua\include
LUA_LIB: ${{ github.workspace }}\.lua\lib
LUA_LIB_NAME: lua51
if: steps.changes.outputs.lua == 'true'