2020-11-02 23:15:14 +00:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- target: x86_64-apple-darwin
|
|
|
|
os: macos-latest
|
|
|
|
- target: x86_64-pc-windows-gnu
|
|
|
|
os: windows-latest
|
|
|
|
- target: x86_64-pc-windows-msvc
|
|
|
|
os: windows-latest
|
|
|
|
- target: x86_64-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
- target: x86_64-unknown-linux-musl
|
|
|
|
os: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-05-12 11:50:27 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
2020-11-02 23:15:14 +00:00
|
|
|
|
|
|
|
- name: Install rust toolchain
|
2021-05-12 05:22:37 +00:00
|
|
|
uses: actions-rs/toolchain@v1.0.7
|
2020-11-02 23:15:14 +00:00
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-02-05 15:54:50 +00:00
|
|
|
toolchain: stable
|
2020-11-02 23:15:14 +00:00
|
|
|
target: ${{ matrix.target }}
|
2021-02-25 16:52:39 +00:00
|
|
|
default: true
|
2020-12-08 20:55:36 +00:00
|
|
|
|
2020-11-02 23:15:14 +00:00
|
|
|
- name: Cargo build
|
2021-05-12 05:22:55 +00:00
|
|
|
uses: actions-rs/cargo@v1.0.3
|
2020-11-02 23:15:14 +00:00
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --target ${{ matrix.target }}
|
2021-02-17 23:49:26 +00:00
|
|
|
env:
|
|
|
|
GEN_COMPLETIONS: 1
|
2020-11-02 23:15:14 +00:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
name: clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-05-12 11:50:27 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
2020-11-02 23:15:14 +00:00
|
|
|
|
|
|
|
- name: Install rust toolchain
|
2021-05-12 05:22:37 +00:00
|
|
|
uses: actions-rs/toolchain@v1.0.7
|
2020-11-02 23:15:14 +00:00
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-02-05 15:54:50 +00:00
|
|
|
toolchain: stable
|
2020-11-02 23:15:14 +00:00
|
|
|
components: clippy
|
2021-02-25 16:52:39 +00:00
|
|
|
default: true
|
2020-11-02 23:15:14 +00:00
|
|
|
|
|
|
|
- name: Cargo clippy
|
2021-05-12 05:22:55 +00:00
|
|
|
uses: actions-rs/cargo@v1.0.3
|
2020-11-02 23:15:14 +00:00
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: -- -D warnings
|
|
|
|
|
|
|
|
rustfmt:
|
|
|
|
name: rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2021-05-12 11:50:27 +00:00
|
|
|
uses: actions/checkout@v2.3.4
|
2020-11-02 23:15:14 +00:00
|
|
|
|
|
|
|
- name: Install rust toolchain
|
2021-05-12 05:22:37 +00:00
|
|
|
uses: actions-rs/toolchain@v1.0.7
|
2020-11-02 23:15:14 +00:00
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-02-05 16:03:51 +00:00
|
|
|
toolchain: nightly
|
2020-11-02 23:15:14 +00:00
|
|
|
components: rustfmt
|
2021-02-25 16:52:39 +00:00
|
|
|
default: true
|
2020-11-02 23:15:14 +00:00
|
|
|
|
|
|
|
- name: Cargo fmt
|
2021-05-12 05:22:55 +00:00
|
|
|
uses: actions-rs/cargo@v1.0.3
|
2020-11-02 23:15:14 +00:00
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: -- --check
|