name: Continuous Integration on: push: paths: - '**.rs' - 'Cargo.lock' - 'Cargo.toml' pull_request: paths: - '**.rs' - 'Cargo.lock' - 'Cargo.toml' jobs: check: name: Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install dependencies run: | sudo apt -qq update sudo apt install -y lld - uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly override: true - uses: actions-rs/cargo@v1 with: command: check args: --all-features test: name: Test Suite runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install dependencies run: | sudo apt -qq update sudo apt install -y libxkbcommon-dev lld - uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly override: true - uses: actions-rs/cargo@v1 with: command: test fmt: name: Rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check clippy: name: Clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install dependencies run: | sudo apt -qq update sudo apt install -y lld - uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly override: true - run: rustup component add clippy - uses: actions-rs/cargo@v1 with: command: clippy args: --all -- -D warnings