From 3bf086f48a65d542d4877bab68699133df5b1681 Mon Sep 17 00:00:00 2001 From: zv0n Date: Sun, 17 Oct 2021 13:18:28 +0200 Subject: [PATCH] CI/CD --- .drone.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..fbaf214 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,34 @@ +--- +kind: pipeline +type: docker +name: mario-build +platform: + os: linux + arch: arm64 + +steps: +- name: build + image: cppbuilder:v0.2 + 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.2 + 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