Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHA workflows for each device type #530

Merged
merged 3 commits into from
Oct 17, 2024
Merged
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
17 changes: 0 additions & 17 deletions .github/workflows/build_and_deploy.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/generic-aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Generic AARCH64

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
# - 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
force-finalize:
description: Force finalize of the build (implicitly enables hostapp and S3 deployments)
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

jobs:
yocto:
name: Yocto
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: generic-aarch64
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com' }}
# Use QEMU workers for testing and run cloud suite against balenaCloud production
test_matrix: >
{
"test_suite": ["os","cloud","hup"],
"environment": ["balena-cloud.com"],
"worker_type": ["qemu"],
"runs_on": [["self-hosted", "X64", "kvm"]]
}
53 changes: 53 additions & 0 deletions .github/workflows/generic-amd64-fs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Generic x86_64 (GPT) fs
rcooke-warwick marked this conversation as resolved.
Show resolved Hide resolved

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
# - 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
force-finalize:
description: Force finalize of the build (implicitly enables hostapp and S3 deployments)
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

jobs:
yocto:
name: Yocto
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: generic-amd64-fs
rcooke-warwick marked this conversation as resolved.
Show resolved Hide resolved
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com+generic-amd64-fs-signing-key' }}
# Sign image for secure boot
sign-image: true
# FIXME: Disable finalize-on-push until we have a test to verify that SIGN_KMOD_KEY_APPEND is set
finalize-on-push-if-tests-passed: false
60 changes: 60 additions & 0 deletions .github/workflows/generic-amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Generic x86_64 (GPT)

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
- 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
force-finalize:
description: Force finalize of the build (implicitly enables hostapp and S3 deployments)
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

jobs:
yocto:
name: Yocto
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: generic-amd64
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com+sign-api-key' }}
# Sign image for secure boot
sign-image: true
# Use QEMU workers for testing and run cloud suite against balenaCloud production
test_matrix: >
{
"test_suite": ["os","cloud","hup"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we pin the action to balena-os/balena-yocto-scripts#412 and add secureboot to this matrix to test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually, some other things need to happen first:

  1. Test workflows with artifact encryption for private devices balena-raspberrypi#1171 needs to be able to build, requires meta-balena bump
  2. Encrypt balenaOS artifacts at rest in GitHub balena-yocto-scripts#410 needs to merge to enable artifact encryption
  3. Expose secure boot testing features via matrix input balena-yocto-scripts#412 needs to be rebased with artifact encryption

Essentially I don't want to merge Anton's encryption PR without testing it with either private device types or secure boot device types. Unfortunately all of those devices are currently not building without the meta balena change, and cannot be allowed to merge without the yocto-scripts finalize fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I could combine 2 + 3 into one PR to make testing easier, but until we get a new meta-balena version we are still kinda blocked. I can manually update meta-balena in this PR to the unmerged branch I guess...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually bumped meta-balena here, since it's only for testing anyway and not merging.

If artifact encryption looks good on that PR, I can merge the feature and unblock ourselves further.

"environment": ["balena-cloud.com"],
"worker_type": ["qemu"],
"runs_on": [["self-hosted", "X64", "kvm"]],
"secure_boot": ["sb",""]
}
49 changes: 49 additions & 0 deletions .github/workflows/kontron-come-xelx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Kontron COMe xELx

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
# - 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
force-finalize:
description: Force finalize of the build (implicitly enables hostapp and S3 deployments)
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

jobs:
yocto:
name: Yocto
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: kontron-come-xelx
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com' }}
53 changes: 53 additions & 0 deletions .github/workflows/studio-automatedx86-sb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Studio Automated X86 SB

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
# - 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
force-finalize:
description: Force finalize of the build (implicitly enables hostapp and S3 deployments)
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

jobs:
yocto:
name: Yocto
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: studio-automatedx86-sb
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com+studio-automatedx86-sb-signing-key' }}
# Sign image for secure boot
sign-image: true
# FIXME: Disable finalize-on-push until we have a test to verify that SIGN_KMOD_KEY_APPEND is set
finalize-on-push-if-tests-passed: false
2 changes: 1 addition & 1 deletion layers/meta-balena
Submodule meta-balena updated 50 files
+3 −0 .github/renovate.json
+1 −1 .github/workflows/bananapi-m1-plus.yml
+1 −1 .github/workflows/beaglebone-ai64.yml
+1 −1 .github/workflows/beaglebone-pocket.yml
+1 −1 .github/workflows/beaglebone.yml
+1 −1 .github/workflows/generic-aarch64.yml
+1 −1 .github/workflows/generic-amd64.yml
+1 −1 .github/workflows/genericx86-64-ext.yml
+1 −1 .github/workflows/genericx86-64.yml
+1 −1 .github/workflows/imx6ul-var-dart.yml
+1 −1 .github/workflows/imx7-var-som.yml
+1 −1 .github/workflows/iot-gate-imx8.yml
+1 −1 .github/workflows/iot-gate-imx8plus.yml
+1 −1 .github/workflows/jetson-agx-orin-devkit.yml
+1 −1 .github/workflows/jetson-nano.yml
+1 −1 .github/workflows/jetson-tx2.yml
+1 −1 .github/workflows/jetson-xavier.yml
+1 −0 .github/workflows/meta-balena-esr.yml
+1 −1 .github/workflows/nanopi-neo-air.yml
+1 −1 .github/workflows/nanopi-r2c.yml
+1 −1 .github/workflows/orangepi-plus2.yml
+1 −1 .github/workflows/owa5x.yml
+1 −1 .github/workflows/raspberrypi.yml
+1 −1 .github/workflows/raspberrypi2.yml
+1 −1 .github/workflows/raspberrypi3-64.yml
+1 −1 .github/workflows/raspberrypi3.yml
+1 −1 .github/workflows/raspberrypi4-64.yml
+1 −1 .github/workflows/revpi-connect-4.yml
+1 −1 .github/workflows/revpi-connect-s.yml
+1 −1 .github/workflows/revpi-connect.yml
+1 −1 .github/workflows/revpi-core-3.yml
+1 −1 .github/workflows/rockpi-4b-rk3399.yml
+1 −1 .github/workflows/surface-go.yml
+1 −1 .github/workflows/surface-pro-6.yml
+1 −0 .github/workflows/update-backports.yml
+1 −1 .github/workflows/var-som-mx6..yml
+411 −0 .versionbot/CHANGELOG.yml
+146 −0 CHANGELOG.md
+1 −1 meta-balena-common/conf/distro/include/balena-os.inc
+29 −0 meta-balena-common/recipes-connectivity/modemmanager/balena-files/0004-bearer-qmi-Fix-SIM7100E-crash.patch
+1 −0 meta-balena-common/recipes-connectivity/modemmanager/modemmanager_%.bbappend
+1 −1 meta-balena-common/recipes-containers/mkfs-hostapp-native/files/Dockerfile
+123 −20 meta-balena-common/recipes-core/initrdscripts/files/cryptsetup-efi-tpm
+2 −2 meta-balena-common/recipes-kernel/linux/files/Dockerfile
+2 −1 meta-balena-rust/recipes-devtools/rust/rust-llvm.inc
+32 −0 meta-balena-rust/recipes-devtools/rust/rust-llvm/0003-Support-Add-missing-cstdint-header-to-Signals.h.patch
+1 −1 tests/leviathan
+80 −11 tests/suites/cloud/suite.js
+9 −70 tests/suites/cloud/tests/ssh-auth/index.js
+3 −18 tests/suites/os/tests/engine-socket/index.js