Skip to content

Commit a53a2aa

Browse files
build: we moved goma to build-tools (electron#22488)
* build: we moved goma to build-tools * Apply suggestions from code review Co-Authored-By: Mark Lee <malept@users.noreply.github.com> * build: do not use goma.gn Co-authored-by: Mark Lee <malept@users.noreply.github.com>
1 parent 986ccfa commit a53a2aa

File tree

4 files changed

+26
-48
lines changed

4 files changed

+26
-48
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ step-electron-maybe-chromedriver-gn-gen: &step-electron-maybe-chromedriver-gn-ge
466466
cd src
467467
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
468468
if [ "$USE_GOMA" == "true" ]; then
469-
gn gen out/chromedriver --args="import(\"$GN_CONFIG\") import(\"//electron/build/args/goma.gn\") is_component_ffmpeg=false proprietary_codecs=false $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
469+
gn gen out/chromedriver --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") is_component_ffmpeg=false proprietary_codecs=false $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
470470
else
471471
gn gen out/chromedriver --args="import(\"$GN_CONFIG\") cc_wrapper=\"$SCCACHE_PATH\" is_component_ffmpeg=false proprietary_codecs=false $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
472472
fi
@@ -581,7 +581,7 @@ step-ffmpeg-gn-gen: &step-ffmpeg-gn-gen
581581
command: |
582582
cd src
583583
if [ "$USE_GOMA" == "true" ]; then
584-
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") import(\"//electron/build/args/goma.gn\") $GN_EXTRA_ARGS"
584+
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS"
585585
else
586586
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") cc_wrapper=\"$SCCACHE_PATH\" $GN_EXTRA_ARGS"
587587
fi

build/args/goma.gn

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/development/goma.md

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,54 @@
55
66
Electron has a deployment of a custom Goma Backend that we make available to
77
all Electron Maintainers. See the [Access](#access) section below for details
8-
on authentication.
8+
on authentication. There is also a `cache-only` Goma endpoint that will be
9+
used by default if you do not have credentials. Requests to the cache-only
10+
Goma will not hit our cluster, but will read from our cache and should result
11+
in significantly faster build times.
912

1013
## Enabling Goma
1114

12-
Currently Electron Goma supports Windows, Linux, and macOS. If you are
13-
on a supported platform you can enable goma by importing the `goma.gn` config
14-
file when using `gn`.
15+
Currently the only supported way to use Goma is to use our [Build Tools](https://github.com/electron/build-tools).
16+
Goma configuration is automatically included when you set up `build-tools`.
1517

16-
```bash
17-
gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\") import(\"//electron/build/args/goma.gn\")"
18-
```
19-
20-
You must ensure that you do not have `cc_wrapper` configured, this means you
21-
can't use `sccache` or similar technology.
22-
23-
Before you can use goma to build Electron you need to authenticate against
24-
the Goma service. You only need to do this once per-machine.
25-
26-
```bash
27-
cd electron/external_binaries/goma
28-
./goma_auth.py login
29-
```
30-
31-
Once authenticated you need to make sure the goma daemon is running on your
32-
machine.
33-
34-
```bash
35-
cd electron/external_binaries/goma
36-
./goma_ctl.py ensure_start
37-
```
18+
If you are a maintainer and have access to our cluster, please ensure that you run
19+
`e init` with `--goma=cluster` in order to configure `build-tools` to use
20+
the Goma cluster. If you have an existing config, you can just set `"goma": "cluster"`
21+
in your config file.
3822

3923
## Building with Goma
4024

4125
When you are using Goma you can run `ninja` with a substantially higher `j`
4226
value than would normally be supported by your machine.
4327

44-
Please do not set a value higher than **300** on Windows or Linux and
45-
**80** on macOS, we monitor the goma system and users found to be abusing
28+
Please do not set a value higher than **200** on Windows or Linux and
29+
**50** on macOS. We monitor Goma system usage, and users found to be abusing
4630
it with unreasonable concurrency will be de-activated.
4731

4832
```bash
4933
ninja -C out/Testing electron -j 200
5034
```
5135

36+
If you're using `build-tools`, appropriate `-j` values will automatically
37+
be used for you.
38+
5239
## Monitoring Goma
5340

5441
If you access [http://localhost:8088](http://localhost:8088) on your local
5542
machine you can monitor compile jobs as they flow through the goma system.
5643

5744
## Access
5845

59-
For security and cost reasons access to Electron Goma is currently restricted
46+
For security and cost reasons, access to Electron's Goma cluster is currently restricted
6047
to Electron Maintainers. If you want access please head to `#access-requests` in
6148
Slack and ping `@goma-squad` to ask for access. Please be aware that being a
6249
maintainer does not *automatically* grant access and access is determined on a
6350
case by case basis.
51+
52+
## Uptime / Support
53+
54+
We have automated monitoring of our Goma cluster and cache at https://status.notgoma.com
55+
56+
We do not provide support for usage of Goma and any issues raised asking for help / having
57+
issues will _probably_ be closed without much reason, we do not have the capacity to handle
58+
that kind of support.

script/external-binaries.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@
3030
"name": "sccache-win32-x64.zip",
3131
"platform": "win32",
3232
"sha": "b6a20fd1c2026f3792e7286bc768a7ebc261847b76449b49f55455e1f841fecd"
33-
},
34-
{
35-
"name": "goma-win.zip",
36-
"platform": "win32",
37-
"sha": "f97c88aa5d49395ae20387b6329ad406fd019f5fb4aac4ba639ca928b7151f6b"
38-
},
39-
{
40-
"name": "goma-linux.tgz",
41-
"platform": "linux",
42-
"sha": "1cb3099a40f6200ae57216efa26af795c587b6ac7ae97955d1078d0b1e3011a6"
43-
},
44-
{
45-
"name": "goma-mac.tgz",
46-
"platform": "darwin",
47-
"sha": "da1e7de82fbf3b99f1a9d0f9bf51b25e75e8778fec180deb72cff873813d717c"
4833
}
4934
]
5035
}

0 commit comments

Comments
 (0)