Add nim toml

This commit is contained in:
Tanguy 2022-11-08 14:16:10 +01:00
parent c8e4b3227e
commit 311e8d4f59
No known key found for this signature in database
GPG Key ID: 7DD8EC6B6CE6C45E
3 changed files with 41 additions and 8 deletions

View File

@ -100,10 +100,34 @@
{{ end }}
{{ end }}
[[groups]]
id = "nim-latest"
instances = { count = 1 }
builder = "docker:generic"
{{ with (load_resource "./nim.toml") }}
{{ with (index .groups 0) }}
[[groups]]
id = "nim-latest-{{ .Id }}"
instances = { count = 1 }
builder = "docker:generic"
[groups.build_config]
path = "./nim/"
[groups.build_config]
path = "./nim/"
[groups.build_config.build_args]
Libp2pVersion = '{{ .Id }}'
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 }}

View File

@ -0,0 +1,6 @@
[custom]
NimVersion = "1.6.8"
[[groups]]
Id = "1.0.0"
NimVersion = "1.6.8"

View File

@ -1,7 +1,10 @@
FROM nimlang/nim:alpine as builder
ARG NimVersion="latest"
FROM nimlang/nim:${NimVersion}-alpine as builder
RUN nimble install -y "https://github.com/status-im/testground-nim-sdk@#c282ff68c08ef85a7ca011e077e3e69eb1a6edec"
RUN nimble install -y "libp2p"
ARG Libp2pVersion="#unstable"
RUN nimble install -y "libp2p@${Libp2pVersion}"
FROM builder
ARG PLAN_PATH="./"