From 18a4f14976c51024adcb8ebd058962052cce9a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 21 Jul 2023 12:45:43 +0200 Subject: [PATCH 1/7] move hitl job, drop --- .github/workflows/ci.yml | 32 -------------------------------- .github/workflows/hitl.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/hitl.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38e766724..fa95dee3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,35 +122,3 @@ jobs: # Install depedencies at our cache location mv ../target/thumbv7em-none-eabihf/doc src/firmware mdbook build - - hitl-trigger: - runs-on: ubuntu-latest - environment: hitl - if: ${{ github.event_name == 'merge_group' }} - - steps: - - uses: LouisBrunner/checks-action@v1.1.1 - id: hitl-check - with: - repo: ${{ github.repository }} - sha: ${{ github.event.head_commit.id }} - token: ${{ github.token }} - name: HITL Run Status - status: in_progress - details_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" - output: | - {"summary": "Starting..."} - - - uses: peter-evans/repository-dispatch@v1 - with: - token: ${{ secrets.DISPATCH_PAT }} - event-type: stabilizer - repository: quartiq/hitl - client-payload: | - {"github": ${{ toJson(github) }}, "check_id": ${{steps.hitl-check.outputs.check_id}}} - - - uses: fountainhead/action-wait-for-check@v1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: HITL Run Status - ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl.yml new file mode 100644 index 000000000..3a3ecf1fa --- /dev/null +++ b/.github/workflows/hitl.yml @@ -0,0 +1,37 @@ +name: HITL +on: + merge_group: +env: + CARGO_TERM_COLOR: always + +jobs: + hitl-trigger: + runs-on: ubuntu-latest + environment: hitl + + steps: + - uses: LouisBrunner/checks-action@v1.1.1 + id: hitl-check + with: + repo: ${{ github.repository }} + sha: ${{ github.event.head_commit.id }} + token: ${{ github.token }} + name: HITL Run Status + status: in_progress + details_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" + output: | + {"summary": "Starting..."} + + - uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.DISPATCH_PAT }} + event-type: stabilizer + repository: quartiq/hitl + client-payload: | + {"github": ${{ toJson(github) }}, "check_id": ${{steps.hitl-check.outputs.check_id}}} + + - uses: fountainhead/action-wait-for-check@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: HITL Run Status + ref: ${{ github.event.pull_request.head.sha }} From 1bbb1d9d4dc6f30e7342b7458a25113b8a61e28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 21 Jul 2023 13:09:01 +0200 Subject: [PATCH 2/7] add comment, revert --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/hitl.yml | 37 ------------------------------------- 2 files changed, 34 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/hitl.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa95dee3d..4641ba920 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,3 +122,37 @@ jobs: # Install depedencies at our cache location mv ../target/thumbv7em-none-eabihf/doc src/firmware mdbook build + + hitl-trigger: + runs-on: ubuntu-latest + environment: hitl + # This crucially marks the job as "skipped" when not in the merge queue thus + # counting as passing the required check when adding it to the merge queue. + if: ${{ github.event_name == 'merge_group' }} + + steps: + - uses: LouisBrunner/checks-action@v1.1.1 + id: hitl-check + with: + repo: ${{ github.repository }} + sha: ${{ github.event.head_commit.id }} + token: ${{ github.token }} + name: HITL Run Status + status: in_progress + details_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" + output: | + {"summary": "Starting..."} + + - uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.DISPATCH_PAT }} + event-type: stabilizer + repository: quartiq/hitl + client-payload: | + {"github": ${{ toJson(github) }}, "check_id": ${{steps.hitl-check.outputs.check_id}}} + + - uses: fountainhead/action-wait-for-check@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: HITL Run Status + ref: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl.yml deleted file mode 100644 index 3a3ecf1fa..000000000 --- a/.github/workflows/hitl.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: HITL -on: - merge_group: -env: - CARGO_TERM_COLOR: always - -jobs: - hitl-trigger: - runs-on: ubuntu-latest - environment: hitl - - steps: - - uses: LouisBrunner/checks-action@v1.1.1 - id: hitl-check - with: - repo: ${{ github.repository }} - sha: ${{ github.event.head_commit.id }} - token: ${{ github.token }} - name: HITL Run Status - status: in_progress - details_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" - output: | - {"summary": "Starting..."} - - - uses: peter-evans/repository-dispatch@v1 - with: - token: ${{ secrets.DISPATCH_PAT }} - event-type: stabilizer - repository: quartiq/hitl - client-payload: | - {"github": ${{ toJson(github) }}, "check_id": ${{steps.hitl-check.outputs.check_id}}} - - - uses: fountainhead/action-wait-for-check@v1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: HITL Run Status - ref: ${{ github.event.pull_request.head.sha }} From 7ae751aa53809aea551e8b0a81c0cf38c44cf70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 21 Jul 2023 13:10:26 +0200 Subject: [PATCH 3/7] link note --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4641ba920..ef0896712 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,6 +128,8 @@ jobs: environment: hitl # This crucially marks the job as "skipped" when not in the merge queue thus # counting as passing the required check when adding it to the merge queue. + # See + # https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution#overview if: ${{ github.event_name == 'merge_group' }} steps: From 0af712f762cdaf13ca1630b6c6053a2c1208d42e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 21 Jul 2023 13:14:31 +0200 Subject: [PATCH 4/7] allow both failure in beta and nightly --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef0896712..41850e9d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: compile: runs-on: ubuntu-latest - continue-on-error: ${{ matrix.toolchain == 'nightly' }} + continue-on-error: ${{ matrix.optional }} strategy: matrix: # keep MSRV in sync in ci.yaml and Cargo.toml @@ -58,8 +58,10 @@ jobs: include: - toolchain: beta features: '' + optional: true - toolchain: nightly features: nightly + optional: true steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 From 962b6852363cc53bbeebaf5e7ca79815e59adddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 21 Jul 2023 13:17:41 +0200 Subject: [PATCH 5/7] consistent wording --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41850e9d5..8fa3a95b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: compile: runs-on: ubuntu-latest - continue-on-error: ${{ matrix.optional }} + continue-on-error: ${{ matrix.continue-on-error }} strategy: matrix: # keep MSRV in sync in ci.yaml and Cargo.toml @@ -58,10 +58,10 @@ jobs: include: - toolchain: beta features: '' - optional: true + continue-on-error: true - toolchain: nightly features: nightly - optional: true + continue-on-error: true steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 From 816259b3422db852a5395ee8677107941471cd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 21 Jul 2023 13:22:59 +0200 Subject: [PATCH 6/7] dummy commit --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fa3a95b6..c1c9f8f71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,7 +133,6 @@ jobs: # See # https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution#overview if: ${{ github.event_name == 'merge_group' }} - steps: - uses: LouisBrunner/checks-action@v1.1.1 id: hitl-check From 9815fd317682224d7a1b57ff317227ad64992e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 21 Jul 2023 13:42:07 +0200 Subject: [PATCH 7/7] fix continue-on-error --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1c9f8f71..6c608f78b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,7 @@ jobs: # keep MSRV in sync in ci.yaml and Cargo.toml toolchain: [stable, '1.65.0'] features: [''] + continue-on-error: [false] include: - toolchain: beta features: ''