diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d59c9b3fca1e0b8dc51810a66450e4c9f8fd8611..f57b9a343252ffe77ac4fea11094076c37c0611c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,15 +14,16 @@ variables: GIT_CLONE_PATH: /builds/$CI_PROJECT_PATH/FPM_BUILD/fpm # cannot work in /builds/$CI_PROJECT_PATH stages: - - build # only 1 stage to avoid exporting artifacts in parent dir (not permitted) + - bld_tst + - fmt_dox build_test: <<: *global_tag_def - stage: build + stage: bld_tst script: - printenv | sort - cd .. - # get waves and build + # get and build waves - rm -rf waves - wget -q https://gitlab.uliege.be/am-dept/waves/-/archive/master/waves-master.tar.bz2 - tar xf waves-master.tar.bz2 @@ -33,13 +34,14 @@ build_test: - cd build - cmake -Wno-dev -C ../CMake/disable-trilinos.cmake .. - make -j $(nproc) - # build fpm + # build and test fpm - cd ../../fpm - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=${CI_PROJECT_DIR}/../waves -Wno-dev .. - make -j $(nproc) - 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: @@ -48,11 +50,11 @@ build_test: format: <<: *global_tag_def - stage: build + stage: fmt_dox script: - - ls ${CI_PROJECT_DIR}/.. - clang-format --version # we use clang-format-10 exclusively - - ${CI_PROJECT_DIR}/../waves/scripts/format_code.py + - ls build + - ./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: @@ -67,7 +69,7 @@ format: doxygen: <<: *global_tag_def - stage: build + stage: fmt_dox script: - cd build - make dox