84 lines
2.3 KiB
TOML
84 lines
2.3 KiB
TOML
[metadata]
|
|
name = "go-cross-versions {{ .Env.GitReference }}"
|
|
|
|
[global]
|
|
plan = "libp2p/ping/go"
|
|
case = "ping"
|
|
builder = "docker:go"
|
|
runner = "local:docker"
|
|
|
|
[global.build_config]
|
|
enable_go_build_cache = false # see https://github.com/testground/testground/issues/1361
|
|
# disable testground's goproxy which hangs on github runners.
|
|
go_proxy_mode = "remote"
|
|
go_proxy_url = "https://proxy.golang.org"
|
|
|
|
{{ with (load_resource "./go.toml" ) }}
|
|
{{ range .groups }}
|
|
[[groups]]
|
|
id = "{{ .Id }}"
|
|
instances = { count = 1 }
|
|
|
|
[groups.build]
|
|
selectors = ['{{ .Selector }}']
|
|
|
|
[groups.build_config]
|
|
build_base_image = 'golang:{{ .GoVersion }}-buster'
|
|
modfile = "{{ .Modfile }}"
|
|
{{ end }}
|
|
|
|
{{ with .master }}
|
|
[[groups]]
|
|
id = "master"
|
|
instances = { count = 1 }
|
|
|
|
[groups.build]
|
|
selectors = ['{{ .Selector }}']
|
|
|
|
[[groups.build.dependencies]]
|
|
module = "github.com/libp2p/go-libp2p"
|
|
version = "master"
|
|
|
|
[groups.build_config]
|
|
build_base_image = 'golang:{{ .GoVersion }}-buster'
|
|
modfile = "{{ .Modfile }}"
|
|
|
|
[groups.build_config.dockerfile_extensions]
|
|
# deal with dependency changes in master until we create the new vx.y.z instance
|
|
pre_build = """
|
|
RUN cd ${PLAN_DIR} && \
|
|
go mod download github.com/libp2p/go-libp2p && \
|
|
go mod tidy -compat={{ .GoVersion }}
|
|
"""
|
|
{{ end }}
|
|
|
|
{{ if $.Env.GitReference }}
|
|
{{ with .custom }}
|
|
[[groups]]
|
|
id = "custom"
|
|
instances = { count = 1 }
|
|
|
|
[groups.build]
|
|
selectors = ['{{ .Selector }}']
|
|
|
|
[[groups.build.dependencies]]
|
|
module = "github.com/libp2p/go-libp2p"
|
|
version = "{{ $.Env.GitReference }}"
|
|
{{ if $.Env.GitTarget }}
|
|
target = "{{ $.Env.GitTarget }}"
|
|
{{ end }}
|
|
|
|
[groups.build_config]
|
|
build_base_image = 'golang:{{ .GoVersion }}-buster'
|
|
modfile = "{{ .Modfile }}"
|
|
|
|
[groups.build_config.dockerfile_extensions]
|
|
# deal with dependency changes in master until we create the new vx.y.z instance
|
|
pre_build = """
|
|
RUN cd ${PLAN_DIR} && \
|
|
go mod download github.com/libp2p/go-libp2p && \
|
|
go mod tidy -compat={{ .GoVersion }}
|
|
"""
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }} |