2021-03-11 07:02:24 +00:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-05-06 16:03:56 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2021-03-11 07:02:24 +00:00
|
|
|
pull_request:
|
|
|
|
|
2022-03-16 19:18:01 +00:00
|
|
|
permissions: read-all
|
|
|
|
|
2021-03-11 07:02:24 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
2022-04-19 22:39:19 +00:00
|
|
|
fail-fast: false
|
2021-03-11 07:02:24 +00:00
|
|
|
matrix:
|
2022-04-19 22:39:19 +00:00
|
|
|
build: [linux, linux-msrv, macos, win]
|
|
|
|
include:
|
|
|
|
- build: linux
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust_version: stable
|
|
|
|
- build: linux-msrv
|
|
|
|
os: ubuntu-latest
|
2022-05-02 15:53:50 +00:00
|
|
|
rust_version: "1.60"
|
2022-04-19 22:39:19 +00:00
|
|
|
- build: macos
|
|
|
|
os: macos-latest
|
|
|
|
rust_version: stable
|
|
|
|
- build: win
|
|
|
|
os: windows-latest
|
|
|
|
rust_version: stable
|
|
|
|
runs-on: ${{ matrix.os }}
|
2021-03-11 07:02:24 +00:00
|
|
|
|
|
|
|
steps:
|
2022-04-21 15:37:23 +00:00
|
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
2022-04-19 22:39:19 +00:00
|
|
|
- name: Install Rust (${{ matrix.rust_version }})
|
2022-03-18 15:33:50 +00:00
|
|
|
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
|
2021-03-11 07:02:24 +00:00
|
|
|
with:
|
2022-04-19 22:39:19 +00:00
|
|
|
toolchain: ${{ matrix.rust_version }}
|
2021-03-11 07:02:24 +00:00
|
|
|
override: true
|
|
|
|
profile: minimal
|
|
|
|
- name: Build
|
2022-03-18 15:33:45 +00:00
|
|
|
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
|
2022-03-08 05:35:34 +00:00
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --workspace --verbose
|
2021-03-11 07:02:24 +00:00
|
|
|
- name: Test
|
2022-03-18 15:33:45 +00:00
|
|
|
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
|
2022-03-08 05:35:34 +00:00
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --workspace --verbose
|
2021-06-14 05:06:39 +00:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
2021-03-23 17:30:05 +00:00
|
|
|
|
2022-03-08 05:02:25 +00:00
|
|
|
rustfmt:
|
|
|
|
name: Check formatting
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-04-21 15:37:23 +00:00
|
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
2022-03-18 15:33:50 +00:00
|
|
|
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
|
2022-03-08 05:02:25 +00:00
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
profile: minimal
|
|
|
|
components: rustfmt
|
|
|
|
override: true
|
2022-03-18 15:33:45 +00:00
|
|
|
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505
|
2022-03-08 05:02:25 +00:00
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
|
2022-05-03 21:08:55 +00:00
|
|
|
clippy-check:
|
|
|
|
name: Clippy check
|
2022-03-19 05:19:24 +00:00
|
|
|
permissions:
|
|
|
|
checks: write
|
2022-02-24 04:14:47 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-04-21 15:37:23 +00:00
|
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
2022-03-18 15:33:50 +00:00
|
|
|
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af
|
2022-02-24 04:14:47 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2022-03-08 05:23:53 +00:00
|
|
|
profile: minimal
|
2022-02-24 04:14:47 +00:00
|
|
|
components: clippy
|
|
|
|
override: true
|
2022-03-17 16:00:08 +00:00
|
|
|
- uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d
|
2022-02-24 04:14:47 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-05-03 22:20:18 +00:00
|
|
|
args: --all-features --workspace --all-targets
|