113 lines
3.2 KiB
TOML
113 lines
3.2 KiB
TOML
[metadata]
|
|
name = "go-rust-cross-version"
|
|
|
|
[global]
|
|
plan = "libp2p/ping"
|
|
case = "ping"
|
|
runner = "local:docker"
|
|
concurrent_builds = 1
|
|
|
|
[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") }}
|
|
{{ with .master }}
|
|
[[groups]]
|
|
id = "go-master"
|
|
instances = { count = 1 }
|
|
builder = "docker:go"
|
|
|
|
[groups.build]
|
|
selectors = ['{{ .Selector }}']
|
|
|
|
[[groups.build.dependencies]]
|
|
module = "github.com/libp2p/go-libp2p"
|
|
version = "master"
|
|
|
|
[groups.build_config]
|
|
path = "./go/"
|
|
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 eq $.Env.InteropTarget "go" }}
|
|
{{ if $.Env.GitReference }}
|
|
{{ with .custom }}
|
|
[[groups]]
|
|
id = "custom-go"
|
|
instances = { count = 1 }
|
|
builder = "docker:go"
|
|
|
|
[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]
|
|
path = "./go/"
|
|
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 }}
|
|
{{ end }}
|
|
|
|
{{ with (load_resource "./rust.toml") }}
|
|
{{ with .master }}
|
|
[[groups]]
|
|
id = "rust-master"
|
|
instances = { count = 1 }
|
|
builder = "docker:generic"
|
|
|
|
[groups.build_config]
|
|
path = "./rust/"
|
|
|
|
[groups.build_config.build_args]
|
|
CARGO_FEATURES = '{{ .CargoFeatures }}'
|
|
{{ end }}
|
|
|
|
{{ if eq $.Env.InteropTarget "rust" }}
|
|
{{ if $.Env.GitReference }}
|
|
{{ with .custom }}
|
|
[[groups]]
|
|
id = "custom-rust"
|
|
instances = { count = 1 }
|
|
builder = "docker:generic"
|
|
|
|
[groups.build_config]
|
|
path = "./rust/"
|
|
|
|
[groups.build_config.build_args]
|
|
CARGO_FEATURES = '{{ .CargoFeatures }}'
|
|
CARGO_REMOVE = '{{ .CargoFeatures }}'
|
|
CARGO_PATCH = """
|
|
{{ .CargoFeatures }} = {package = "libp2p", git = "https://{{ or $.Env.GitTarget "github.com/libp2p/rust-libp2p" }}", rev = "{{ $.Env.GitReference }}", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "0.47.0", optional = true}
|
|
"""
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }} |