Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/Build_RPS_AppKit-E8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build RPS for AppKit-E8 Hardware
name: Build and Run RPS on AppKit-E8 Hardware
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
contents: read
actions: read

jobs:
CI:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,3 +71,8 @@ jobs:
name: RPS_AppKit-E8-U85_HIL
path: |
./RockPaperScissors/AppKit-E8_USB/out

HARDWARE-RUN:
needs: [ CI ]
uses: ./.github/workflows/Run_RPS_AppKit-E8.yml
secrets: inherit
30 changes: 20 additions & 10 deletions .github/workflows/Run_RPS_AppKit-E8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,31 @@

name: Run RPS on AppKit-E8 Hardware
on:
workflow_dispatch:
workflow_run:
workflows: ["Build RPS for AppKit-E8 Hardware"]
types: [completed]
branches: [main]
workflow_call:

permissions:
contents: read
actions: read

jobs:
RUNNER-GATE:
if: ${{ github.repository != 'Arm-Examples/ModelNova' && github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest

steps:
- name: Notify Runner Restriction
run: |
MESSAGE="Workflows on the private runner are restricted for security reasons."
echo "${MESSAGE}"
{
echo "## ⚠️ AppKit-E8 hardware test was not run"
echo ""
echo "${MESSAGE}"
} >> "$GITHUB_STEP_SUMMARY"
exit 1

CI:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success') }}
if: ${{ ((github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) && github.repository == 'Arm-Examples/ModelNova') }}
runs-on: [self-hosted, rsp-p5-01]

steps:
Expand All @@ -38,10 +50,8 @@ jobs:
token: ${{ github.token }}

- name: Download Build Artifact
if: ${{ github.event_name == 'workflow_run' }}
uses: dawidd6/action-download-artifact@v17
uses: actions/download-artifact@v8
with:
run_id: ${{ github.event.workflow_run.id }}
name: RPS_AppKit-E8-U85_HIL
path: ./RockPaperScissors/AppKit-E8_USB/out

Expand All @@ -56,7 +66,7 @@ jobs:
nohup pyocd run --uid L96807771A --cbuild-run SDS+AppKit-E8-U85.cbuild-run.yml --timelimit 30 --eot > pyocd.out 2>&1 &

- name: Start the SDSIO server on the Raspberry Pi
working-directory: ./RockPaperScissors/AppKit-E8_USB
working-directory: ./RockPaperScissors/AppKit-E8_USB
run: |
sleep 2 # Delay to ensure that pyOCD is started
sdsio-server --control SDS.sdsio.yml --playback --exit-after-playback --no-progress-info | tee sdsio-server.log
Expand Down