Tanguy 003eb91e2e
Nim ping test (#70)
* Nim ping test

* Working interop

* Add nim toml

* Add CI

* fix workflow name

* Delete go-rust specifics

* Update .github/workflows/ping-interop-latest.yml

Co-authored-by: Max Inden <mail@max-inden.de>

Co-authored-by: Max Inden <mail@max-inden.de>
2022-12-05 17:23:50 -08:00

186 lines
4.6 KiB
TOML

[metadata]
name = "all-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") }}
{{ range .groups }}
[[groups]]
id = "{{ .Id }}"
instances = { count = 1 }
builder = "docker:go"
[groups.build]
selectors = ['{{ .Selector }}']
[groups.build_config]
path = "./go/"
build_base_image = 'golang:{{ .GoVersion }}-buster'
modfile = "{{ .Modfile }}"
{{ end }}
{{ with .master }}
[[groups]]
id = "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") }}
{{ range .groups }}
[[groups]]
id = "rust-{{ .Id }}"
instances = { count = 1 }
builder = "docker:generic"
[groups.build_config]
path = "./rust/"
[groups.build_config.build_args]
BINARY_NAME = '{{ .BinaryName }}'
{{ end }}
{{ with .master }}
[[groups]]
id = "rust-master"
instances = { count = 1 }
builder = "docker:generic"
[groups.build_config]
path = "./rust/"
[groups.build_config.build_args]
BINARY_NAME = '{{ .BinaryName }}'
GIT_REF = '{{ $.Env.GitReference }}'
{{ 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]
BINARY_NAME = '{{ .BinaryName }}'
GIT_TARGET = '{{ $.Env.GitTarget }}'
GIT_REF = '{{ $.Env.GitReference }}'
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ with (load_resource "./nim.toml") }}
{{ range .groups }}
[[groups]]
id = "nim-latest-{{ .Id }}"
instances = { count = 1 }
builder = "docker:generic"
[groups.build_config]
path = "./nim/"
[groups.build_config.build_args]
Libp2pVersion = '{{ .Id }}'
NimVersion = '{{ .NimVersion }}'
{{ end }}
{{ with .custom }}
[[groups]]
id = "nim-unstable"
instances = { count = 1 }
builder = "docker:generic"
[groups.build_config]
path = "./nim/"
[groups.build_config.build_args]
Libp2pVersion = '#unstable'
NimVersion = '{{ .NimVersion }}'
{{ end }}
{{ if eq $.Env.InteropTarget "nim" }}
{{ if $.Env.GitReference }}
{{ with .custom }}
[[groups]]
id = "nim-custom-{{ $.Env.GitReference }}"
instances = { count = 1 }
builder = "docker:generic"
[groups.build_config]
path = "./nim/"
[groups.build_config.build_args]
Libp2pVersion = '#{{ $.Env.GitReference }}'
NimVersion = '{{ .NimVersion }}'
{{ end }}
{{ end }}
{{ end }}
{{ end }}