build: de-dupe load build tools into composite action (#42518)
This commit is contained in:
parent
a371c2cd54
commit
2b259bd69e
4 changed files with 29 additions and 22 deletions
11
.github/actions/install-build-tools/action.yml
vendored
Normal file
11
.github/actions/install-build-tools/action.yml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
name: 'Install Build Tools'
|
||||||
|
description: 'Installs an exact SHA of build tools'
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Install Build Tools
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export BUILD_TOOLS_SHA=ff3e40a9a2ebb735c18b6450ecd5ddaa8bb364a9
|
||||||
|
npm i -g @electron/build-tools
|
||||||
|
e auto-update disable
|
|
@ -140,11 +140,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Load Build Tools
|
- name: Install Build Tools
|
||||||
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
|
- name: Init Build Tools
|
||||||
run: |
|
run: |
|
||||||
export BUILD_TOOLS_SHA=ff3e40a9a2ebb735c18b6450ecd5ddaa8bb364a9
|
|
||||||
npm i -g @electron/build-tools
|
|
||||||
e auto-update disable
|
|
||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
|
||||||
- name: Run Electron Only Hooks
|
- name: Run Electron Only Hooks
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -50,17 +50,16 @@ jobs:
|
||||||
BUILD_TYPE: ${{ matrix.build-type }}
|
BUILD_TYPE: ${{ matrix.build-type }}
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
steps:
|
steps:
|
||||||
- name: Load Build Tools
|
|
||||||
run: |
|
|
||||||
export BUILD_TOOLS_SHA=ff3e40a9a2ebb735c18b6450ecd5ddaa8bb364a9
|
|
||||||
npm i -g @electron/build-tools
|
|
||||||
e auto-update disable
|
|
||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
|
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Install Build Tools
|
||||||
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
|
- name: Init Build Tools
|
||||||
|
run: |
|
||||||
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -44,17 +44,16 @@ jobs:
|
||||||
BUILD_TYPE: linux
|
BUILD_TYPE: linux
|
||||||
container: ${{ fromJSON(inputs.test-container) }}
|
container: ${{ fromJSON(inputs.test-container) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Load Build Tools
|
|
||||||
run: |
|
|
||||||
export BUILD_TOOLS_SHA=ff3e40a9a2ebb735c18b6450ecd5ddaa8bb364a9
|
|
||||||
npm i -g @electron/build-tools
|
|
||||||
e auto-update disable
|
|
||||||
e init --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Install Build Tools
|
||||||
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
|
- name: Init Build Tools
|
||||||
|
run: |
|
||||||
|
e init --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
|
@ -109,17 +108,16 @@ jobs:
|
||||||
BUILD_TYPE: linux
|
BUILD_TYPE: linux
|
||||||
container: ${{ fromJSON(inputs.test-container) }}
|
container: ${{ fromJSON(inputs.test-container) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Load Build Tools
|
|
||||||
run: |
|
|
||||||
export BUILD_TOOLS_SHA=ff3e40a9a2ebb735c18b6450ecd5ddaa8bb364a9
|
|
||||||
npm i -g @electron/build-tools
|
|
||||||
e auto-update disable
|
|
||||||
e init --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Install Build Tools
|
||||||
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
|
- name: Init Build Tools
|
||||||
|
run: |
|
||||||
|
e init --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
|
|
Loading…
Reference in a new issue