-if git diff --patch --exit-code > patches/clang-format.patch; then echo "Clang format changed nothing"; else echo "Clang format found changes to make!"; false; fi
# build fpm
-mkdir build
-cd build
-cmake -Wno-dev ..# -DCMAKE_PREFIX_PATH=${CI_PROJECT_DIR}/../waves (handled by default)
-make -j $(nproc)
# build documentation
-make dox
# test
-ctest -j $(nproc) --output-on-failure#--verbose
-mv ${CI_PROJECT_DIR}/../waves/scripts/format_code.py .# ulgy way to keep a script we need later...
#timeout: 10 hours # will be available in 12.3
artifacts:
paths:
-build/
expire_in:1 hour
format:
<<:*global_tag_def
stage:fmt_dox
script:
-clang-format --version# we use clang-format-10 exclusively
-./build/format_code.py
-mkdir -p patches
-if git diff --patch --exit-code > patches/clang-format.patch; then echo "Clang format changed nothing"; else echo "Clang format found changes to make!"; false; fi
artifacts:
paths:
-patches/
expire_in:1 day
when:on_failure
dependencies:
-build_test
allow_failure:true
doxygen:
<<:*global_tag_def
stage:fmt_dox
script:
-cd build
-make dox
artifacts:
paths:
-build/doxygen/
expire_in:1 day
dependencies:
-build_test
#format:
# <<: *global_tag_def
# stage: fmt_dox
# script:
# - clang-format --version # we use clang-format-10 exclusively
# - ./build/format_code.py
# - mkdir -p patches
# - if git diff --patch --exit-code > patches/clang-format.patch; then echo "Clang format changed nothing"; else echo "Clang format found changes to make!"; false; fi