name: Check Commit
on:
pull_request:
types:
- opened
- synchronize
concurrency:
group: check-commit-${{ github.event.repository.name }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
check-commit:
if: github.event.pull_request.merge == false
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
toolchain:
- x86_64-unknown-linux-gnu
version:
- stable
- nightly
include:
- toolchain: x86_64-unknown-linux-gnu
name: ${{ matrix.version }} - ${{ matrix.toolchain }}
steps:
- uses: actions/checkout@master
- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install libsnappy-dev lz4 bzip2 clang libclang-dev libclang1 llvm -y
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-${{ matrix.toolchain }}
default: true
- name: Run check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests
- name: Run test
uses: actions-rs/cargo@v1
with:
command: test
args: --all --bins --examples --tests
check_components:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
name: Check Components
steps:
- uses: actions/checkout@master
- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install libsnappy-dev lz4 bzip2 clang libclang-dev libclang1 llvm -y
- name: Setup
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: rustfmt,clippy
- name: fmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy
- name: doc
run: cargo doc