2021-10-17 11:18:28 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: mario-build
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
2021-10-17 11:36:20 +00:00
|
|
|
image: cppbuilder:v0.4
|
2021-10-17 11:18:28 +00:00
|
|
|
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
|
2021-10-17 11:36:20 +00:00
|
|
|
image: cppbuilder:v0.4
|
2021-10-17 11:18:28 +00:00
|
|
|
commands:
|
|
|
|
- cd mario
|
|
|
|
- FORMAT="ok"
|
2021-10-17 11:36:20 +00:00
|
|
|
- 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')"
|
2021-10-17 11:18:28 +00:00
|
|
|
- rm temp.pp
|
|
|
|
- if [ "$FORMAT" == "nok" ] ; then exit 1 ; fi
|