build: add release config/dsymutil fix, test-releases for GHA (#42350)
* build: add publishing workflow for GHActions * build: add test repo/bucket for uploads * build: clean up conditionals, add macos-14-large, review comments * build: remove host_cpu var from GCLIENT_EXTRA_ARGS * build: use GN_CONFIG * remove: hardcode release gn config * Fix GN args import for release * Use BUILD_TOOLS_SHA when cloning build-tools in test * build: create test release in prepare-release * build: fix GN_CONFIG for mas builds * Fix dsymutil arch resetting --------- Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
361b37592a
commit
5f8a490a00
4 changed files with 54 additions and 7 deletions
25
.github/workflows/config/release/evm.mas.json
vendored
Normal file
25
.github/workflows/config/release/evm.mas.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"root": "/Users/runner/work/electron/electron/",
|
||||||
|
"remotes": {
|
||||||
|
"electron": {
|
||||||
|
"origin": "https://github.com/electron/electron.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gen": {
|
||||||
|
"args": [
|
||||||
|
"import(\"//electron/build/args/release.gn\")",
|
||||||
|
"use_remoteexec = true",
|
||||||
|
"is_mas_build = true"
|
||||||
|
],
|
||||||
|
"out": "Default"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"CHROMIUM_BUILDTOOLS_PATH": "/Users/runner/work/electron/electron/src/buildtools",
|
||||||
|
"GIT_CACHE_PATH": "/Users/runner/work/electron/electron/.git-cache"
|
||||||
|
},
|
||||||
|
"$schema": "file:///home/builduser/.electron_build_tools/evm-config.schema.json",
|
||||||
|
"configValidationLevel": "strict",
|
||||||
|
"reclient": "remote_exec",
|
||||||
|
"goma": "none",
|
||||||
|
"preserveXcode": 5
|
||||||
|
}
|
17
.github/workflows/macos-build.yml
vendored
17
.github/workflows/macos-build.yml
vendored
|
@ -16,7 +16,7 @@ on:
|
||||||
GN_BUILD_TYPE:
|
GN_BUILD_TYPE:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: testing
|
default: release
|
||||||
GENERATE_SYMBOLS:
|
GENERATE_SYMBOLS:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
@ -36,6 +36,7 @@ env:
|
||||||
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
|
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
|
||||||
AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
|
AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||||
|
GN_CONFIG: ${{ inputs.GN_CONFIG }}
|
||||||
# Disable pre-compiled headers to reduce out size - only useful for rebuilds
|
# Disable pre-compiled headers to reduce out size - only useful for rebuilds
|
||||||
GN_BUILDFLAG_ARGS: 'enable_precompiled_headers = false'
|
GN_BUILDFLAG_ARGS: 'enable_precompiled_headers = false'
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||||
|
@ -200,7 +201,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
export BUILD_TOOLS_SHA=2bb63e2e7877491b52f972532b52adc979a6ec2f
|
export BUILD_TOOLS_SHA=2bb63e2e7877491b52f972532b52adc979a6ec2f
|
||||||
npm i -g @electron/build-tools
|
npm i -g @electron/build-tools
|
||||||
e init --root=$(pwd) --out=Default ${{ inputs.GN_BUILD_TYPE }}
|
e init --root=$(pwd) --out=Default ${{ inputs.GN_BUILD_TYPE }} --import ${{ inputs.GN_BUILD_TYPE }}
|
||||||
|
e use ${{ inputs.GN_BUILD_TYPE }}
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
|
@ -335,7 +337,11 @@ jobs:
|
||||||
cipd ensure --root src/buildtools/reclient -ensure-file gn_ensure_file
|
cipd ensure --root src/buildtools/reclient -ensure-file gn_ensure_file
|
||||||
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
|
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
|
||||||
|
|
||||||
|
if [ "$TARGET_ARCH" == "arm64" ]; then
|
||||||
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
|
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
|
||||||
|
else
|
||||||
|
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.x64.sha1
|
||||||
|
fi
|
||||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
||||||
|
|
||||||
echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
|
echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
|
||||||
|
@ -454,9 +460,9 @@ jobs:
|
||||||
# TODO(codebytere): remove this once we figure out why .git/packed-refs is initially missing
|
# TODO(codebytere): remove this once we figure out why .git/packed-refs is initially missing
|
||||||
git pack-refs
|
git pack-refs
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
ulimit -n 10000
|
ulimit -n 10000
|
||||||
sudo launchctl limit maxfiles 65536 200000
|
sudo launchctl limit maxfiles 65536 200000
|
||||||
|
|
||||||
NINJA_SUMMARIZE_BUILD=1 e build -j $NUMBER_OF_NINJA_PROCESSES
|
NINJA_SUMMARIZE_BUILD=1 e build -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
cp out/Default/.ninja_log out/electron_ninja_log
|
cp out/Default/.ninja_log out/electron_ninja_log
|
||||||
node electron/script/check-symlinks.js
|
node electron/script/check-symlinks.js
|
||||||
|
@ -548,7 +554,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-build-artifacts-darwin-${{ env.TARGET_ARCH }}-${{ github.sha }}
|
key: ${{ runner.os }}-build-artifacts-darwin-${{ env.TARGET_ARCH }}-${{ github.sha }}
|
||||||
- name: Create MAS Config
|
- name: Create MAS Config
|
||||||
run: |
|
run: |
|
||||||
mv src/electron/.github/workflows/config/evm.mas.json $HOME/.electron_build_tools/configs/evm.mas.json
|
mv src/electron/.github/workflows/config/${{ inputs.GN_BUILD_TYPE }}/evm.mas.json $HOME/.electron_build_tools/configs/evm.mas.json
|
||||||
echo "MAS_BUILD=true" >> $GITHUB_ENV
|
echo "MAS_BUILD=true" >> $GITHUB_ENV
|
||||||
e use mas
|
e use mas
|
||||||
- name: Build Electron (mas)
|
- name: Build Electron (mas)
|
||||||
|
@ -718,7 +724,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Load Build Tools
|
- name: Load Build Tools
|
||||||
run: |
|
run: |
|
||||||
yarn add git://github.com/electron/build-tools.git#2bb63e2e7877491b52f972532b52adc979a6ec2f
|
export BUILD_TOOLS_SHA=2bb63e2e7877491b52f972532b52adc979a6ec2f
|
||||||
|
npm i -g @electron/build-tools
|
||||||
e init --root=$(pwd) --out=Default ${{ inputs.GN_BUILD_TYPE }}
|
e init --root=$(pwd) --out=Default ${{ inputs.GN_BUILD_TYPE }}
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
|
|
|
@ -17,7 +17,6 @@ const bumpType = args._[0];
|
||||||
const targetRepo = getRepo();
|
const targetRepo = getRepo();
|
||||||
|
|
||||||
function getRepo () {
|
function getRepo () {
|
||||||
if (process.env.IS_GHA_RELEASE) return 'test-releases';
|
|
||||||
return bumpType === 'nightly' ? 'nightlies' : 'electron';
|
return bumpType === 'nightly' ? 'nightlies' : 'electron';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +127,23 @@ async function createRelease (branchToTarget, isBeta) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const ghaTestRelease = await octokit.repos.createRelease({
|
||||||
|
owner: 'electron',
|
||||||
|
repo: 'test-releases',
|
||||||
|
tag_name: newVersion,
|
||||||
|
draft: true,
|
||||||
|
name: `electron ${newVersion}`,
|
||||||
|
body: releaseBody,
|
||||||
|
prerelease: releaseIsPrelease,
|
||||||
|
target_commitish: newVersion.includes('nightly') ? 'main' : branchToTarget
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(`${fail} Error creating new GHA test release: `, err);
|
||||||
|
});
|
||||||
|
|
||||||
console.log(`Release has been created with id: ${release.data.id}.`);
|
console.log(`Release has been created with id: ${release.data.id}.`);
|
||||||
|
if (ghaTestRelease && ghaTestRelease.data) {
|
||||||
|
console.log(`Test Release has been created with id: ${ghaTestRelease.data.id}.`);
|
||||||
|
}
|
||||||
console.log(`${pass} Draft release for ${newVersion} successful.`);
|
console.log(`${pass} Draft release for ${newVersion} successful.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue