Skip to content

Commit 1f2478a

Browse files
dmitshurgopherbot
authored andcommitted
dashboard, env: add js-wasm-node18 builder
Build and use a new container image with Node.js v18.12.1: $ docker run gcr.io/symbolic-datum-552/js-wasm-node18:latest /usr/bin/node --version v18.12.1 Use this as an opportunity to tweak/simplify the builder configuration a bit. For example, drop the dist test skips for "nolibgcc:crypto/x509" and "vendor/golang.org/x/arch" since they're no-ops, and try 3 helpers at first since I feel that might work well, and in the worst case will give us useful timing data. Add it as a non-trybot with a known issue first. Once it works, I'll switch it to be the default trybot, and drop the old builder when it stops being useful. For golang/go#57017. Change-Id: I89188fedbc6c636579754402a1ad81c588f92d71 Reviewed-on: https://go-review.googlesource.com/c/build/+/460036 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Johan Brandhorst-Satzkorn <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]>
1 parent 22ad766 commit 1f2478a

File tree

4 files changed

+447
-2
lines changed

4 files changed

+447
-2
lines changed

dashboard/builders.go

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,15 @@ var Hosts = map[string]*HostConfig{
285285
SSHUsername: "root",
286286
},
287287
"host-linux-amd64-js-wasm": {
288-
Notes: "Container with node.js for testing js/wasm.",
288+
Notes: "Container with Node.js 14 for testing js/wasm.",
289289
ContainerImage: "js-wasm:latest",
290290
SSHUsername: "root",
291291
},
292+
"host-linux-amd64-js-wasm-node18": {
293+
Notes: "Container with Node.js 18 for testing js/wasm.",
294+
ContainerImage: "js-wasm-node18:latest",
295+
SSHUsername: "root",
296+
},
292297
"host-linux-amd64-localdev": {
293298
IsReverse: true,
294299
ExpectNum: 0,
@@ -1957,7 +1962,6 @@ func init() {
19571962
}
19581963
return b
19591964
},
1960-
19611965
distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
19621966
if isNormalTry {
19631967
if strings.Contains(distTest, "/internal/") ||
@@ -1978,6 +1982,37 @@ func init() {
19781982
"GO_DISABLE_OUTBOUND_NETWORK=1",
19791983
},
19801984
})
1985+
addBuilder(BuildConfig{
1986+
Name: "js-wasm-node18",
1987+
HostType: "host-linux-amd64-js-wasm-node18",
1988+
KnownIssues: []int{57017},
1989+
buildsRepo: func(repo, branch, goBranch string) bool {
1990+
b := buildRepoByDefault(repo)
1991+
switch repo {
1992+
case "benchmarks", "debug", "perf", "talks", "tools", "tour", "website":
1993+
// Don't test these golang.org/x repos.
1994+
b = false
1995+
}
1996+
if repo != "go" && !(branch == "master" && goBranch == "master") {
1997+
// For golang.org/x repos, don't test non-latest versions.
1998+
b = false
1999+
}
2000+
return b
2001+
},
2002+
distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
2003+
if isNormalTry && (strings.Contains(distTest, "/internal/") || distTest == "reboot") {
2004+
// Skip some tests in an attempt to speed up normal trybots, inherited from CL 121938.
2005+
run = false
2006+
}
2007+
return run
2008+
},
2009+
numTryTestHelpers: 3,
2010+
env: []string{
2011+
"GOOS=js", "GOARCH=wasm", "GOHOSTOS=linux", "GOHOSTARCH=amd64",
2012+
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/workdir/go/misc/wasm",
2013+
"GO_DISABLE_OUTBOUND_NETWORK=1",
2014+
},
2015+
})
19812016
addBuilder(BuildConfig{
19822017
Name: "openbsd-amd64-68",
19832018
HostType: "host-openbsd-amd64-68",

env/js-wasm-node18/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2022 The Go Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style
3+
# license that can be found in the LICENSE file.
4+
5+
FROM {{REPO}}/linux-x86-sid:20221109
6+
LABEL maintainer="[email protected]"
7+
8+
ENV DEBIAN_FRONTEND noninteractive
9+
10+
# A copy of https://deb.nodesource.com/setup_18.x.
11+
COPY setup_18.x setup_18.x
12+
13+
RUN bash setup_18.x && \
14+
apt-get install -y nodejs && \
15+
rm -rf setup_18.x /var/lib/apt/lists/*
16+
17+
CMD ["/usr/local/bin/stage0"]

env/js-wasm-node18/Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2022 The Go Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style
3+
# license that can be found in the LICENSE file.
4+
5+
IMAGE_NAME=$(shell basename $(CURDIR))
6+
PROD_REPO=gcr.io/symbolic-datum-552
7+
8+
usage:
9+
echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1
10+
11+
prod: Dockerfile
12+
sed 's|{{REPO}}|'"$(PROD_REPO)"'|g' Dockerfile > Dockerfile.make
13+
docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
14+
15+
pushprod: prod
16+
docker push $(PROD_REPO)/$(IMAGE_NAME):latest
17+
rm Dockerfile.make
18+
19+
# You must provide a REPO=your-repo-name arg when you make
20+
# this target. REPO is the name of the Docker repository
21+
# that will be prefixed to the name of the image being built.
22+
dev: Dockerfile
23+
sed 's|{{REPO}}|'"$(REPO)"'|g' Dockerfile > Dockerfile.make
24+
docker build -t $(REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
25+
docker push $(REPO)/$(IMAGE_NAME):latest
26+
rm Dockerfile.make

0 commit comments

Comments
 (0)