From f26e0b100e0485132e5285368debed9b49b0dc93 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 11:25:58 +0200 Subject: [PATCH 01/10] Adding check wait for HITL --- .github/workflows/hitl.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl.yml index b8611d4..a888e06 100644 --- a/.github/workflows/hitl.yml +++ b/.github/workflows/hitl.yml @@ -16,3 +16,9 @@ jobs: event-type: stabilizer repository: quartiq/hitl client-payload: '{"github": ${{ toJson(github) }}}' + + - uses: fountainhead/action-wait-for-check@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: HITL + ref: ${{ github.event.pull_request.head.sha }} From 9d22febe64fbd1f8f69d08b3d7c80bbefad73a81 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 11:27:27 +0200 Subject: [PATCH 02/10] Fixing indent --- .github/workflows/hitl.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl.yml index a888e06..5f920fc 100644 --- a/.github/workflows/hitl.yml +++ b/.github/workflows/hitl.yml @@ -17,8 +17,8 @@ jobs: repository: quartiq/hitl client-payload: '{"github": ${{ toJson(github) }}}' - - uses: fountainhead/action-wait-for-check@v1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: HITL - ref: ${{ github.event.pull_request.head.sha }} + - uses: fountainhead/action-wait-for-check@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: HITL + ref: ${{ github.event.pull_request.head.sha }} From f83973f1a261ea9f916c5eb8b3e7e39f1b15514a Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 11:43:30 +0200 Subject: [PATCH 03/10] Renaming HITL workflow --- .github/workflows/hitl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl.yml index 5f920fc..0a39a6e 100644 --- a/.github/workflows/hitl.yml +++ b/.github/workflows/hitl.yml @@ -1,4 +1,4 @@ -name: HITL +name: HITL Run Request on: workflow_dispatch: From 26d83da684d6eeb3486c4e99cc200d81dce6378d Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 12:33:54 +0200 Subject: [PATCH 04/10] Adding sleep on startup --- .github/workflows/hitl.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl.yml index 0a39a6e..85a00d4 100644 --- a/.github/workflows/hitl.yml +++ b/.github/workflows/hitl.yml @@ -17,6 +17,9 @@ jobs: repository: quartiq/hitl client-payload: '{"github": ${{ toJson(github) }}}' + - name: Wait for startup + runs: sleep 30 + - uses: fountainhead/action-wait-for-check@v1.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} From 48b69fa9e622aa33e062387c8fd574bc3442eb1c Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 12:34:41 +0200 Subject: [PATCH 05/10] Fixing run --- .github/workflows/hitl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl.yml index 85a00d4..b594353 100644 --- a/.github/workflows/hitl.yml +++ b/.github/workflows/hitl.yml @@ -18,7 +18,7 @@ jobs: client-payload: '{"github": ${{ toJson(github) }}}' - name: Wait for startup - runs: sleep 30 + run: sleep 30 - uses: fountainhead/action-wait-for-check@v1.0.0 with: From de554d08d9e6d83e3d73e5eb7276f872d2b4fdb3 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 13:24:46 +0200 Subject: [PATCH 06/10] Renaming to HITL Trigger --- .github/workflows/{hitl.yml => hitl_trigger.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{hitl.yml => hitl_trigger.yml} (96%) diff --git a/.github/workflows/hitl.yml b/.github/workflows/hitl_trigger.yml similarity index 96% rename from .github/workflows/hitl.yml rename to .github/workflows/hitl_trigger.yml index b594353..7b82503 100644 --- a/.github/workflows/hitl.yml +++ b/.github/workflows/hitl_trigger.yml @@ -1,4 +1,4 @@ -name: HITL Run Request +name: HITL Trigger on: workflow_dispatch: From 02aa5d2ed76f7010be5c655ba935dedbec96efa5 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 13:35:23 +0200 Subject: [PATCH 07/10] Adding program step to HITL runner --- .github/workflows/hitl_trigger.yml | 2 +- hitl/run.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hitl_trigger.yml b/.github/workflows/hitl_trigger.yml index 7b82503..6897847 100644 --- a/.github/workflows/hitl_trigger.yml +++ b/.github/workflows/hitl_trigger.yml @@ -23,5 +23,5 @@ jobs: - uses: fountainhead/action-wait-for-check@v1.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} - checkName: HITL + checkName: HITL Run Status ref: ${{ github.event.pull_request.head.sha }} diff --git a/hitl/run.sh b/hitl/run.sh index 8fe9a3a..156c128 100755 --- a/hitl/run.sh +++ b/hitl/run.sh @@ -15,6 +15,8 @@ python3 -m venv --system-site-packages py . py/bin/activate python3 -m pip install -r requirements.txt +cargo flash --bin dual-iir --release --chip STM32H743ZITx + # Test pinging Stabilizer. This exercises that: # * DHCP is functional and an IP has been acquired # * Stabilizer's network is functioning as intended From 02b6b3873130d0edd6111e65b6874da731ae2248 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 13:36:35 +0200 Subject: [PATCH 08/10] Renaming job to hitl-trigger --- .github/workflows/hitl_trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hitl_trigger.yml b/.github/workflows/hitl_trigger.yml index 6897847..62abb96 100644 --- a/.github/workflows/hitl_trigger.yml +++ b/.github/workflows/hitl_trigger.yml @@ -6,7 +6,7 @@ on: branches: [ master ] jobs: - hitl: + hitl-trigger: runs-on: ubuntu-latest environment: hitl steps: From 5bd46593b5b2a5a999a5e8a349a4a3d22b6baa06 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Fri, 9 Apr 2021 13:43:15 +0200 Subject: [PATCH 09/10] Using manual elf path --- hitl/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hitl/run.sh b/hitl/run.sh index 156c128..483a8a3 100755 --- a/hitl/run.sh +++ b/hitl/run.sh @@ -15,7 +15,7 @@ python3 -m venv --system-site-packages py . py/bin/activate python3 -m pip install -r requirements.txt -cargo flash --bin dual-iir --release --chip STM32H743ZITx +cargo flash --elf target/thumbv7em-none-eabihf/release/dual-iir --chip STM32H743ZITx # Test pinging Stabilizer. This exercises that: # * DHCP is functional and an IP has been acquired From c4336f7bf9a15ff6677e5dc82081329b8cffa48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 9 Apr 2021 21:40:58 +0200 Subject: [PATCH 10/10] ci: add PR labeler --- .github/labeler.yml | 4 ++++ .github/workflows/labeler.yml | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..9b3dd5c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,4 @@ +# add changes-hitl label if any hitl scripts are changed +# REVIEW those changes before approving HITL deployment! +changes-hitl: + - any: [hitl/*] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..82b4e70 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,12 @@ +name: "Pull Request Labeler" +on: + pull_request_target: + branches: [master] + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"