2022-07-21 09:47:27 +03:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["master"]
|
|
|
|
pull_request:
|
|
|
|
branches: ["master"]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: ["ubuntu-latest"]
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Cache cargo registry
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cargo/registry
|
|
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
|
|
|
|
|
|
|
|
- name: Cache cargo index
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cargo/git
|
|
|
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
|
|
|
|
|
|
|
|
- name: Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cargo build --verbose
|
|
|
|
|
|
|
|
- uses: isbang/compose-action@v0.1
|
|
|
|
|
|
|
|
- name: Run tests
|
2022-07-21 09:51:49 +03:00
|
|
|
uses: actions-rs/cargo@v1
|
2022-07-21 09:47:27 +03:00
|
|
|
with:
|
|
|
|
command: test
|
2022-07-21 09:51:49 +03:00
|
|
|
args: --all-features --verbose
|
2022-07-21 09:47:27 +03:00
|
|
|
|