mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
build_and_test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
toolchain:
|
|
- x86_64-pc-windows-msvc
|
|
- x86_64-pc-windows-gnu
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-apple-darwin
|
|
version:
|
|
- stable
|
|
- nightly
|
|
include:
|
|
- toolchain: x86_64-pc-windows-msvc
|
|
os: windows-latest
|
|
- toolchain: x86_64-pc-windows-gnu
|
|
os: windows-latest
|
|
- toolchain: x86_64-unknown-linux-gnu
|
|
os: ubuntu-latest
|
|
- toolchain: x86_64-apple-darwin
|
|
os: macOS-latest
|
|
|
|
name: ${{ matrix.version }} - ${{ matrix.toolchain }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Install ${{ matrix.version }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.version }}-${{ matrix.toolchain }}
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Generate Cargo.lock
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: update
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ matrix.version }}-${{ matrix.toolchain }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Cache cargo index
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/git
|
|
key: ${{ matrix.version }}-${{ matrix.toolchain }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: target
|
|
key: ${{ matrix.version }}-${{ matrix.toolchain }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: checks
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all --bins --examples --tests
|
|
|
|
- name: tests (stable)
|
|
if: matrix.version == 'stable'
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all --no-fail-fast -- --nocapture
|
|
|
|
- name: tests (nightly)
|
|
if: matrix.version == 'nightly'
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all --all-features --no-fail-fast -- --nocapture
|