mmtc/.github/workflows/ci.yml

84 lines
1.9 KiB
YAML
Raw Normal View History

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
uses: actions/checkout@v2.3.4
2020-11-02 23:15:14 +00:00
- name: Install rust toolchain
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 }}
default: true
2020-12-08 20:55:36 +00:00
2020-11-02 23:15:14 +00:00
- name: Cargo build
uses: actions-rs/cargo@v1.0.3
2020-11-02 23:15:14 +00:00
with:
command: build
args: --target ${{ matrix.target }}
env:
GEN_COMPLETIONS: 1
2020-11-02 23:15:14 +00:00
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
2020-11-02 23:15:14 +00:00
- name: Install rust toolchain
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
default: true
2020-11-02 23:15:14 +00:00
- name: Cargo clippy
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
uses: actions/checkout@v2.3.4
2020-11-02 23:15:14 +00:00
- name: Install rust toolchain
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
default: true
2020-11-02 23:15:14 +00:00
- name: Cargo fmt
uses: actions-rs/cargo@v1.0.3
2020-11-02 23:15:14 +00:00
with:
command: fmt
args: -- --check