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/hitl.yml b/.github/workflows/hitl_trigger.yml similarity index 55% rename from .github/workflows/hitl.yml rename to .github/workflows/hitl_trigger.yml index b8611d4..62abb96 100644 --- a/.github/workflows/hitl.yml +++ b/.github/workflows/hitl_trigger.yml @@ -1,4 +1,4 @@ -name: HITL +name: HITL Trigger on: workflow_dispatch: @@ -6,7 +6,7 @@ on: branches: [ master ] jobs: - hitl: + hitl-trigger: runs-on: ubuntu-latest environment: hitl steps: @@ -16,3 +16,12 @@ jobs: event-type: stabilizer repository: quartiq/hitl client-payload: '{"github": ${{ toJson(github) }}}' + + - name: Wait for startup + run: sleep 30 + + - 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/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 }}" diff --git a/hitl/run.sh b/hitl/run.sh index 8fe9a3a..483a8a3 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 --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 # * Stabilizer's network is functioning as intended