2021-03-29 15:44:30 +00:00
|
|
|
name: ci
|
|
|
|
on:
|
|
|
|
push:
|
2021-05-01 21:56:12 +00:00
|
|
|
branches: [main]
|
2021-03-29 15:44:30 +00:00
|
|
|
pull_request:
|
2021-10-29 18:31:25 +00:00
|
|
|
workflow_dispatch:
|
2021-03-29 15:44:30 +00:00
|
|
|
jobs:
|
|
|
|
ci:
|
2021-10-29 18:31:25 +00:00
|
|
|
name: ${{ matrix.os }}
|
2021-03-29 15:44:30 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-07-20 21:09:18 +00:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2021-03-29 15:44:30 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-10-29 18:31:25 +00:00
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
2021-03-29 15:44:30 +00:00
|
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
|
|
with:
|
2021-10-29 18:31:25 +00:00
|
|
|
toolchain: stable
|
|
|
|
components: rustfmt, clippy
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
2021-03-29 15:44:30 +00:00
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
if: ${{ matrix.os != 'windows-latest' }}
|
|
|
|
with:
|
2021-05-07 07:34:44 +00:00
|
|
|
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz
|
2021-10-29 18:31:25 +00:00
|
|
|
|
2021-10-11 20:05:24 +00:00
|
|
|
- run: cargo xtask ci
|
2021-10-29 18:31:25 +00:00
|
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
|
|
- run: nix-shell --cores 0 --pure --run 'cargo xtask ci'
|
|
|
|
if: ${{ matrix.os != 'windows-latest' }}
|