ulib/drone/build.yaml

29 lines
778 B
YAML
Raw Normal View History

2023-11-16 18:49:01 +08:00
kind: pipeline
type: docker
name: default
steps:
2023-11-16 19:43:04 +08:00
{{ $default_build_types := .input.default_build_types }}
2023-11-16 19:22:21 +08:00
{{ range .input.builds }}
{{ $image_name := .image_name }}
- name: build {{ .image_name }}
image: dockcross/{{ .image_name }}
2023-11-16 18:49:01 +08:00
commands:
2023-11-16 19:39:19 +08:00
{{ if .build_types }}
{{ $build_types := .build_types }}
{{ else }}
2023-11-16 19:43:04 +08:00
{{ $build_types := $default_build_types }}
2023-11-16 19:39:19 +08:00
{{ end }}
{{ range $build_types }}
2023-11-16 19:22:21 +08:00
- cmake . -Bbuild-{{$image_name}}-{{.}} -DCMAKE_BUILD_TYPE={{.}}
- cmake --build build-{{$image_name}}-{{.}} --config={{.}} -- -j`nproc`
{{end}}
2023-11-16 19:25:54 +08:00
{{ end }}
- name: list all build dir
image: alpine
commands:
2023-11-16 19:43:04 +08:00
- ls -l build-*
depends_on:
{{ range .input.builds }}
- build {{ .image_name }}
{{ end }}