2021-06-02 14:04:49 +00:00
|
|
|
name: Continuous Integration
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_and_test:
|
2021-06-02 14:16:59 +00:00
|
|
|
name: ${{matrix.command.name}} (${{matrix.toolchain}})
|
2021-06-02 14:04:49 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-06-02 14:30:03 +00:00
|
|
|
toolchain: [stable, beta, nightly, 1.26.0, 1.27.0, 1.28.0, 1.29.0]
|
2021-06-02 14:15:59 +00:00
|
|
|
command:
|
|
|
|
- name: Check
|
|
|
|
command: check
|
|
|
|
args: ""
|
2021-06-02 14:29:30 +00:00
|
|
|
components: ""
|
2021-06-02 14:15:59 +00:00
|
|
|
- name: Test
|
|
|
|
command: test
|
|
|
|
args: ""
|
2021-06-02 14:29:30 +00:00
|
|
|
components: ""
|
2021-06-02 14:21:55 +00:00
|
|
|
include:
|
|
|
|
- toolchain: nightly
|
|
|
|
command:
|
|
|
|
name: Format
|
|
|
|
command: fmt
|
|
|
|
args: -- --check
|
2021-06-02 14:29:30 +00:00
|
|
|
components: rustfmt
|
|
|
|
- toolchain: stable
|
|
|
|
command:
|
|
|
|
name: Lint
|
|
|
|
command: clippy
|
|
|
|
args: ""
|
|
|
|
components: clippy
|
2021-06-02 14:04:49 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: ⚡ Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
target
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2021-06-02 14:15:59 +00:00
|
|
|
toolchain: ${{ matrix.toolchain }}
|
2021-06-02 14:21:55 +00:00
|
|
|
override: true
|
|
|
|
default: true
|
2021-06-02 14:29:30 +00:00
|
|
|
components: ${{matrix.command.components}}
|
2021-06-02 14:04:49 +00:00
|
|
|
|
2021-06-02 14:15:59 +00:00
|
|
|
- name: ${{matrix.command.name}}
|
2021-06-02 14:04:49 +00:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
2021-06-02 14:15:59 +00:00
|
|
|
command: ${{matrix.command.command}}
|
|
|
|
args: ${{matrix.command.args}}
|