update template
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
tqcq 2023-11-16 19:22:21 +08:00
parent 829fc93023
commit bc957ffa37
2 changed files with 14 additions and 12 deletions

View File

@ -1,9 +1,8 @@
kind: template
load: build.yaml
data:
image_name: x64
build:
- arch: x64-Debug
type: Debug
- arch: x64-Release
type: Release
builds:
- image_name: linux-x64
build_types:
- Debug
- Release

View File

@ -2,10 +2,13 @@ kind: pipeline
type: docker
name: default
steps:
- name: build {{ .input.image_name }}
image: dockcross/{{ .input.image_name }}
{{ range .input.builds }}
{{ $image_name := .image_name }}
- name: build {{ .image_name }}
image: dockcross/{{ .image_name }}
commands:
{{ range .input.build }}
- cmake . -Bbuild-{{.arch}} -DCMAKE_BUILD_TYPE={{.type}}
- cmake --build build-{.arch} --config={{.type}} -- -j`nproc`
{{ end }}
{{ range .build_types }}
- cmake . -Bbuild-{{$image_name}}-{{.}} -DCMAKE_BUILD_TYPE={{.}}
- cmake --build build-{{$image_name}}-{{.}} --config={{.}} -- -j`nproc`
{{end}}
{{ end }}