single platform builds (#2365)

This commit is contained in:
Aiden McClelland
2023-07-18 19:50:27 -06:00
committed by GitHub
parent 11c21b5259
commit c2db4390bb

View File

@@ -8,7 +8,7 @@ on:
type: choice type: choice
description: Environment description: Environment
options: options:
- "<NONE>" - NONE
- dev - dev
- unstable - unstable
- dev-unstable - dev-unstable
@@ -18,6 +18,16 @@ on:
options: options:
- standard - standard
- fast - fast
platform:
type: choice
description: Platform
options:
- ALL
- x86_64
- x86_64-nonfree
- aarch64
- aarch64-nonfree
- raspberrypi
push: push:
branches: branches:
- master - master
@@ -29,7 +39,7 @@ on:
env: env:
NODEJS_VERSION: "18.15.0" NODEJS_VERSION: "18.15.0"
ENVIRONMENT: '${{ fromJson(format(''["{0}", ""]'', github.event.inputs.environment || ''dev''))[github.event.inputs.environment == ''<NONE>''] }}' ENVIRONMENT: '${{ fromJson(format(''["{0}", ""]'', github.event.inputs.environment || ''dev''))[github.event.inputs.environment == ''NONE''] }}'
jobs: jobs:
all: all:
@@ -37,27 +47,37 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: platform: >-
[x86_64, x86_64-nonfree, aarch64, aarch64-nonfree, raspberrypi] ${{
fromJson(
format(
'[
["{0}"],
["x86_64", "x86_64-nonfree", "aarch64", "aarch64-nonfree", "raspberrypi"]
]',
github.event.inputs.platform || 'ALL'
)
)[(github.event.inputs.platform || 'ALL') == 'ALL']
}}
runs-on: >- runs-on: >-
${{ ${{
fromJson( fromJson(
format( format(
'["ubuntu-22.04", "{0}"]', '["ubuntu-22.04", "{0}"]',
fromJson('{ fromJson('{
"x86_64": "buildjet-32vcpu-ubuntu-2204", "x86_64": ["buildjet-32vcpu-ubuntu-2204", "buildjet-32vcpu-ubuntu-2204"],
"x86_64-nonfree": "buildjet-32vcpu-ubuntu-2204", "x86_64-nonfree": ["buildjet-32vcpu-ubuntu-2204", "buildjet-32vcpu-ubuntu-2204"],
"aarch64": "buildjet-8vcpu-ubuntu-2204-arm", "aarch64": ["buildjet-8vcpu-ubuntu-2204-arm", "buildjet-32vcpu-ubuntu-2204-arm"],
"aarch64-nonfree": "buildjet-8vcpu-ubuntu-2204-arm", "aarch64-nonfree": ["buildjet-8vcpu-ubuntu-2204-arm", "buildjet-32vcpu-ubuntu-2204-arm"],
"raspberrypi": "buildjet-16vcpu-ubuntu-2204-arm", "raspberrypi": ["buildjet-16vcpu-ubuntu-2204-arm", "buildjet-32vcpu-ubuntu-2204-arm"],
}')[matrix.platform] }')[matrix.platform][github.event.inputs.platform == matrix.platform]
) )
)[github.event.inputs.runner == 'fast'] )[github.event.inputs.runner == 'fast']
}} }}
steps: steps:
- run: | - run: |
sudo mount -t tmpfs tmpfs . sudo mount -t tmpfs tmpfs .
if: ${{ github.event.inputs.runner == 'fast' && (matrix.platform == 'x86_64' || matrix.platform == 'x86_64-nonfree') }} if: ${{ github.event.inputs.runner == 'fast' && (matrix.platform == 'x86_64' || matrix.platform == 'x86_64-nonfree' || github.event.inputs.platform == matrix.platform) }}
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with: