build: add production-release environment to publish jobs (#42483)
* build: move publish workflows to use production environment * build: pass in target_cpu to GN_EXTRA_ARGS on Linux
This commit is contained in:
parent
5b98be3ccb
commit
429d50bb18
3 changed files with 12 additions and 2 deletions
3
.github/workflows/linux-publish.yml
vendored
3
.github/workflows/linux-publish.yml
vendored
|
@ -41,6 +41,7 @@ jobs:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
|
environment: production-release
|
||||||
build-runs-on: aks-linux-large
|
build-runs-on: aks-linux-large
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
|
@ -55,6 +56,7 @@ jobs:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
|
environment: production-release
|
||||||
build-runs-on: aks-linux-large
|
build-runs-on: aks-linux-large
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
|
@ -69,6 +71,7 @@ jobs:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
|
environment: production-release
|
||||||
build-runs-on: aks-linux-large
|
build-runs-on: aks-linux-large
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
|
|
2
.github/workflows/macos-publish.yml
vendored
2
.github/workflows/macos-publish.yml
vendored
|
@ -44,6 +44,7 @@ jobs:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
|
environment: production-release
|
||||||
build-runs-on: macos-14-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: x64
|
target-arch: x64
|
||||||
|
@ -57,6 +58,7 @@ jobs:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
|
environment: production-release
|
||||||
build-runs-on: macos-14-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: arm64
|
target-arch: arm64
|
||||||
|
|
|
@ -3,6 +3,10 @@ name: Pipeline Segment - Electron Build
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
environment:
|
||||||
|
description: using the production or testing environment
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
target-platform:
|
target-platform:
|
||||||
type: string
|
type: string
|
||||||
description: 'Platform to run on, can be macos or linux'
|
description: 'Platform to run on, can be macos or linux'
|
||||||
|
@ -64,6 +68,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ inputs.build-runs-on }}
|
runs-on: ${{ inputs.build-runs-on }}
|
||||||
container: ${{ fromJSON(inputs.build-container) }}
|
container: ${{ fromJSON(inputs.build-container) }}
|
||||||
|
environment: ${{ inputs.environment }}
|
||||||
env:
|
env:
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -92,9 +97,9 @@ jobs:
|
||||||
if: ${{ inputs.target-platform == 'linux' }}
|
if: ${{ inputs.target-platform == 'linux' }}
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
||||||
GN_EXTRA_ARGS='build_tflite_with_xnnpack=false'
|
GN_EXTRA_ARGS='target_cpu="arm" build_tflite_with_xnnpack=false'
|
||||||
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
||||||
GN_EXTRA_ARGS='fatal_linker_warnings=false enable_linux_installer=false'
|
GN_EXTRA_ARGS='target_cpu="arm64" fatal_linker_warnings=false enable_linux_installer=false'
|
||||||
fi
|
fi
|
||||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
|
|
Loading…
Reference in a new issue