Skip to content

Commit

Permalink
Add cargo hack to check workflow (#974)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
flxo authored May 10, 2023
1 parent bb37ee4 commit a7b411b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit a7b411b

Please sign in to comment.