From b16359424980b167b86c756809bd8009813e61ec Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Sat, 7 May 2022 22:08:52 +0200 Subject: [PATCH 1/2] Update rust.yml --- .github/workflows/rust.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 79251f51..de801e19 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [ main ] + branches: [ master ] pull_request: - branches: [ main ] + branches: [ master ] env: CARGO_TERM_COLOR: always @@ -16,7 +16,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - name: Build and test + - run: rustup component add rustfmt + - run: rustup component add clippy + - run: cargo build --all-features + - run: cargo test --all-features + - run: cargo fmt --all -- --check + - run: cargo clippy --all-features --all-targets -- --deny warnings From d062e14349a0ce782b7faffcabee78cacdf4dfcb Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Sat, 7 May 2022 22:13:13 +0200 Subject: [PATCH 2/2] Update rust.yml --- .github/workflows/rust.yml | 41 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index de801e19..6a074f35 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,25 +1,22 @@ -name: Rust - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always - +name: rust +on: [push, pull_request] jobs: build: - - runs-on: ubuntu-latest - + strategy: + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - name: Build and test - - run: rustup component add rustfmt - - run: rustup component add clippy - - run: cargo build --all-features - - run: cargo test --all-features - - run: cargo fmt --all -- --check - - run: cargo clippy --all-features --all-targets -- --deny warnings + - uses: actions/checkout@v2 + - run: rustup update stable + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + - run: rustup component add rustfmt + - run: rustup component add clippy + - run: cargo build --all-features + - run: cargo test --all-features + - run: cargo fmt --all -- --check + - run: cargo clippy --all-features --all-targets -- --deny warnings