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 test-private device repository #10

Merged
merged 4 commits into from
Aug 16, 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
47 changes: 0 additions & 47 deletions .github/workflows/raspberrypi3.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/test-private.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Raspberry Pi 3

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
- v20[0-9][0-9].[0-1]?[1470].[0-9]+
pull_request_target:
branches:
- main
- master
# ESR branches glob pattern
- v20[0-9][0-9].[0-1]?[1470].[0-9]+
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/yocto-build-deploy.yml@188a1131b73519bdb99c489341f665142fbea042 ## latest from https://github.com/balena-os/balena-yocto-scripts/pull/386/commits
# 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
# Needed for testing - defaults to production
# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: balena-staging.com
test_matrix: >
{
"test_suite": ["os"],
"environment": ["bm.balena-dev.com"],
"runs_on": [["ubuntu-latest"]]
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 }}
11 changes: 11 additions & 0 deletions layers/meta-balena-raspberrypi/conf/machine/test-private.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#@TYPE: Machine
##@NAME: test-private
##@DESCRIPTION: Machine configuration for an extra configured genericx86-64 device


MACHINEOVERRIDES = "raspberrypi3:${MACHINE}"
include conf/machine/raspberrypi3.conf

# FIRMWARE_COMPRESSION ?= "1"

# MACHINE_FEATURES += " efi raid"
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#MACHINE ?= "raspberrypi"
#MACHINE ?= "raspberrypi2"
#MACHINE ?= "raspberrypi3"
#MACHINE ?= "test-private"
#MACHINE ?= "raspberrypi3-64"
#MACHINE ?= "revpi-connect"
#MACHINE ?= "revpi-connect-s"
Expand Down
42 changes: 42 additions & 0 deletions test-private.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
deviceTypesCommon = require '@resin.io/device-types/common'
{ networkOptions, commonImg, instructions } = deviceTypesCommon

module.exports =
version: 1
slug: 'test-private'
aliases: [ 'test-private' ]
name: 'Test Private'
arch: 'armv7hf'
state: 'released'
isDefault: true

imageDownloadAlerts: [
{
type: 'warning'
message: 'The Raspberry Pi 3 is not capable of connecting to 5GHz WiFi networks unless you use an external WiFi adapter that supports it. The Raspberry Pi 3 B+ is capable of connecting to both 5GHz and 2.4GHz networks.'
}
]

instructions: commonImg.instructions
gettingStartedLink:
windows: 'https://www.balena.io/docs/learn/getting-started/test-private/nodejs/'
osx: 'https://www.balena.io/docs/learn/getting-started/test-private/nodejs/'
linux: 'https://www.balena.io/docs/learn/getting-started/test-private/nodejs/'

options: [ networkOptions.group ]

yocto:
machine: 'test-private'
image: 'balena-image'
fstype: 'balenaos-img'
version: 'yocto-kirkstone'
deployArtifact: 'balena-image-test-private.balenaos-img'
compressed: true

configuration:
config:
partition:
primary: 1
path: '/config.json'

initialization: commonImg.initialization