From a7b411b205d2256440464282b26903d07ecddaa4 Mon Sep 17 00:00:00 2001 From: Felix Obenhuber Date: Wed, 10 May 2023 09:15:06 +0200 Subject: [PATCH] Add cargo hack to check workflow (#974) * Add cargo hack to check workflow * Cancel runs in same ref on push This will automatically cancel runs with the same head ref (i.e. a PR). Note that this will not cancel builds for pushes to branches (such as main). * Remove duplicate mold install --- .github/workflows/ci.yml | 26 +++++++++++++++++++++----- CHANGELOG.md | 2 ++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 814bf3309..8aff64c5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,9 @@ on: - 'dependabot/**' pull_request: workflow_dispatch: - +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true env: DOCKER_BUILDKIT: 1 @@ -92,6 +94,24 @@ jobs: command: check args: --all-features + hack: + name: Hack + runs-on: ubuntu-latest + steps: + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Cache + uses: Swatinem/rust-cache@v1 + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - name: Checkout + uses: actions/checkout@v3 + - name: Hack + run: cargo hack --feature-powerset check + test: name: Tests runs-on: ubuntu-latest @@ -107,8 +127,6 @@ jobs: uses: rui314/setup-mold@v1 - name: Cache uses: Swatinem/rust-cache@v1 - - name: Mold - uses: rui314/setup-mold@v1 - name: Checkout uses: actions/checkout@v3 - name: Install nextest @@ -193,8 +211,6 @@ jobs: uses: rui314/setup-mold@v1 - name: Cache uses: Swatinem/rust-cache@v1 - - name: Mold - uses: rui314/setup-mold@v1 - name: Checkout uses: actions/checkout@v3 - name: Install northstar-nstar diff --git a/CHANGELOG.md b/CHANGELOG.md index b1489c114..99f4f79da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This release bumps the MSRV of Northstar to 1.66.1. ([#884]). - runtime: Scheduling policy by manifest ([#970]) - tests: Patch manifest of prebuilt container (`northstar_tests::containers::with_manifest`) ([#973]) +- ci: Add [cargo-hack](https://github.com/taiki-e/cargo-hack) ([#974]) ## Changed @@ -82,6 +83,7 @@ This release bumps the MSRV of Northstar to 1.66.1. ([#884]). [#970]: https://github.com/esrlabs/northstar/pull/970 [#972]: https://github.com/esrlabs/northstar/pull/972 [#973]: https://github.com/esrlabs/northstar/pull/973 +[#974]: https://github.com/esrlabs/northstar/pull/974 # 0.7.1 (March 21th, 2023)