2024-06-13 21:02:38 +00:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2024-06-13 21:35:47 +00:00
|
|
|
inputs:
|
|
|
|
build-image-sha:
|
|
|
|
type: string
|
|
|
|
description: 'SHA for electron/build image'
|
|
|
|
default: 'cf814a4d2501e8e843caea071a6b70a48e78b855'
|
|
|
|
required: true
|
2024-06-14 15:08:04 +00:00
|
|
|
skip-macos:
|
|
|
|
type: boolean
|
|
|
|
description: 'Skip macOS builds'
|
|
|
|
default: false
|
|
|
|
required: false
|
|
|
|
skip-linux:
|
|
|
|
type: boolean
|
|
|
|
description: 'Skip Linux builds'
|
|
|
|
default: false
|
|
|
|
required: false
|
|
|
|
skip-lint:
|
|
|
|
type: boolean
|
|
|
|
description: 'Skip lint check'
|
|
|
|
default: false
|
|
|
|
required: false
|
2024-06-24 10:06:13 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- '[1-9][0-9]-x-y'
|
|
|
|
pull_request:
|
|
|
|
|
2024-06-13 21:02:38 +00:00
|
|
|
jobs:
|
2024-06-24 10:06:13 +00:00
|
|
|
setup:
|
2024-06-14 16:08:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
pull-requests: read
|
|
|
|
outputs:
|
|
|
|
docs: ${{ steps.filter.outputs.docs }}
|
|
|
|
src: ${{ steps.filter.outputs.src }}
|
2024-06-24 10:06:13 +00:00
|
|
|
build-image-sha: ${{ steps.set-output.outputs.build-image-sha }}
|
|
|
|
docs-only: ${{ steps.set-output.outputs.docs-only }}
|
2024-06-14 16:08:41 +00:00
|
|
|
steps:
|
2024-10-01 16:16:20 +00:00
|
|
|
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 #v4.0.2
|
2024-06-14 16:08:41 +00:00
|
|
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
|
|
id: filter
|
|
|
|
with:
|
|
|
|
filters: |
|
|
|
|
docs:
|
|
|
|
- 'docs/**'
|
|
|
|
src:
|
|
|
|
- '!docs/**'
|
2024-06-24 10:06:13 +00:00
|
|
|
- name: Set Outputs for Build Image SHA & Docs Only
|
|
|
|
id: set-output
|
|
|
|
run: |
|
|
|
|
if [ -z "${{ inputs.build-image-sha }}" ]; then
|
2024-09-11 15:10:33 +00:00
|
|
|
echo "build-image-sha=77262e58c37631ab082482f42c33cdf68c6c394b" >> "$GITHUB_OUTPUT"
|
2024-06-24 10:06:13 +00:00
|
|
|
else
|
|
|
|
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
|
|
|
|
fi
|
|
|
|
echo "docs-only=${{ steps.filter.outputs.docs == 'true' && steps.filter.outputs.src == 'false' }}" >> "$GITHUB_OUTPUT"
|
2024-06-14 16:08:41 +00:00
|
|
|
|
2024-06-14 03:14:49 +00:00
|
|
|
# Lint Jobs
|
|
|
|
lint:
|
2024-06-24 10:06:13 +00:00
|
|
|
needs: setup
|
2024-06-14 15:08:04 +00:00
|
|
|
if: ${{ !inputs.skip-lint }}
|
2024-06-14 03:14:49 +00:00
|
|
|
uses: ./.github/workflows/pipeline-electron-lint.yml
|
|
|
|
with:
|
2024-06-24 10:06:13 +00:00
|
|
|
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
|
2024-06-14 03:14:49 +00:00
|
|
|
secrets: inherit
|
|
|
|
|
2024-06-14 16:08:41 +00:00
|
|
|
# Docs Only Jobs
|
|
|
|
docs-only:
|
2024-06-24 10:06:13 +00:00
|
|
|
needs: setup
|
|
|
|
if: ${{ needs.setup.outputs.docs-only == 'true' }}
|
2024-06-14 16:08:41 +00:00
|
|
|
uses: ./.github/workflows/pipeline-electron-docs-only.yml
|
|
|
|
with:
|
2024-06-24 10:06:13 +00:00
|
|
|
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
|
2024-06-14 16:08:41 +00:00
|
|
|
secrets: inherit
|
|
|
|
|
2024-06-13 21:02:38 +00:00
|
|
|
# Checkout Jobs
|
|
|
|
checkout-macos:
|
2024-06-24 10:06:13 +00:00
|
|
|
needs: setup
|
|
|
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-macos}}
|
2024-07-13 05:22:49 +00:00
|
|
|
runs-on: electron-arc-linux-amd64-32core
|
2024-06-13 21:02:38 +00:00
|
|
|
container:
|
2024-06-24 10:06:13 +00:00
|
|
|
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
2024-06-13 21:02:38 +00:00
|
|
|
options: --user root
|
|
|
|
volumes:
|
|
|
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
|
|
|
- /var/run/sas:/var/run/sas
|
|
|
|
env:
|
|
|
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
2024-06-24 10:06:13 +00:00
|
|
|
outputs:
|
|
|
|
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
2024-06-13 21:02:38 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Electron
|
2024-10-01 16:16:20 +00:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
|
2024-06-13 21:02:38 +00:00
|
|
|
with:
|
|
|
|
path: src/electron
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Checkout & Sync & Save
|
|
|
|
uses: ./src/electron/.github/actions/checkout
|
|
|
|
with:
|
|
|
|
generate-sas-token: 'true'
|
2024-06-14 15:08:04 +00:00
|
|
|
|
2024-06-13 21:02:38 +00:00
|
|
|
checkout-linux:
|
2024-06-24 10:06:13 +00:00
|
|
|
needs: setup
|
|
|
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-linux}}
|
2024-07-13 05:22:49 +00:00
|
|
|
runs-on: electron-arc-linux-amd64-32core
|
2024-06-13 21:02:38 +00:00
|
|
|
container:
|
2024-06-24 10:06:13 +00:00
|
|
|
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
2024-06-13 21:02:38 +00:00
|
|
|
options: --user root
|
|
|
|
volumes:
|
|
|
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
|
|
|
- /var/run/sas:/var/run/sas
|
|
|
|
env:
|
2024-06-14 20:29:11 +00:00
|
|
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
2024-08-07 08:01:59 +00:00
|
|
|
PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }}
|
2024-06-24 10:06:13 +00:00
|
|
|
outputs:
|
|
|
|
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
2024-06-13 21:02:38 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Electron
|
2024-10-01 16:16:20 +00:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
|
2024-06-13 21:02:38 +00:00
|
|
|
with:
|
|
|
|
path: src/electron
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Checkout & Sync & Save
|
|
|
|
uses: ./src/electron/.github/actions/checkout
|
|
|
|
|
2024-06-14 03:14:49 +00:00
|
|
|
# Build Jobs - These cascade into testing jobs
|
2024-06-13 21:02:38 +00:00
|
|
|
macos-x64:
|
2024-06-17 23:33:44 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
issues: read
|
|
|
|
pull-requests: read
|
2024-06-13 21:02:38 +00:00
|
|
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
|
|
|
needs: checkout-macos
|
|
|
|
with:
|
|
|
|
build-runs-on: macos-14-xlarge
|
2024-08-05 19:42:41 +00:00
|
|
|
check-runs-on: macos-14
|
2024-06-17 23:33:44 +00:00
|
|
|
test-runs-on: macos-13
|
2024-06-13 21:02:38 +00:00
|
|
|
target-platform: macos
|
|
|
|
target-arch: x64
|
|
|
|
is-release: false
|
|
|
|
gn-build-type: testing
|
|
|
|
generate-symbols: false
|
|
|
|
upload-to-storage: '0'
|
|
|
|
secrets: inherit
|
|
|
|
|
|
|
|
macos-arm64:
|
2024-06-17 23:33:44 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
issues: read
|
|
|
|
pull-requests: read
|
2024-06-13 21:02:38 +00:00
|
|
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
|
|
|
needs: checkout-macos
|
|
|
|
with:
|
|
|
|
build-runs-on: macos-14-xlarge
|
2024-08-05 19:42:41 +00:00
|
|
|
check-runs-on: macos-14
|
2024-06-17 23:33:44 +00:00
|
|
|
test-runs-on: macos-14
|
2024-06-13 21:02:38 +00:00
|
|
|
target-platform: macos
|
|
|
|
target-arch: arm64
|
|
|
|
is-release: false
|
|
|
|
gn-build-type: testing
|
|
|
|
generate-symbols: false
|
|
|
|
upload-to-storage: '0'
|
|
|
|
secrets: inherit
|
|
|
|
|
|
|
|
linux-x64:
|
2024-06-17 23:33:44 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
issues: read
|
|
|
|
pull-requests: read
|
2024-06-13 21:02:38 +00:00
|
|
|
uses: ./.github/workflows/pipeline-electron-build-and-test-and-nan.yml
|
|
|
|
needs: checkout-linux
|
|
|
|
with:
|
2024-07-13 05:22:49 +00:00
|
|
|
build-runs-on: electron-arc-linux-amd64-32core
|
2024-08-05 19:42:41 +00:00
|
|
|
check-runs-on: electron-arc-linux-amd64-8core
|
2024-07-13 05:22:49 +00:00
|
|
|
test-runs-on: electron-arc-linux-amd64-4core
|
2024-06-24 10:06:13 +00:00
|
|
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
|
|
|
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
2024-06-13 21:02:38 +00:00
|
|
|
target-platform: linux
|
|
|
|
target-arch: x64
|
|
|
|
is-release: false
|
|
|
|
gn-build-type: testing
|
|
|
|
generate-symbols: false
|
|
|
|
upload-to-storage: '0'
|
|
|
|
secrets: inherit
|
2024-06-20 10:11:53 +00:00
|
|
|
|
|
|
|
linux-x64-asan:
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
issues: read
|
|
|
|
pull-requests: read
|
|
|
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
|
|
|
needs: checkout-linux
|
|
|
|
with:
|
2024-07-13 05:22:49 +00:00
|
|
|
build-runs-on: electron-arc-linux-amd64-32core
|
2024-08-05 19:42:41 +00:00
|
|
|
check-runs-on: electron-arc-linux-amd64-8core
|
2024-07-13 05:22:49 +00:00
|
|
|
test-runs-on: electron-arc-linux-amd64-4core
|
2024-06-24 10:06:13 +00:00
|
|
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
|
|
|
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
2024-06-20 10:11:53 +00:00
|
|
|
target-platform: linux
|
|
|
|
target-arch: x64
|
|
|
|
is-release: false
|
|
|
|
gn-build-type: testing
|
|
|
|
generate-symbols: false
|
|
|
|
upload-to-storage: '0'
|
|
|
|
is-asan: true
|
|
|
|
secrets: inherit
|
2024-06-13 21:02:38 +00:00
|
|
|
|
|
|
|
linux-arm:
|
2024-06-17 23:33:44 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
issues: read
|
|
|
|
pull-requests: read
|
2024-06-13 21:02:38 +00:00
|
|
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
|
|
|
needs: checkout-linux
|
|
|
|
with:
|
2024-07-13 05:22:49 +00:00
|
|
|
build-runs-on: electron-arc-linux-amd64-32core
|
2024-08-05 19:42:41 +00:00
|
|
|
check-runs-on: electron-arc-linux-amd64-8core
|
2024-07-13 05:22:49 +00:00
|
|
|
test-runs-on: electron-arc-linux-arm64-4core
|
2024-06-24 10:06:13 +00:00
|
|
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
|
|
|
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
|
2024-06-13 21:02:38 +00:00
|
|
|
target-platform: linux
|
|
|
|
target-arch: arm
|
|
|
|
is-release: false
|
|
|
|
gn-build-type: testing
|
|
|
|
generate-symbols: false
|
|
|
|
upload-to-storage: '0'
|
|
|
|
secrets: inherit
|
|
|
|
|
|
|
|
linux-arm64:
|
2024-06-17 23:33:44 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
issues: read
|
|
|
|
pull-requests: read
|
2024-06-13 21:02:38 +00:00
|
|
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
|
|
|
needs: checkout-linux
|
|
|
|
with:
|
2024-07-13 05:22:49 +00:00
|
|
|
build-runs-on: electron-arc-linux-amd64-32core
|
2024-08-05 19:42:41 +00:00
|
|
|
check-runs-on: electron-arc-linux-amd64-8core
|
2024-07-13 05:22:49 +00:00
|
|
|
test-runs-on: electron-arc-linux-arm64-4core
|
2024-06-24 10:06:13 +00:00
|
|
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
|
|
|
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
2024-06-13 21:02:38 +00:00
|
|
|
target-platform: linux
|
|
|
|
target-arch: arm64
|
|
|
|
is-release: false
|
|
|
|
gn-build-type: testing
|
|
|
|
generate-symbols: false
|
|
|
|
upload-to-storage: '0'
|
|
|
|
secrets: inherit
|