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-12-05 19:13:34 +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-12-14 19:43:45 +00:00
|
|
|
- uses: cachix/install-nix-action@v15
|
2021-03-29 15:44:30 +00:00
|
|
|
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' }}
|
2021-12-05 08:58:31 +00:00
|
|
|
- run: nix-shell --cores 0 --pure --run 'rm -rf ~/.cargo/bin; cargo xtask ci'
|
2021-10-29 18:31:25 +00:00
|
|
|
if: ${{ matrix.os != 'windows-latest' }}
|