Skip to content

Commit

Permalink
iox-#5 Reuse build artifacts for clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Jun 27, 2022
1 parent e16d402 commit 3139716
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 33 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/format_lint_PR.yml

This file was deleted.

26 changes: 24 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,36 @@ env:
CARGO_TERM_COLOR: always

jobs:
pre-flight-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Check formatting
run: cargo fmt --check

build-test:
runs-on: ${{ matrix.os }}
needs: pre-flight-check
strategy:
matrix:
os: [ubuntu-latest, macOS-latest] #Todo add windows-latest
toolchain: [stable, nightly]

steps:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
rust-version: ${{ matrix.toolchain }}
toolchain: ${{ matrix.toolchain }}
components: clippy
override: true
- name: Setup cache
uses: actions/cache@v2
with:
Expand All @@ -39,11 +57,15 @@ jobs:
sudo apt install -y libacl1-dev libncurses5-dev
- name: Build
run: cargo build --all --examples
- if: startsWith(matrix.os, 'ubuntu-latest') == true && startsWith(matrix.toolchain, 'stable') == true
name: Run clippy # clippy can reuse the previous build artifacts
run: cargo clippy
- name: Run tests
run: cargo test -- --test-threads=1 # prevent running multiple RouDiEnvironments in parallel

coverage:
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- uses: actions/checkout@v3
- name: Setup Rust
Expand Down

0 comments on commit 3139716

Please sign in to comment.