Skip to content

Commit

Permalink
Add build-only GHA workflows for missing devices
Browse files Browse the repository at this point in the history
For meta-balena PRs we only want to test virtual devices,
but we will do a sanity build for many types.

Change-type: patch
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Jul 17, 2024
1 parent 5b9716f commit af70358
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 62 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/generic-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,13 @@ on:
branches:
- "main"
- "master"
# push:
# tags:
# - v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# - v20[0-9][0-9].[0-1]?[1470].[0-9]+
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

jobs:
yocto:
name: Yocto
# FIXME: This workflow has dependencies on scripts in the balena-yocto-scripts repository
# which is pinned separately as a submodule in the device repo. Expect some drift but try to retain compatibility.
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].3
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].7
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
Expand All @@ -34,8 +28,6 @@ jobs:
secrets: inherit
with:
machine: generic-amd64
# Needed for testing - defaults to production
environment: balena-staging.com
device-repo: balena-os/balena-generic
device-repo-ref: master
# Pin to the current commit
Expand All @@ -44,11 +36,11 @@ jobs:
deploy-s3: false
deploy-hostapp: false
deploy-ami: false
# Use qemu workers for testing
# Use QEMU workers for testing and run cloud suite against balenaCloud production
test_matrix: >
{
"test_suite": ["os","cloud","hup"],
"environment": ["bm.balena-dev.com"],
"environment": ["balena-cloud.com"],
"worker_type": ["qemu"],
"runs_on": [["self-hosted", "X64", "kvm"]]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Intel NUC
name: Generic x86_64 (legacy MBR)

on:
# With these triggers the Yocto jobs will run
Expand All @@ -13,29 +13,21 @@ on:
branches:
- "main"
- "master"
# push:
# tags:
# - v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# - v20[0-9][0-9].[0-1]?[1470].[0-9]+
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

jobs:
yocto:
name: Yocto
# FIXME: This workflow has dependencies on scripts in the balena-yocto-scripts repository
# which is pinned separately as a submodule in the device repo. Expect some drift but try to retain compatibility.
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].3
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].7
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: genericx86-64
# Needed for testing - defaults to production
environment: balena-staging.com
machine: genericx86-64-ext
device-repo: balena-os/balena-intel
device-repo-ref: master
# Pin to the current commit
Expand All @@ -44,11 +36,11 @@ jobs:
deploy-s3: false
deploy-hostapp: false
deploy-ami: false
# Use autokit workers for testing and run on free hosted runners
# Use QEMU workers for testing and run cloud suite against balenaCloud production
test_matrix: >
{
"test_suite": ["os","cloud","hup"],
"environment": ["bm.balena-dev.com"],
"worker_type": ["testbot"],
"runs_on": [["ubuntu-latest"]]
"environment": ["balena-cloud.com"],
"worker_type": ["qemu"],
"runs_on": [["self-hosted", "X64", "kvm"]]
}
22 changes: 3 additions & 19 deletions .github/workflows/genericx86-64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generic x86_64 (legacy MBR)
name: Intel NUC

on:
# With these triggers the Yocto jobs will run
Expand All @@ -13,29 +13,21 @@ on:
branches:
- "main"
- "master"
# push:
# tags:
# - v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# - v20[0-9][0-9].[0-1]?[1470].[0-9]+
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

jobs:
yocto:
name: Yocto
# FIXME: This workflow has dependencies on scripts in the balena-yocto-scripts repository
# which is pinned separately as a submodule in the device repo. Expect some drift but try to retain compatibility.
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].3
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].7
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: genericx86-64-ext
# Needed for testing - defaults to production
environment: balena-staging.com
machine: genericx86-64
device-repo: balena-os/balena-intel
device-repo-ref: master
# Pin to the current commit
Expand All @@ -44,11 +36,3 @@ jobs:
deploy-s3: false
deploy-hostapp: false
deploy-ami: false
# Use qemu workers for testing
test_matrix: >
{
"test_suite": ["os","cloud","hup"],
"environment": ["bm.balena-dev.com"],
"worker_type": ["qemu"],
"runs_on": [["self-hosted", "X64", "kvm"]]
}
38 changes: 38 additions & 0 deletions .github/workflows/raspberrypi3-64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Raspberry Pi 3 (using 64bit OS)

on:
# With these triggers the Yocto jobs will run
# in parallel with the Flowzone jobs, which is fine for now
# and allows us to better control what we want to test and when.
# It is expected that Flowzone could fail, but yocto jobs will run.
pull_request:
branches:
- "main"
- "master"
pull_request_target:
branches:
- "main"
- "master"

jobs:
yocto:
name: Yocto
# FIXME: This workflow has dependencies on scripts in the balena-yocto-scripts repository
# which is pinned separately as a submodule in the device repo. Expect some drift but try to retain compatibility.
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected]
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: raspberrypi3-64
device-repo: balena-os/balena-raspberrypi
device-repo-ref: master
# Pin to the current commit
meta-balena-ref: ${{ github.sha }}
# Don't deploy any artifacts for meta-balena build sanity workflows
deploy-s3: false
deploy-hostapp: false
deploy-ami: false
38 changes: 38 additions & 0 deletions .github/workflows/raspberrypi3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Raspberry Pi 3

on:
# With these triggers the Yocto jobs will run
# in parallel with the Flowzone jobs, which is fine for now
# and allows us to better control what we want to test and when.
# It is expected that Flowzone could fail, but yocto jobs will run.
pull_request:
branches:
- "main"
- "master"
pull_request_target:
branches:
- "main"
- "master"

jobs:
yocto:
name: Yocto
# FIXME: This workflow has dependencies on scripts in the balena-yocto-scripts repository
# which is pinned separately as a submodule in the device repo. Expect some drift but try to retain compatibility.
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected]
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: raspberrypi3
device-repo: balena-os/balena-raspberrypi
device-repo-ref: master
# Pin to the current commit
meta-balena-ref: ${{ github.sha }}
# Don't deploy any artifacts for meta-balena build sanity workflows
deploy-s3: false
deploy-hostapp: false
deploy-ami: false
18 changes: 1 addition & 17 deletions .github/workflows/raspberrypi4-64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,13 @@ on:
branches:
- "main"
- "master"
# push:
# tags:
# - v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# - v20[0-9][0-9].[0-1]?[1470].[0-9]+
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

jobs:
yocto:
name: Yocto
# FIXME: This workflow has dependencies on scripts in the balena-yocto-scripts repository
# which is pinned separately as a submodule in the device repo. Expect some drift but try to retain compatibility.
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].3
uses: balena-os/balena-yocto-scripts/.github/workflows/[email protected].7
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
Expand All @@ -34,8 +28,6 @@ jobs:
secrets: inherit
with:
machine: raspberrypi4-64
# Needed for testing - defaults to production
environment: balena-staging.com
device-repo: balena-os/balena-raspberrypi
device-repo-ref: master
# Pin to the current commit
Expand All @@ -44,11 +36,3 @@ jobs:
deploy-s3: false
deploy-hostapp: false
deploy-ami: false
# Use autokit workers for testing and run on free hosted runners
test_matrix: >
{
"test_suite": ["os","cloud","hup"],
"environment": ["bm.balena-dev.com"],
"worker_type": ["testbot"],
"runs_on": [["ubuntu-latest"]]
}

0 comments on commit af70358

Please sign in to comment.