35 lines
661 B
YAML
35 lines
661 B
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: mario-build
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
steps:
|
|
- name: build
|
|
image: cppbuilder:v0.4
|
|
commands:
|
|
- cd mario
|
|
- mkdir build
|
|
- cd build
|
|
- cmake ..
|
|
- make
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: mario-formatting
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
steps:
|
|
- name: formatting-check
|
|
image: cppbuilder:v0.4
|
|
commands:
|
|
- cd mario
|
|
- FORMAT="ok"
|
|
- while read f ; do clang-format -style=file "$f" > temp.pp ; if [ $(diff temp.pp "$f" | wc -l) -gt 0 ] ; then echo "$f needs reformatting" ; FORMAT="nok" ; fi ; done <<< "$(find . -iname '*pp')"
|
|
- rm temp.pp
|
|
- if [ "$FORMAT" == "nok" ] ; then exit 1 ; fi
|