2024-06-13 21:02:38 +00:00
|
|
|
name: Electron Build & Test (+ Node + NaN) Pipeline
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
target-platform:
|
|
|
|
type: string
|
|
|
|
description: 'Platform to run on, can be macos or linux'
|
|
|
|
required: true
|
|
|
|
target-arch:
|
|
|
|
type: string
|
|
|
|
description: 'Arch to build for, can be x64, arm64 or arm'
|
|
|
|
required: true
|
|
|
|
build-runs-on:
|
|
|
|
type: string
|
|
|
|
description: 'What host to run the build'
|
|
|
|
required: true
|
|
|
|
test-runs-on:
|
|
|
|
type: string
|
|
|
|
description: 'What host to run the tests on'
|
|
|
|
required: true
|
|
|
|
build-container:
|
|
|
|
type: string
|
|
|
|
description: 'JSON container information for aks runs-on'
|
|
|
|
required: false
|
|
|
|
default: '{"image":null}'
|
2024-06-14 15:57:28 +00:00
|
|
|
test-container:
|
|
|
|
type: string
|
|
|
|
description: 'JSON container information for testing'
|
|
|
|
required: false
|
|
|
|
default: '{"image":null}'
|
2024-06-13 21:02:38 +00:00
|
|
|
is-release:
|
|
|
|
description: 'Whether this build job is a release job'
|
|
|
|
required: true
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
gn-build-type:
|
|
|
|
description: 'The gn build type - testing or release'
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
default: testing
|
|
|
|
generate-symbols:
|
|
|
|
description: 'Whether or not to generate symbols'
|
|
|
|
required: true
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
upload-to-storage:
|
|
|
|
description: 'Whether or not to upload build artifacts to external storage'
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
default: '0'
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: electron-build-and-test-and-nan-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
|
2024-06-14 16:08:21 +00:00
|
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
2024-06-13 21:02:38 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
|
|
|
with:
|
|
|
|
build-runs-on: ${{ inputs.build-runs-on }}
|
|
|
|
build-container: ${{ inputs.build-container }}
|
|
|
|
target-platform: ${{ inputs.target-platform }}
|
|
|
|
target-arch: ${{ inputs.target-arch }}
|
|
|
|
is-release: ${{ inputs.is-release }}
|
|
|
|
gn-build-type: ${{ inputs.gn-build-type }}
|
|
|
|
generate-symbols: ${{ inputs.generate-symbols }}
|
|
|
|
upload-to-storage: ${{ inputs.upload-to-storage }}
|
|
|
|
secrets: inherit
|
2024-06-17 15:58:29 +00:00
|
|
|
gn-check:
|
|
|
|
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
|
|
|
with:
|
|
|
|
target-platform: ${{ inputs.target-platform }}
|
|
|
|
target-arch: ${{ inputs.target-arch }}
|
|
|
|
check-runs-on: ${{ inputs.build-runs-on }}
|
|
|
|
check-container: ${{ inputs.build-container }}
|
|
|
|
gn-build-type: ${{ inputs.gn-build-type }}
|
|
|
|
secrets: inherit
|
2024-06-13 21:02:38 +00:00
|
|
|
test:
|
|
|
|
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
|
|
|
needs: build
|
|
|
|
with:
|
|
|
|
target-arch: ${{ inputs.target-arch }}
|
|
|
|
target-platform: ${{ inputs.target-platform }}
|
|
|
|
test-runs-on: ${{ inputs.test-runs-on }}
|
2024-06-14 15:57:28 +00:00
|
|
|
test-container: ${{ inputs.test-container }}
|
2024-06-13 21:02:38 +00:00
|
|
|
secrets: inherit
|
|
|
|
nn-test:
|
|
|
|
uses: ./.github/workflows/pipeline-segment-node-nan-test.yml
|
|
|
|
needs: build
|
|
|
|
with:
|
|
|
|
target-arch: ${{ inputs.target-arch }}
|
|
|
|
target-platform: ${{ inputs.target-platform }}
|
|
|
|
test-runs-on: ${{ inputs.test-runs-on }}
|
2024-06-14 15:57:28 +00:00
|
|
|
test-container: ${{ inputs.test-container }}
|
2024-06-13 21:02:38 +00:00
|
|
|
gn-build-type: ${{ inputs.gn-build-type }}
|
|
|
|
secrets: inherit
|