build: fixup codespaces on-create (#41935)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
8d69c95ee0
commit
aab21a9652
2 changed files with 10 additions and 18 deletions
|
@ -31,7 +31,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": ["joeleinbinder.mojom-language",
|
"extensions": [
|
||||||
|
"joeleinbinder.mojom-language",
|
||||||
"rafaelmaiolla.diff",
|
"rafaelmaiolla.diff",
|
||||||
"surajbarkale.ninja",
|
"surajbarkale.ninja",
|
||||||
"ms-vscode.cpptools",
|
"ms-vscode.cpptools",
|
||||||
|
|
|
@ -39,7 +39,6 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||||
write_config() {
|
write_config() {
|
||||||
echo "
|
echo "
|
||||||
{
|
{
|
||||||
\"goma\": \"$1\",
|
|
||||||
\"root\": \"/workspaces/gclient\",
|
\"root\": \"/workspaces/gclient\",
|
||||||
\"remotes\": {
|
\"remotes\": {
|
||||||
\"electron\": {
|
\"electron\": {
|
||||||
|
@ -49,7 +48,7 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||||
\"gen\": {
|
\"gen\": {
|
||||||
\"args\": [
|
\"args\": [
|
||||||
\"import(\\\"//electron/build/args/testing.gn\\\")\",
|
\"import(\\\"//electron/build/args/testing.gn\\\")\",
|
||||||
\"import(\\\"/home/builduser/.electron_build_tools/third_party/goma.gn\\\")\"
|
\"use_remoteexec = true\"
|
||||||
],
|
],
|
||||||
\"out\": \"Testing\"
|
\"out\": \"Testing\"
|
||||||
},
|
},
|
||||||
|
@ -57,26 +56,18 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||||
\"CHROMIUM_BUILDTOOLS_PATH\": \"/workspaces/gclient/src/buildtools\",
|
\"CHROMIUM_BUILDTOOLS_PATH\": \"/workspaces/gclient/src/buildtools\",
|
||||||
\"GIT_CACHE_PATH\": \"/workspaces/gclient/.git-cache\"
|
\"GIT_CACHE_PATH\": \"/workspaces/gclient/.git-cache\"
|
||||||
},
|
},
|
||||||
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\"
|
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\",
|
||||||
|
\"configValidationLevel\": \"strict\",
|
||||||
|
\"reclient\": \"$1\",
|
||||||
|
\"goma\": \"none\",
|
||||||
|
\"preserveXcode\": 5
|
||||||
}
|
}
|
||||||
" >$buildtools/configs/evm.testing.json
|
" >$buildtools/configs/evm.testing.json
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start out as cache only
|
write_config remote_exec
|
||||||
write_config cache-only
|
|
||||||
|
|
||||||
e use testing
|
e use testing
|
||||||
|
|
||||||
# Attempt to auth to the goma service via codespaces tokens
|
|
||||||
# if it works we can use the goma cluster
|
|
||||||
export NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN
|
|
||||||
if e d goma_auth login; then
|
|
||||||
echo "$GITHUB_USER has GOMA access - switching to cluster mode"
|
|
||||||
write_config cluster
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "build-tools testing config already exists"
|
echo "build-tools testing config already exists"
|
||||||
|
|
||||||
# Re-auth with the goma cluster regardless.
|
|
||||||
NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN e d goma_auth login || true
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue