diff --git a/Jenkinsfile b/Jenkinsfile index 43b165c..350189c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,13 @@ archiveArtifacts artifacts: 'build/hello*', fingerprint: true } } + stage('Tidy') { + steps { + echo 'Tidy..' + sh 'make tidy || true' + junit 'build/*.xml' + } + } stage('Test') { steps { echo 'Testing..' diff --git a/Jenkinsfile b/Jenkinsfile index 43b165c..350189c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,13 @@ archiveArtifacts artifacts: 'build/hello*', fingerprint: true } } + stage('Tidy') { + steps { + echo 'Tidy..' + sh 'make tidy || true' + junit 'build/*.xml' + } + } stage('Test') { steps { echo 'Testing..' diff --git a/Makefile b/Makefile index 80f74c4..9fb7af9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ +CXXFLAGS = -std=c++14 + +SOURCES = Test.cpp all: @@ -8,6 +11,12 @@ x86_64-apple-darwin19-c++ Test.cpp -o build/hello-macosx.bin +tidy: + mkdir -p build + chmod u+x ./clang-tidy-to-junit.py + clang-tidy -checks='c*,l*,m*' $(SOURCES) -- $(CXXFLAGS) | ./clang-tidy-to-junit.py $(PWD)/ > build/tidy.xml + + test: mkdir -p build echo "Blah" > build/tests.xml