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

[Don't Merge] Test GHA on a new && private device type #751

Closed
wants to merge 8 commits into from
Closed
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
46 changes: 0 additions & 46 deletions .github/workflows/intel-nuc.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generic x86_64 (legacy MBR)
name: Test Private

on:
# With these triggers the Yocto jobs will run
Expand All @@ -13,29 +13,25 @@ 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/yocto-build-deploy.yml@v1.25.3
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@e3adc81b1e717df4b78b545e65c1dbfca3e67f0e
# 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
machine: test-private
# Needed for testing - defaults to production
environment: balena-staging.com
deploy-hostapp: true #needed for testing deploy
# Use qemu workers for testing
test_matrix: >
{
Expand Down
10 changes: 10 additions & 0 deletions layers/meta-balena-genericx86/conf/machine/test-private.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#@TYPE: Machine
##@NAME: test-private
##@DESCRIPTION: Machine configuration for an extra configured genericx86-64 device

MACHINEOVERRIDES = "genericx86-64-ext:${MACHINE}"
include conf/machine/genericx86-64-ext.conf

FIRMWARE_COMPRESSION ?= "1"

MACHINE_FEATURES += " efi raid"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Supported machines
#MACHINE ?= "genericx86-64"
#MACHINE ?= "genericx86-64-ext"
#MACHINE ?= "test-private"
#MACHINE ?= "surface-go"
#MACHINE ?= "surface-pro-6"

Expand Down
62 changes: 62 additions & 0 deletions test-private.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
deviceTypesCommon = require '@resin.io/device-types/common'
{ networkOptions, commonImg, instructions } = deviceTypesCommon

DISABLE_SECURE_BOOT = 'Make sure Secure Boot is disabled in BIOS.'
GENERIC_FLASH = '''
Please make sure you do not have any other USB keys inserted.
Power up the hardware. Make sure you have a keyboard connected.
Press the F10 key (may differ on some platforms) while BIOS is loading in order to enter the boot menu.
Next, select the name of your USB key.
'''

GENERIC_POWERON = 'Power on your device.'

postProvisioningInstructions = [
instructions.BOARD_SHUTDOWN
instructions.REMOVE_INSTALL_MEDIA
GENERIC_POWERON
]

module.exports =
version: 1
slug: 'test-private'
aliases: [ 'test-private' ]
name: 'Test Private'
arch: 'amd64'
state: 'new'

stateInstructions:
postProvisioning: postProvisioningInstructions

instructions: [
instructions.ETCHER_USB
instructions.EJECT_USB
instructions.FLASHER_WARNING
DISABLE_SECURE_BOOT
GENERIC_FLASH
].concat(postProvisioningInstructions)

gettingStartedLink:
windows: 'https://www.balena.io/docs/learn/getting-started/intel-nuc/nodejs/'
osx: 'https://www.balena.io/docs/learn/getting-started/intel-nuc/nodejs/'
linux: 'https://www.balena.io/docs/learn/getting-started/intel-nuc/nodejs/'

yocto:
machine: 'test-private'
image: 'balena-image-flasher'
fstype: 'balenaos-img'
version: 'yocto-honister'
deployArtifact: 'balena-image-flasher-test-private.balenaos-img'
deployFlasherArtifact: 'balena-image-flasher-test-private.balenaos-img'
deployRawArtifact: 'balena-image-test-private.balenaos-img'
compressed: true

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

options: [ networkOptions.group ]

initialization: commonImg.initialization
Loading