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

This commit is contained in:
tqcq 2023-11-17 11:52:56 +08:00
parent 6855ce0f3d
commit ed959fe46a

View File

@ -12,36 +12,32 @@ steps:
- name: build {{ .image_name }}
image: dockcross/{{ .image_name }}
commands:
{{/* >>> expand prepare commands */}}
{{ range $prepare_commands }}
- {{ . }}
{{ end }}
{{/* >>> expand commands */}}
{{ $build_types := $default_build_types }}
{{ if .build_types }}
{{ $build_types := .build_types }}
{{ end }}
{{ range $build_types }}
{{/* set build dir to env */}}
- export BUILD_TYPE={{.}}
- export CURRENT_BUILD_DIR=build-{{$image_name}}-{{.}}
- echo $BUILD_TYPE
- echo $CURRENT_BUILD_DIR
{{/* >>> expand before commands */}}
{{ range $before_commands }}
- {{ . }}
{{ end }}
- cmake . -B${CURRENT_BUILD_DIR} -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
- cmake --build ${CURRENT_BUILD_DIR} --config ${BUILD_TYPE} -- -j`nproc`
- cmake . -B$CURRENT_BUILD_DIR -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- cmake --build $CURRENT_BUILD_DIR --config $BUILD_TYPE -- -j`nproc`
{{ range $after_commands }}
- {{ . }}
{{ end }}
{ { /* >>> expand after commands */ } }
{ { range $after_commands } }
- { { . } }
{ { end } }
{{ end }}