From 23dc5c08d9ec5d0f085a50c70524b55341560238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 22 Feb 2024 12:39:40 +0000 Subject: [PATCH 01/87] Create .gitlab-ci.yml file and update to basic test pipeline. --- .gitlab-ci.yml | 138 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..05923d549 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,138 @@ +variables: + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/$CI_JOB_ID/ + +stages: + - build + - test + - deploy + +# common subscripts: +.repo2ugcore: &repo2ugcore + - ls -all + - cd .. + - mv "$CI_JOB_ID" tmp + - mkdir "$CI_JOB_ID" + - mv tmp "$CI_JOB_ID"/ugcore + - cd "$CI_JOB_ID" + +.setup_ug: &setup_ug + - if cd ughub; then git pull&&cd ..; else git clone https://github.com/UG4/ughub ughub; fi + - export PATH=$PATH:$(pwd)/ughub + - mkdir -p ug4 + - cd ug4 + - ls -a + - ughub init + - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages + - ughub updatesources + - ughub install $UG_PACKAGES_TO_INSTALL + - ughub git submodule init # todo needed? + - ughub git submodule update # todo needed? + - rm -rf ugcore/ + - mv ../ugcore ugcore # todo do a submodule update in cloned repo? + - source ugcore/scripts/shell/ugbash + - cd .. + +.build_ug: &build_ug + - cd ug4 + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -GNinja + - ninja -j8 + - cd ../.. + +.build_test: &build_test + - cd ug4/apps/unit_tests + - mkdir -p build + - cd build + - export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 + - cd ../../../.. + +.run_tests: &run_tests + - mkdir -p test_reports + - mkdir -p coverage_reports + - pwd + - ls + - echo $UG4_ROOT + - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report || true + - mv ug_test_numprocs_1.log report.xml + #- gcovr -v --gcov-executable "llvm-cov gcov" --xml -o "coveragereport_${CI_COMMIT_SHORT_SHA}.xml" -r $CI_PROJECT_DIR $CI_PROJECT_DIR/ug4/build/ + #- mv coveragereport_${CI_COMMIT_SHORT_SHA}.xml coverage_reports/${CI_COMMIT_SHORT_SHA}.xml + - cd .. + +# BUILD sources on various platforms and compilers +build-clang: + stage: build + variables: + CC: "ccache clang" + CXX: "ccache clang++" + UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion" + tags: + - linux + timeout: 4 hours + script: + - *repo2ugcore # moves caches into ugcore folder + - *setup_ug + - *build_ug + artifacts: + when: on_success + expire_in: 1 week + paths: + - ug4/bin + #cache: + # policy: pull-push + # unprotect: false + # untracked: false + # when: on_success + # paths: + # - "ug4/build" + # - "ughub" + +# TEST ug4 +do-test: + stage: test + variables: + CC: "ccache clang" + CXX: "ccache clang++" + CXX_FLAGS: "-O0 -coverage -fPIC" + UG_PACKAGES_TO_INSTALL: "ugcore tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" + tags: + - linux + timeout: 4 hours + script: + - *repo2ugcore # moves caches into ugcore folder + - *setup_ug + - *build_ug + - *build_test + - *run_tests + artifacts: + when: always + expire_in: 4 week + paths: + - report.xml + reports: + junit: report.xml + #coverage_report: + # coverage_format: cobertura + # path: coverage_reports/${CI_COMMIT_SHORT_SHA}.xml + #cache: + # policy: pull-push + # unprotect: false + # untracked: false + # when: on_success + # paths: + # - "ug4/build" + # - "ug4/apps/unit_tests/build" + # - "ughub" + +# DEPLOY upload changes to repo and upload packages? +deploy-job: # TODO + variables: + GIT_STRATEGY: none # Do not clone repo again for this job. + stage: deploy + environment: production + script: + - echo "Get release artifact and deploy it" \ No newline at end of file From 2033269ad1275e6015dfe2eba0b4cc37d5609245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 22 Feb 2024 13:17:42 +0000 Subject: [PATCH 02/87] Add comment --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05923d549..6e7b18862 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,7 +55,7 @@ stages: - pwd - ls - echo $UG4_ROOT - - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report || true + - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report || true # <- TODO remove "|| true"? - mv ug_test_numprocs_1.log report.xml #- gcovr -v --gcov-executable "llvm-cov gcov" --xml -o "coveragereport_${CI_COMMIT_SHORT_SHA}.xml" -r $CI_PROJECT_DIR $CI_PROJECT_DIR/ug4/build/ #- mv coveragereport_${CI_COMMIT_SHORT_SHA}.xml coverage_reports/${CI_COMMIT_SHORT_SHA}.xml From 2755decfa4091a8159fcef8b4de7870432a376b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 15:25:52 +0000 Subject: [PATCH 03/87] remove always return true for testsuite call in test script and build testsuite in release mode. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e7b18862..c24f045c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,7 @@ stages: - mkdir -p build - cd build - export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=OFF -GNinja - ninja -j8 - cd ../../../.. @@ -55,7 +55,7 @@ stages: - pwd - ls - echo $UG4_ROOT - - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report || true # <- TODO remove "|| true"? + - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report - mv ug_test_numprocs_1.log report.xml #- gcovr -v --gcov-executable "llvm-cov gcov" --xml -o "coveragereport_${CI_COMMIT_SHORT_SHA}.xml" -r $CI_PROJECT_DIR $CI_PROJECT_DIR/ug4/build/ #- mv coveragereport_${CI_COMMIT_SHORT_SHA}.xml coverage_reports/${CI_COMMIT_SHORT_SHA}.xml From 849b9b73b75c1c603aba4a7f08f259a94277a73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 15:39:58 +0000 Subject: [PATCH 04/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c24f045c4..a532200d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,7 +44,7 @@ stages: - cd ug4/apps/unit_tests - mkdir -p build - cd build - - export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" + #- export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=OFF -GNinja - ninja -j8 - cd ../../../.. From b9a5e6bb5f5e4330cbaaa9b3ca63caff737a1775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 15:48:25 +0000 Subject: [PATCH 05/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a532200d5..30e174780 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,8 +27,8 @@ stages: - ughub install $UG_PACKAGES_TO_INSTALL - ughub git submodule init # todo needed? - ughub git submodule update # todo needed? - - rm -rf ugcore/ - - mv ../ugcore ugcore # todo do a submodule update in cloned repo? + #- rm -rf ugcore/ + #- mv ../ugcore ugcore # todo do a submodule update in cloned repo? - source ugcore/scripts/shell/ugbash - cd .. From 74b725b29962c6c0211e2f668ec4de49e452f195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 15:52:55 +0000 Subject: [PATCH 06/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30e174780..a4651117f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ stages: - mkdir -p build - cd build - cmake .. -DENABLE_ALL_PLUGINS=ON -GNinja - - ninja -j8 + - ninja -j4 - cd ../.. .build_test: &build_test @@ -46,7 +46,7 @@ stages: - cd build #- export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=OFF -GNinja - - ninja -j8 + - ninja -j4 - cd ../../../.. .run_tests: &run_tests From d209d3640b7da5be809d2d75fdf661af084070a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 16:08:27 +0000 Subject: [PATCH 07/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a4651117f..281ed5cfc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,8 +27,8 @@ stages: - ughub install $UG_PACKAGES_TO_INSTALL - ughub git submodule init # todo needed? - ughub git submodule update # todo needed? - #- rm -rf ugcore/ - #- mv ../ugcore ugcore # todo do a submodule update in cloned repo? + - rm -rf ugcore/ + - mv ../ugcore ugcore # todo do a submodule update in cloned repo? - source ugcore/scripts/shell/ugbash - cd .. @@ -95,7 +95,7 @@ do-test: variables: CC: "ccache clang" CXX: "ccache clang++" - CXX_FLAGS: "-O0 -coverage -fPIC" + #CXX_FLAGS: "-O0 -coverage -fPIC" UG_PACKAGES_TO_INSTALL: "ugcore tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" From 1a248450acd86381b625830ad1a24c4af9728361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 16:26:27 +0000 Subject: [PATCH 08/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 281ed5cfc..5c7a94ed7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,8 +36,8 @@ stages: - cd ug4 - mkdir -p build - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -GNinja - - ninja -j4 + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja + - ninja -j8 - cd ../.. .build_test: &build_test @@ -45,8 +45,8 @@ stages: - mkdir -p build - cd build #- export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=OFF -GNinja - - ninja -j4 + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 - cd ../../../.. .run_tests: &run_tests @@ -95,7 +95,7 @@ do-test: variables: CC: "ccache clang" CXX: "ccache clang++" - #CXX_FLAGS: "-O0 -coverage -fPIC" + CXX_FLAGS: "-O0 -coverage -fPIC" UG_PACKAGES_TO_INSTALL: "ugcore tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" From 719e0d5acc96130354a6bb55e7c63f30860e60fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 16:42:13 +0000 Subject: [PATCH 09/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c7a94ed7..19979c1df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,7 +44,7 @@ stages: - cd ug4/apps/unit_tests - mkdir -p build - cd build - #- export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" + - export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - ninja -j8 - cd ../../../.. From 66710fda2a0316328ed10009ecc81051a2ddfef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 17:06:24 +0000 Subject: [PATCH 10/87] rework pipeline --- .gitlab-ci.yml | 108 +++++++++++++++++-------------------------------- 1 file changed, 37 insertions(+), 71 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19979c1df..35d3783cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,80 +1,49 @@ variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/$CI_JOB_ID/ + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore/ stages: - build - test - deploy -# common subscripts: -.repo2ugcore: &repo2ugcore - - ls -all - - cd .. - - mv "$CI_JOB_ID" tmp - - mkdir "$CI_JOB_ID" - - mv tmp "$CI_JOB_ID"/ugcore - - cd "$CI_JOB_ID" - -.setup_ug: &setup_ug - - if cd ughub; then git pull&&cd ..; else git clone https://github.com/UG4/ughub ughub; fi - - export PATH=$PATH:$(pwd)/ughub - - mkdir -p ug4 - - cd ug4 - - ls -a - - ughub init - - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - - ughub updatesources - - ughub install $UG_PACKAGES_TO_INSTALL - - ughub git submodule init # todo needed? - - ughub git submodule update # todo needed? - - rm -rf ugcore/ - - mv ../ugcore ugcore # todo do a submodule update in cloned repo? - - source ugcore/scripts/shell/ugbash - - cd .. - -.build_ug: &build_ug - - cd ug4 - - mkdir -p build - - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - - ninja -j8 - - cd ../.. - -.build_test: &build_test - - cd ug4/apps/unit_tests - - mkdir -p build - - cd build - - export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - - ninja -j8 - - cd ../../../.. - -.run_tests: &run_tests - - mkdir -p test_reports - - mkdir -p coverage_reports - - pwd - - ls - - echo $UG4_ROOT - - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report - - mv ug_test_numprocs_1.log report.xml - #- gcovr -v --gcov-executable "llvm-cov gcov" --xml -o "coveragereport_${CI_COMMIT_SHORT_SHA}.xml" -r $CI_PROJECT_DIR $CI_PROJECT_DIR/ug4/build/ - #- mv coveragereport_${CI_COMMIT_SHORT_SHA}.xml coverage_reports/${CI_COMMIT_SHORT_SHA}.xml - - cd .. - # BUILD sources on various platforms and compilers build-clang: stage: build variables: CC: "ccache clang" CXX: "ccache clang++" - UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion" + CXX_FLAGS: "-O0 -coverage -fPIC" + UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" tags: - linux timeout: 4 hours script: - - *repo2ugcore # moves caches into ugcore folder - - *setup_ug - - *build_ug + - pwd + - ls -a + # move to CI "workspace" and install ug + - cd ../../ + - git clone https://github.com/UG4/ughub + - export PATH=$PATH:$(pwd)/ughub + - cd ug4 + - ughub init + - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages + - ughub updatesources + - ughub install $UG_PACKAGES_TO_INSTALL + - ughub git submodule init + - ughub git submodule update + # build ug + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja + - ninja -j8 + # build testsuite + - cd ../apps/unit_tests/ + - mkdir -p build + - cd build + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 artifacts: when: on_success expire_in: 1 week @@ -93,21 +62,18 @@ build-clang: do-test: stage: test variables: - CC: "ccache clang" - CXX: "ccache clang++" - CXX_FLAGS: "-O0 -coverage -fPIC" - UG_PACKAGES_TO_INSTALL: "ugcore tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" + GIT_STRATEGY: none # Do not clone repo again for this job. tags: - linux timeout: 4 hours script: - - *repo2ugcore # moves caches into ugcore folder - - *setup_ug - - *build_ug - - *build_test - - *run_tests + - pwd + - ls -a + - source scripts/shell/ugbash + - cd ../ + - echo $UG4_ROOT + - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report + - mv ug_test_numprocs_1.log report.xml artifacts: when: always expire_in: 4 week From b61233d2397ee971d3fe47f8aa6a32aeee377983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 17:16:22 +0000 Subject: [PATCH 11/87] ignore package conflict --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35d3783cf..a3d16602c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ build-clang: - ughub init - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - ughub updatesources - - ughub install $UG_PACKAGES_TO_INSTALL + - ughub install --ignore $UG_PACKAGES_TO_INSTALL - ughub git submodule init - ughub git submodule update # build ug From 57c1d4314bb59066aff1ec50f0b4ee18398e33d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 17:18:25 +0000 Subject: [PATCH 12/87] move --ignore --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a3d16602c..b60fe569b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ build-clang: - ughub init - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - ughub updatesources - - ughub install --ignore $UG_PACKAGES_TO_INSTALL + - ughub install $UG_PACKAGES_TO_INSTALL --ignore - ughub git submodule init - ughub git submodule update # build ug From 6f13a42df37ae03eb2ecf52e36d70871a811af8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 17:20:58 +0000 Subject: [PATCH 13/87] replace ugcore --- .gitlab-ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b60fe569b..d2b56e7e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore/ + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ stages: - build @@ -23,16 +23,21 @@ build-clang: - pwd - ls -a # move to CI "workspace" and install ug - - cd ../../ + - cd ../ - git clone https://github.com/UG4/ughub - export PATH=$PATH:$(pwd)/ughub + - mkdir -p ug4 - cd ug4 - ughub init - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - ughub updatesources - - ughub install $UG_PACKAGES_TO_INSTALL --ignore + - ughub install $UG_PACKAGES_TO_INSTALL - ughub git submodule init - ughub git submodule update + # replace ugcore + - ls -a + - rf -r ugcore + - mv ../ugcore ugcore # build ug - mkdir -p build - cd build From 050540f3210c89c376aaaa67cc0530675d818a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 17:21:55 +0000 Subject: [PATCH 14/87] fix remove command --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2b56e7e6..c93cc84e7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,7 @@ build-clang: - ughub git submodule update # replace ugcore - ls -a - - rf -r ugcore + - rm -r ugcore - mv ../ugcore ugcore # build ug - mkdir -p build From d7a55f631c0c0a219f149583f46497b14b5ec933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 17:32:45 +0000 Subject: [PATCH 15/87] revert to last working script --- .gitlab-ci.yml | 115 +++++++++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 43 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c93cc84e7..8f46a24ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,54 +1,80 @@ variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/$CI_JOB_ID/ stages: - build - test - deploy +# common subscripts: +.repo2ugcore: &repo2ugcore + - ls -all + - cd .. + - mv "$CI_JOB_ID" tmp + - mkdir "$CI_JOB_ID" + - mv tmp "$CI_JOB_ID"/ugcore + - cd "$CI_JOB_ID" + +.setup_ug: &setup_ug + - if cd ughub; then git pull&&cd ..; else git clone https://github.com/UG4/ughub ughub; fi + - export PATH=$PATH:$(pwd)/ughub + - mkdir -p ug4 + - cd ug4 + - ls -a + - ughub init + - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages + - ughub updatesources + - ughub install $UG_PACKAGES_TO_INSTALL + - ughub git submodule init # todo needed? + - ughub git submodule update # todo needed? + - rm -rf ugcore/ + - mv ../ugcore ugcore # todo do a submodule update in cloned repo? + - source ugcore/scripts/shell/ugbash + - cd .. + +.build_ug: &build_ug + - cd ug4 + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -GNinja + - ninja -j8 + - cd ../.. + +.build_test: &build_test + - cd ug4/apps/unit_tests + - mkdir -p build + - cd build + - export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 + - cd ../../../.. + +.run_tests: &run_tests + - mkdir -p test_reports + - mkdir -p coverage_reports + - pwd + - ls + - echo $UG4_ROOT + - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report || true # <- TODO remove "|| true"? + - mv ug_test_numprocs_1.log report.xml + #- gcovr -v --gcov-executable "llvm-cov gcov" --xml -o "coveragereport_${CI_COMMIT_SHORT_SHA}.xml" -r $CI_PROJECT_DIR $CI_PROJECT_DIR/ug4/build/ + #- mv coveragereport_${CI_COMMIT_SHORT_SHA}.xml coverage_reports/${CI_COMMIT_SHORT_SHA}.xml + - cd .. + # BUILD sources on various platforms and compilers build-clang: stage: build variables: CC: "ccache clang" CXX: "ccache clang++" - CXX_FLAGS: "-O0 -coverage -fPIC" - UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" + UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion" tags: - linux timeout: 4 hours script: - - pwd - - ls -a - # move to CI "workspace" and install ug - - cd ../ - - git clone https://github.com/UG4/ughub - - export PATH=$PATH:$(pwd)/ughub - - mkdir -p ug4 - - cd ug4 - - ughub init - - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - - ughub updatesources - - ughub install $UG_PACKAGES_TO_INSTALL - - ughub git submodule init - - ughub git submodule update - # replace ugcore - - ls -a - - rm -r ugcore - - mv ../ugcore ugcore - # build ug - - mkdir -p build - - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - - ninja -j8 - # build testsuite - - cd ../apps/unit_tests/ - - mkdir -p build - - cd build - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - - ninja -j8 + - *repo2ugcore # moves caches into ugcore folder + - *setup_ug + - *build_ug artifacts: when: on_success expire_in: 1 week @@ -67,18 +93,21 @@ build-clang: do-test: stage: test variables: - GIT_STRATEGY: none # Do not clone repo again for this job. + CC: "ccache clang" + CXX: "ccache clang++" + CXX_FLAGS: "-O0 -coverage -fPIC" + UG_PACKAGES_TO_INSTALL: "ugcore tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" tags: - linux timeout: 4 hours script: - - pwd - - ls -a - - source scripts/shell/ugbash - - cd ../ - - echo $UG4_ROOT - - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report - - mv ug_test_numprocs_1.log report.xml + - *repo2ugcore # moves caches into ugcore folder + - *setup_ug + - *build_ug + - *build_test + - *run_tests artifacts: when: always expire_in: 4 week @@ -106,4 +135,4 @@ deploy-job: # TODO stage: deploy environment: production script: - - echo "Get release artifact and deploy it" \ No newline at end of file + - echo "Get release artifact and deploy it" From a02eac9997d7fbb341ac8d36699bcf3c40043bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 11 Apr 2024 17:34:51 +0000 Subject: [PATCH 16/87] Revert "revert to last working script" This reverts commit d7a55f631c0c0a219f149583f46497b14b5ec933 --- .gitlab-ci.yml | 115 ++++++++++++++++++------------------------------- 1 file changed, 43 insertions(+), 72 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f46a24ce..c93cc84e7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,80 +1,54 @@ variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/$CI_JOB_ID/ + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ stages: - build - test - deploy -# common subscripts: -.repo2ugcore: &repo2ugcore - - ls -all - - cd .. - - mv "$CI_JOB_ID" tmp - - mkdir "$CI_JOB_ID" - - mv tmp "$CI_JOB_ID"/ugcore - - cd "$CI_JOB_ID" - -.setup_ug: &setup_ug - - if cd ughub; then git pull&&cd ..; else git clone https://github.com/UG4/ughub ughub; fi - - export PATH=$PATH:$(pwd)/ughub - - mkdir -p ug4 - - cd ug4 - - ls -a - - ughub init - - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - - ughub updatesources - - ughub install $UG_PACKAGES_TO_INSTALL - - ughub git submodule init # todo needed? - - ughub git submodule update # todo needed? - - rm -rf ugcore/ - - mv ../ugcore ugcore # todo do a submodule update in cloned repo? - - source ugcore/scripts/shell/ugbash - - cd .. - -.build_ug: &build_ug - - cd ug4 - - mkdir -p build - - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -GNinja - - ninja -j8 - - cd ../.. - -.build_test: &build_test - - cd ug4/apps/unit_tests - - mkdir -p build - - cd build - - export LD_FLAGS="-lboost_system -lboost_filesystem -lboost_serialization -lug4" - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - - ninja -j8 - - cd ../../../.. - -.run_tests: &run_tests - - mkdir -p test_reports - - mkdir -p coverage_reports - - pwd - - ls - - echo $UG4_ROOT - - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report || true # <- TODO remove "|| true"? - - mv ug_test_numprocs_1.log report.xml - #- gcovr -v --gcov-executable "llvm-cov gcov" --xml -o "coveragereport_${CI_COMMIT_SHORT_SHA}.xml" -r $CI_PROJECT_DIR $CI_PROJECT_DIR/ug4/build/ - #- mv coveragereport_${CI_COMMIT_SHORT_SHA}.xml coverage_reports/${CI_COMMIT_SHORT_SHA}.xml - - cd .. - # BUILD sources on various platforms and compilers build-clang: stage: build variables: CC: "ccache clang" CXX: "ccache clang++" - UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion" + CXX_FLAGS: "-O0 -coverage -fPIC" + UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" tags: - linux timeout: 4 hours script: - - *repo2ugcore # moves caches into ugcore folder - - *setup_ug - - *build_ug + - pwd + - ls -a + # move to CI "workspace" and install ug + - cd ../ + - git clone https://github.com/UG4/ughub + - export PATH=$PATH:$(pwd)/ughub + - mkdir -p ug4 + - cd ug4 + - ughub init + - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages + - ughub updatesources + - ughub install $UG_PACKAGES_TO_INSTALL + - ughub git submodule init + - ughub git submodule update + # replace ugcore + - ls -a + - rm -r ugcore + - mv ../ugcore ugcore + # build ug + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja + - ninja -j8 + # build testsuite + - cd ../apps/unit_tests/ + - mkdir -p build + - cd build + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 artifacts: when: on_success expire_in: 1 week @@ -93,21 +67,18 @@ build-clang: do-test: stage: test variables: - CC: "ccache clang" - CXX: "ccache clang++" - CXX_FLAGS: "-O0 -coverage -fPIC" - UG_PACKAGES_TO_INSTALL: "ugcore tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" + GIT_STRATEGY: none # Do not clone repo again for this job. tags: - linux timeout: 4 hours script: - - *repo2ugcore # moves caches into ugcore folder - - *setup_ug - - *build_ug - - *build_test - - *run_tests + - pwd + - ls -a + - source scripts/shell/ugbash + - cd ../ + - echo $UG4_ROOT + - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report + - mv ug_test_numprocs_1.log report.xml artifacts: when: always expire_in: 4 week @@ -135,4 +106,4 @@ deploy-job: # TODO stage: deploy environment: production script: - - echo "Get release artifact and deploy it" + - echo "Get release artifact and deploy it" \ No newline at end of file From 4a282dd2d4284cb16535ed5b6b82ffe18e135ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 15 May 2024 15:07:58 +0000 Subject: [PATCH 17/87] Test CI script with normal ug installation from ughub. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c93cc84e7..60364bcb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,8 +36,8 @@ build-clang: - ughub git submodule update # replace ugcore - ls -a - - rm -r ugcore - - mv ../ugcore ugcore + #- rm -r ugcore + #- mv ../ugcore ugcore # build ug - mkdir -p build - cd build From 295087998a93a1b40534b3045979794ab2ac13b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 12:18:07 +0000 Subject: [PATCH 18/87] Use docker image for pipeline. --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60364bcb1..2a8665afc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,6 @@ +default: + image: rigby132/ug4-minimal:latest + variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ From 6b664ae4b2b83812c35dd3e7ca7bebc49ec1aad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 12:21:06 +0000 Subject: [PATCH 19/87] Specify gitlab docker instance as runner via tag. --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a8665afc..6efdbc942 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,7 @@ default: image: rigby132/ug4-minimal:latest + tags: + - gitlab-org-docker variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ @@ -19,8 +21,7 @@ build-clang: UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" - tags: - - linux + timeout: 4 hours script: - pwd From b9c7e507d719c179b43a0d00ba21e2cde5852fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 12:33:37 +0000 Subject: [PATCH 20/87] clone into docker ug4 folder and remove ug4 setup steps. --- .gitlab-ci.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6efdbc942..0b3e3da25 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ default: - gitlab-org-docker variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ + GIT_CLONE_PATH: /opt/ug4/ugcore/ stages: - build @@ -27,19 +27,19 @@ build-clang: - pwd - ls -a # move to CI "workspace" and install ug - - cd ../ - - git clone https://github.com/UG4/ughub - - export PATH=$PATH:$(pwd)/ughub - - mkdir -p ug4 - - cd ug4 - - ughub init - - ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - - ughub updatesources - - ughub install $UG_PACKAGES_TO_INSTALL - - ughub git submodule init - - ughub git submodule update + #- cd ../ + #- git clone https://github.com/UG4/ughub + #- export PATH=$PATH:$(pwd)/ughub + #- mkdir -p ug4 + #- cd ug4 + #- ughub init + #- ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages + #- ughub updatesources + #- ughub install $UG_PACKAGES_TO_INSTALL + #- ughub git submodule init + #- ughub git submodule update # replace ugcore - - ls -a + #- ls -a #- rm -r ugcore #- mv ../ugcore ugcore # build ug @@ -48,11 +48,11 @@ build-clang: - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 # build testsuite - - cd ../apps/unit_tests/ - - mkdir -p build - - cd build - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - - ninja -j8 + #- cd ../apps/unit_tests/ + #- mkdir -p build + #- cd build + #- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + #- ninja -j8 artifacts: when: on_success expire_in: 1 week From 85bdd7fbc2c404bc822bcb26ac04c8198b86fde8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 12:42:24 +0000 Subject: [PATCH 21/87] Move clone path into builds directory. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b3e3da25..72f655ad2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ default: - gitlab-org-docker variables: - GIT_CLONE_PATH: /opt/ug4/ugcore/ + GIT_CLONE_PATH: $CI_BUILDS_DIR/ug4/ugcore/ stages: - build From 5be8d26d5c7a6a3354a0ceab7a7d7ed80f460e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 12:44:52 +0000 Subject: [PATCH 22/87] Set compilers for cmake. --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72f655ad2..11de20325 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,10 +15,10 @@ stages: build-clang: stage: build variables: - CC: "ccache clang" - CXX: "ccache clang++" + CMAKE_C_COMPILER: "gcc" + CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O0 -coverage -fPIC" - UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" From 671a4fd9444436dfd9df7671eec3be0b91aefc47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 12:46:36 +0000 Subject: [PATCH 23/87] Fix: starting at wrong directory. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11de20325..9683804fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ build-clang: - pwd - ls -a # move to CI "workspace" and install ug - #- cd ../ + - cd ../ #- git clone https://github.com/UG4/ughub #- export PATH=$PATH:$(pwd)/ughub #- mkdir -p ug4 From aaafbefbf98875c1941824aa679eb4aad1687a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 12:49:00 +0000 Subject: [PATCH 24/87] Move pwd+ls after cd for diagnostics. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9683804fb..a19708e8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,10 +24,10 @@ build-clang: timeout: 4 hours script: - - pwd - - ls -a # move to CI "workspace" and install ug - cd ../ + - pwd + - ls -a #- git clone https://github.com/UG4/ughub #- export PATH=$PATH:$(pwd)/ughub #- mkdir -p ug4 From ec785ba082d1ddb4ab35a67f2c96a80b5c01818d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 13:44:59 +0000 Subject: [PATCH 25/87] Use ug4 from opt in builds directory. --- .gitlab-ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a19708e8f..3c0e11518 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,8 @@ default: - gitlab-org-docker variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/ug4/ugcore/ + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ + WORKSPACE_PATH: $GIT_CLONE_PATH/../ stages: - build @@ -25,12 +26,13 @@ build-clang: timeout: 4 hours script: # move to CI "workspace" and install ug - - cd ../ + - cd $WORKSPACE_PATH + - mkdir -p ug4 + - cp -R /opt/ug4/. ug4 - pwd - ls -a #- git clone https://github.com/UG4/ughub #- export PATH=$PATH:$(pwd)/ughub - #- mkdir -p ug4 #- cd ug4 #- ughub init #- ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages @@ -40,8 +42,8 @@ build-clang: #- ughub git submodule update # replace ugcore #- ls -a - #- rm -r ugcore - #- mv ../ugcore ugcore + - rm -r ug4/ugcore + - mv ugcore ug4/ugcore # build ug - mkdir -p build - cd build From 4618aabc4b9fff0c9ff893ed414a9982aa56082c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 13:46:43 +0000 Subject: [PATCH 26/87] Remove ending "/" in paths to avoid invalid paths. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c0e11518..91336ed56 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,8 @@ default: - gitlab-org-docker variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore/ - WORKSPACE_PATH: $GIT_CLONE_PATH/../ + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore + WORKSPACE_PATH: $GIT_CLONE_PATH/.. stages: - build From c6a159dce6c25f74126bc027f12ab95ca39564c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 13:49:28 +0000 Subject: [PATCH 27/87] Remove redundant path variable. --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91336ed56..d0860fbb9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,6 @@ default: variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore - WORKSPACE_PATH: $GIT_CLONE_PATH/.. stages: - build @@ -26,7 +25,7 @@ build-clang: timeout: 4 hours script: # move to CI "workspace" and install ug - - cd $WORKSPACE_PATH + - cd .. - mkdir -p ug4 - cp -R /opt/ug4/. ug4 - pwd From dac6028d97c7f86953526a0f25d262953daa3ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 29 May 2024 13:52:08 +0000 Subject: [PATCH 28/87] Move to ug4 directory before building. --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0860fbb9..8422658fc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,6 +44,7 @@ build-clang: - rm -r ug4/ugcore - mv ugcore ug4/ugcore # build ug + - cd ug4 - mkdir -p build - cd build - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja From 06522ee65722042cce46d318715372214991e2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Mon, 17 Jun 2024 12:53:54 +0000 Subject: [PATCH 29/87] Change tag to "docker". --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8422658fc..a4252c9b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ default: image: rigby132/ug4-minimal:latest tags: - - gitlab-org-docker + - docker variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore From d5b60ce252b5d1618224e951ab33859673dca5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Mon, 17 Jun 2024 13:20:52 +0000 Subject: [PATCH 30/87] cp ugcore instead of mv so original path stays intact and adjust artifact path relative to clone path. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a4252c9b7..513a91872 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ build-clang: # replace ugcore #- ls -a - rm -r ug4/ugcore - - mv ugcore ug4/ugcore + - cp ugcore ug4/ugcore # build ug - cd ug4 - mkdir -p build @@ -59,7 +59,7 @@ build-clang: when: on_success expire_in: 1 week paths: - - ug4/bin + - ../ug4/bin #cache: # policy: pull-push # unprotect: false From 49725fdaec857bb6876dbb33300f8952657c32cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Mon, 17 Jun 2024 13:22:24 +0000 Subject: [PATCH 31/87] Add -r to cp command. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 513a91872..adf6f9d4c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ build-clang: # replace ugcore #- ls -a - rm -r ug4/ugcore - - cp ugcore ug4/ugcore + - cp -r ugcore ug4/ugcore # build ug - cd ug4 - mkdir -p build From 81f6aee009e69f9dcbb35ae509b13000fa88eb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Mon, 17 Jun 2024 13:37:49 +0000 Subject: [PATCH 32/87] Update artifact paths. --- .gitlab-ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index adf6f9d4c..6a821f2f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,16 +50,17 @@ build-clang: - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 # build testsuite - #- cd ../apps/unit_tests/ - #- mkdir -p build - #- cd build - #- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - #- ninja -j8 + - cd ../apps/unit_tests/ + - mkdir -p build + - cd build + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 artifacts: when: on_success expire_in: 1 week paths: - - ../ug4/bin + - ../ug4/bin/* + - ../ug4/bin/plugins/* #cache: # policy: pull-push # unprotect: false @@ -74,8 +75,6 @@ do-test: stage: test variables: GIT_STRATEGY: none # Do not clone repo again for this job. - tags: - - linux timeout: 4 hours script: - pwd From 4352ed7811917e1034b8d948dfa9b02af09ae440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Mon, 17 Jun 2024 13:39:20 +0000 Subject: [PATCH 33/87] Remove testsuite build. --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a821f2f6..04b7cdbb5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,11 +50,11 @@ build-clang: - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 # build testsuite - - cd ../apps/unit_tests/ - - mkdir -p build - - cd build - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - - ninja -j8 + #- cd ../apps/unit_tests/ + #- mkdir -p build + #- cd build + #- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + #- ninja -j8 artifacts: when: on_success expire_in: 1 week From 60b7336894045a13eaae8e44f7b3a9d9aa7ce7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 16:26:41 +0000 Subject: [PATCH 34/87] Use test image for test stage. --- .gitlab-ci.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 04b7cdbb5..a4dacbe98 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,4 @@ default: - image: rigby132/ug4-minimal:latest tags: - docker @@ -14,6 +13,7 @@ stages: # BUILD sources on various platforms and compilers build-clang: stage: build + image: rigby132/ug4-minimal:latest variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" @@ -21,7 +21,6 @@ build-clang: #UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" - timeout: 4 hours script: # move to CI "workspace" and install ug @@ -49,12 +48,6 @@ build-clang: - cd build - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 - # build testsuite - #- cd ../apps/unit_tests/ - #- mkdir -p build - #- cd build - #- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - #- ninja -j8 artifacts: when: on_success expire_in: 1 week @@ -73,12 +66,20 @@ build-clang: # TEST ug4 do-test: stage: test + image: rigby132/ug4-test:latest variables: GIT_STRATEGY: none # Do not clone repo again for this job. timeout: 4 hours script: - pwd - ls -a + - ls -a ../ + # build testsuite + #- cd ../apps/unit_tests/ + #- mkdir -p build + #- cd build + #- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + #- ninja -j8 - source scripts/shell/ugbash - cd ../ - echo $UG4_ROOT From 812446428f2329736ebe7ae3d5d8e0830227de0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 16:46:01 +0000 Subject: [PATCH 35/87] Copy with -n option. --- .gitlab-ci.yml | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a4dacbe98..c5cbfd26a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,10 @@ default: - docker variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ugcore + GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore + CMAKE_C_COMPILER: "gcc" + CMAKE_CXX_COMPILER: "g++" + CXX_FLAGS: "-O0 -coverage -fPIC" stages: - build @@ -14,19 +17,13 @@ stages: build-clang: stage: build image: rigby132/ug4-minimal:latest - variables: - CMAKE_C_COMPILER: "gcc" - CMAKE_CXX_COMPILER: "g++" - CXX_FLAGS: "-O0 -coverage -fPIC" #UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" timeout: 4 hours script: - # move to CI "workspace" and install ug - - cd .. - - mkdir -p ug4 - - cp -R /opt/ug4/. ug4 + # copy ug4 without overwriting existing files (ugcore) + - cp -n -R /opt/ug4/. . - pwd - ls -a #- git clone https://github.com/UG4/ughub @@ -52,8 +49,8 @@ build-clang: when: on_success expire_in: 1 week paths: - - ../ug4/bin/* - - ../ug4/bin/plugins/* + - bin/* + - bin/plugins/* #cache: # policy: pull-push # unprotect: false @@ -67,27 +64,27 @@ build-clang: do-test: stage: test image: rigby132/ug4-test:latest - variables: - GIT_STRATEGY: none # Do not clone repo again for this job. timeout: 4 hours script: + # copy ug4 without overwriting existing files (ugcore) + - cp -n -R /opt/ug4/. . - pwd - ls -a - - ls -a ../ # build testsuite - #- cd ../apps/unit_tests/ - #- mkdir -p build - #- cd build - #- cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - #- ninja -j8 - - source scripts/shell/ugbash - - cd ../ + - cd apps/unit_tests/ + - mkdir -p build + - cd build + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 + - cd ../../.. + - pwd + - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - - ./ug4/bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report + - ./bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report - mv ug_test_numprocs_1.log report.xml artifacts: when: always - expire_in: 4 week + expire_in: 1 week paths: - report.xml reports: From 7d514c58f6be1e7c87f5ca9d49454aa72ced6921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 16:50:53 +0000 Subject: [PATCH 36/87] Change directory before copy and remove some comments. --- .gitlab-ci.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5cbfd26a..e47c1b84a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,9 @@ variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O0 -coverage -fPIC" + #UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" + #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" stages: - build @@ -17,28 +20,13 @@ stages: build-clang: stage: build image: rigby132/ug4-minimal:latest - #UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" timeout: 4 hours script: # copy ug4 without overwriting existing files (ugcore) + - cd .. - cp -n -R /opt/ug4/. . - pwd - ls -a - #- git clone https://github.com/UG4/ughub - #- export PATH=$PATH:$(pwd)/ughub - #- cd ug4 - #- ughub init - #- ughub addsource quadruped gitolite3@quadruped.gcsc.uni-frankfurt.de:ug4-packages - #- ughub updatesources - #- ughub install $UG_PACKAGES_TO_INSTALL - #- ughub git submodule init - #- ughub git submodule update - # replace ugcore - #- ls -a - - rm -r ug4/ugcore - - cp -r ugcore ug4/ugcore # build ug - cd ug4 - mkdir -p build @@ -67,6 +55,7 @@ do-test: timeout: 4 hours script: # copy ug4 without overwriting existing files (ugcore) + - cd .. - cp -n -R /opt/ug4/. . - pwd - ls -a From 94784825c33053c52586dd1e35716bdcb0d72e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 17:01:41 +0000 Subject: [PATCH 37/87] Fix cd'ing to non existent directory. --- .gitlab-ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e47c1b84a..ee09ff245 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,11 +24,10 @@ build-clang: script: # copy ug4 without overwriting existing files (ugcore) - cd .. - - cp -n -R /opt/ug4/. . + - cp --update=none -R /opt/ug4/. . - pwd - ls -a # build ug - - cd ug4 - mkdir -p build - cd build - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja @@ -56,9 +55,7 @@ do-test: script: # copy ug4 without overwriting existing files (ugcore) - cd .. - - cp -n -R /opt/ug4/. . - - pwd - - ls -a + - cp --update=none -R /opt/ug4/. . # build testsuite - cd apps/unit_tests/ - mkdir -p build From 18aa77f36228993faa96bebf475ff9cfbde535ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 17:15:08 +0000 Subject: [PATCH 38/87] Make artifact paths relative to clone folder. --- .gitlab-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee09ff245..455d3cfdd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,8 +25,6 @@ build-clang: # copy ug4 without overwriting existing files (ugcore) - cd .. - cp --update=none -R /opt/ug4/. . - - pwd - - ls -a # build ug - mkdir -p build - cd build @@ -36,8 +34,8 @@ build-clang: when: on_success expire_in: 1 week paths: - - bin/* - - bin/plugins/* + - ../bin/* + - ../bin/plugins/* #cache: # policy: pull-push # unprotect: false From 4a525530b416175bb7747304824f1640edc110c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 17:17:02 +0000 Subject: [PATCH 39/87] Make report path relative to clone folder. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 455d3cfdd..e51f439ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,7 +70,7 @@ do-test: when: always expire_in: 1 week paths: - - report.xml + - ../report.xml reports: junit: report.xml #coverage_report: From 1e13da175154e6576ca0db9851a94ddb824add51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 17:30:29 +0000 Subject: [PATCH 40/87] Put artifacts in clone folder. --- .gitlab-ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e51f439ed..c25cc1104 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,12 +30,15 @@ build-clang: - cd build - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 + # copy artifacts to clone dir + - cp ../bin/* /bin/. + - cp ../bin/plugins/* /bin/plugins/. artifacts: when: on_success expire_in: 1 week paths: - - ../bin/* - - ../bin/plugins/* + - bin/* + - bin/plugins/* #cache: # policy: pull-push # unprotect: false @@ -54,6 +57,8 @@ do-test: # copy ug4 without overwriting existing files (ugcore) - cd .. - cp --update=none -R /opt/ug4/. . + # move artifacts into correct dir + - mv ugcore/bin bin # build testsuite - cd apps/unit_tests/ - mkdir -p build @@ -65,12 +70,12 @@ do-test: - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - ./bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report - - mv ug_test_numprocs_1.log report.xml + - mv ug_test_numprocs_1.log ugcore/report.xml artifacts: when: always expire_in: 1 week paths: - - ../report.xml + - report.xml reports: junit: report.xml #coverage_report: From def0268e69a738c2a5194c47be8f29fe6fb1343c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 18:25:51 +0000 Subject: [PATCH 41/87] Move artifacts instead of copying them. --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c25cc1104..025bb4faa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,9 +30,8 @@ build-clang: - cd build - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 - # copy artifacts to clone dir - - cp ../bin/* /bin/. - - cp ../bin/plugins/* /bin/plugins/. + # move artifacts to clone dir + - mv ../bin bin artifacts: when: on_success expire_in: 1 week From c8df399ffe0952cc71e4c9884d18a9a6dab2edd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 18:34:39 +0000 Subject: [PATCH 42/87] Fix artifact move dir. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 025bb4faa..0bb5b71cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ build-clang: - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 # move artifacts to clone dir - - mv ../bin bin + - mv bin ugcore/bin artifacts: when: on_success expire_in: 1 week From a68b5fdc0c010af669566d604153f8d7e2c59265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 18:51:30 +0000 Subject: [PATCH 43/87] Exit build folder before moving artifacts. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0bb5b71cd..f4bec12c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,7 @@ build-clang: - cd build - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - ninja -j8 + - cd .. # move artifacts to clone dir - mv bin ugcore/bin artifacts: @@ -66,6 +67,7 @@ do-test: - ninja -j8 - cd ../../.. - pwd + - ls -a - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - ./bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report From 3e855432d51519257b912583ef431313c5d5d7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 19:14:18 +0000 Subject: [PATCH 44/87] build ug again for test stage and use release options for build stage. --- .gitlab-ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4bec12c4..6f06f58c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,9 +4,6 @@ default: variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore - CMAKE_C_COMPILER: "gcc" - CMAKE_CXX_COMPILER: "g++" - CXX_FLAGS: "-O0 -coverage -fPIC" #UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" @@ -21,6 +18,10 @@ build-clang: stage: build image: rigby132/ug4-minimal:latest timeout: 4 hours + variables: + CMAKE_C_COMPILER: "gcc" + CMAKE_CXX_COMPILER: "g++" + CXX_FLAGS: "-O3 -fPIC" script: # copy ug4 without overwriting existing files (ugcore) - cd .. @@ -28,10 +29,12 @@ build-clang: # build ug - mkdir -p build - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja - ninja -j8 - cd .. # move artifacts to clone dir + - ls -a bin + - ls -a bin/plugins - mv bin ugcore/bin artifacts: when: on_success @@ -53,12 +56,20 @@ do-test: stage: test image: rigby132/ug4-test:latest timeout: 4 hours + variables: + CMAKE_C_COMPILER: "gcc" + CMAKE_CXX_COMPILER: "g++" + CXX_FLAGS: "-O0 -coverage -fPIC" script: # copy ug4 without overwriting existing files (ugcore) - cd .. - cp --update=none -R /opt/ug4/. . - # move artifacts into correct dir - - mv ugcore/bin bin + # build ug in debug + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja + - ninja -j8 + - cd .. # build testsuite - cd apps/unit_tests/ - mkdir -p build From 187c2e6fad87074dc73a42c25f89e27fe81b2e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 19:26:20 +0000 Subject: [PATCH 45/87] Update CI script. --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f06f58c8..a13a7eda3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,6 @@ default: variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore - #UG_PACKAGES_TO_INSTALL: "ConvectionDiffusion ugcore tests unit_tests" - #UG_PACKAGES_TO_INSTALL: "ugcore d3f_app tests unit_tests" #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" stages: From 98a53d65849575b7251c7667c2d9338a593d76c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Sun, 30 Jun 2024 19:48:44 +0000 Subject: [PATCH 46/87] Remove directory listing for plugins dir. --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a13a7eda3..1f877125b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,6 @@ build-clang: - cd .. # move artifacts to clone dir - ls -a bin - - ls -a bin/plugins - mv bin ugcore/bin artifacts: when: on_success From 940d3855aa9e77f6cd35a23d41ac3ef3cdb7508e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Mon, 1 Jul 2024 13:18:46 +0000 Subject: [PATCH 47/87] Try without CXX flags. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1f877125b..3abacc083 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,7 +56,7 @@ do-test: variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" - CXX_FLAGS: "-O0 -coverage -fPIC" + #CXX_FLAGS: "-O0 -coverage -fPIC" script: # copy ug4 without overwriting existing files (ugcore) - cd .. From 9206f487a5059985d0838095adaf003d9770fed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Mon, 1 Jul 2024 20:07:21 +0000 Subject: [PATCH 48/87] Use "JUNIT" log format. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3abacc083..744af4b9f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,7 @@ do-test: - ls -a - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - - ./bin/testsuite --build-info=yes --log_level=all --log_format=XML -- --name report + - ./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT -- --name report - mv ug_test_numprocs_1.log ugcore/report.xml artifacts: when: always From a8121a3452fccf5e01f6378bdf6752c9f8005653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 10:37:57 +0000 Subject: [PATCH 49/87] Separate program log from junit report. --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 744af4b9f..4e80a29d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,13 +78,15 @@ do-test: - ls -a - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - - ./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT -- --name report - - mv ug_test_numprocs_1.log ugcore/report.xml + - ./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml -- --name report + - mv ug_test_numprocs_1.log ugcore/test.log + - mv report.xml ugcore/report.xml artifacts: when: always expire_in: 1 week paths: - report.xml + - test.log reports: junit: report.xml #coverage_report: From 427393588f3106c068c7d1e5db477dd7b94a5a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 13:09:03 +0000 Subject: [PATCH 50/87] Test first then build and check if docker is available. --- .gitlab-ci.yml | 83 ++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 46 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e80a29d5..b38594f8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,46 +7,8 @@ variables: #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" stages: - - build - test - - deploy - -# BUILD sources on various platforms and compilers -build-clang: - stage: build - image: rigby132/ug4-minimal:latest - timeout: 4 hours - variables: - CMAKE_C_COMPILER: "gcc" - CMAKE_CXX_COMPILER: "g++" - CXX_FLAGS: "-O3 -fPIC" - script: - # copy ug4 without overwriting existing files (ugcore) - - cd .. - - cp --update=none -R /opt/ug4/. . - # build ug - - mkdir -p build - - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja - - ninja -j8 - - cd .. - # move artifacts to clone dir - - ls -a bin - - mv bin ugcore/bin - artifacts: - when: on_success - expire_in: 1 week - paths: - - bin/* - - bin/plugins/* - #cache: - # policy: pull-push - # unprotect: false - # untracked: false - # when: on_success - # paths: - # - "ug4/build" - # - "ughub" + - build # TEST ug4 do-test: @@ -58,6 +20,7 @@ do-test: CMAKE_CXX_COMPILER: "g++" #CXX_FLAGS: "-O0 -coverage -fPIC" script: + - docker version # copy ug4 without overwriting existing files (ugcore) - cd .. - cp --update=none -R /opt/ug4/. . @@ -101,12 +64,40 @@ do-test: # - "ug4/build" # - "ug4/apps/unit_tests/build" # - "ughub" - -# DEPLOY upload changes to repo and upload packages? -deploy-job: # TODO + +# BUILD sources on various platforms and compilers +build-clang: + stage: build + image: rigby132/ug4-minimal:latest + timeout: 4 hours variables: - GIT_STRATEGY: none # Do not clone repo again for this job. - stage: deploy - environment: production + CMAKE_C_COMPILER: "gcc" + CMAKE_CXX_COMPILER: "g++" + CXX_FLAGS: "-O3 -fPIC" script: - - echo "Get release artifact and deploy it" \ No newline at end of file + # copy ug4 without overwriting existing files (ugcore) + - cd .. + - cp --update=none -R /opt/ug4/. . + # build ug + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja + - ninja -j8 + - cd .. + # move artifacts to clone dir + - ls -a bin + - mv bin ugcore/bin + artifacts: + when: on_success + expire_in: 1 week + paths: + - bin/* + - bin/plugins/* + #cache: + # policy: pull-push + # unprotect: false + # untracked: false + # when: on_success + # paths: + # - "ug4/build" + # - "ughub" From 15c1b46ccc78b121f8eddca4881f65625214395f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 14:21:45 +0000 Subject: [PATCH 51/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b38594f8e..4450bc025 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,8 @@ default: tags: - docker + before_script: + - docker info variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore @@ -20,7 +22,6 @@ do-test: CMAKE_CXX_COMPILER: "g++" #CXX_FLAGS: "-O0 -coverage -fPIC" script: - - docker version # copy ug4 without overwriting existing files (ugcore) - cd .. - cp --update=none -R /opt/ug4/. . From 5a7d3f2a25a746d5998daa530cad575f0ad181ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:04:13 +0000 Subject: [PATCH 52/87] Login into gitlab docker registry. --- .gitlab-ci.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4450bc025..97507b368 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ default: - docker before_script: - docker info + - docker login registry.gitlab.com variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore @@ -49,15 +50,7 @@ do-test: when: always expire_in: 1 week paths: - - report.xml - - test.log - reports: - junit: report.xml - #coverage_report: - # coverage_format: cobertura - # path: coverage_reports/${CI_COMMIT_SHORT_SHA}.xml - #cache: - # policy: pull-push +ADD ug4 /opt/ug4 # unprotect: false # untracked: false # when: on_success From db60279d4f8cbd530fb20c4c39e7dbc861f299bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:05:04 +0000 Subject: [PATCH 53/87] Remove random paste. --- .gitlab-ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97507b368..7d292a452 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,7 +50,15 @@ do-test: when: always expire_in: 1 week paths: -ADD ug4 /opt/ug4 + - report.xml + - test.log + reports: + junit: report.xml + #coverage_report: + # coverage_format: cobertura + # path: coverage_reports/${CI_COMMIT_SHORT_SHA}.xml + #cache: + # policy: pull-push # unprotect: false # untracked: false # when: on_success From 5b4c114845bbaa348057d57691aeb18c4a93a842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:20:36 +0000 Subject: [PATCH 54/87] Use CI vars to log into registry. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d292a452..786992e41 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ default: - docker before_script: - docker info - - docker login registry.gitlab.com + - echo "$CI_DEPLOY_PASSWORD" | docker login $CI_REGISTRY -u $CI_DEPLOY_USER --password-stdin variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore From 9cb544de3640dcd619d4e2db922e3fa40b32c9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:28:13 +0000 Subject: [PATCH 55/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 786992e41..00ac485cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ default: - docker before_script: - docker info + - echo "$CI_REGISTRY" - echo "$CI_DEPLOY_PASSWORD" | docker login $CI_REGISTRY -u $CI_DEPLOY_USER --password-stdin variables: From dbe0d04fabd50da01a9bc4b7b739200c7a0b015a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:31:42 +0000 Subject: [PATCH 56/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00ac485cc..cc943d880 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ default: before_script: - docker info - echo "$CI_REGISTRY" - - echo "$CI_DEPLOY_PASSWORD" | docker login $CI_REGISTRY -u $CI_DEPLOY_USER --password-stdin + - echo "$CI_DEPLOY_PASSWORD" | docker login $CI_REGISTRY -u "$CI_DEPLOY_USER" --password-stdin variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore From 5f216ad4518251deb4f77e21afce836e87efa0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:34:25 +0000 Subject: [PATCH 57/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc943d880..c66065691 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ default: before_script: - docker info - echo "$CI_REGISTRY" - - echo "$CI_DEPLOY_PASSWORD" | docker login $CI_REGISTRY -u "$CI_DEPLOY_USER" --password-stdin + - echo "$CI_DEPLOY_PASSWORD" | docker login $CI_REGISTRY --username $CI_DEPLOY_USER --password-stdin variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore From ddbdb14d51b18313c9290ee727948faa660dc3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:39:03 +0000 Subject: [PATCH 58/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c66065691..69efcedb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ default: before_script: - docker info - echo "$CI_REGISTRY" - - echo "$CI_DEPLOY_PASSWORD" | docker login $CI_REGISTRY --username $CI_DEPLOY_USER --password-stdin + - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore From 2276133b5fe9ab3c1f686593a41a1da81b4acc14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:56:22 +0000 Subject: [PATCH 59/87] Try building ugcore docker. --- .gitlab-ci.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69efcedb1..d08b69a34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,13 @@ default: tags: - docker - before_script: - - docker info - - echo "$CI_REGISTRY" - - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" stages: - - test + #- test - build # TEST ug4 @@ -77,6 +73,10 @@ build-clang: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O3 -fPIC" + before_script: + - docker info + - echo "$CI_REGISTRY" + - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin script: # copy ug4 without overwriting existing files (ugcore) - cd .. @@ -87,7 +87,13 @@ build-clang: - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja - ninja -j8 - cd .. + # build docker image + - cd .. + - echo -e 'FROM ubuntu:latest\nENV DEBIAN_FRONTEND=noninteractive\nRUN apt-get update && apt-get install -y python3 \nADD ug4 /opt/ug4' > Dockerfile + - docker build -t registry.gitlab.com/ug4-project/ugcore . + - docker push registry.gitlab.com/ug4-project/ugcore # move artifacts to clone dir + - cd ug4 - ls -a bin - mv bin ugcore/bin artifacts: From e38b7168a2de4b225f0940cc640f4bfdc7fcd2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 3 Jul 2024 15:57:57 +0000 Subject: [PATCH 60/87] make testing manual (for now) --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d08b69a34..050523bc8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,12 +7,13 @@ variables: #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" stages: - #- test + - test - build # TEST ug4 do-test: stage: test + when: manual image: rigby132/ug4-test:latest timeout: 4 hours variables: From f303e3fa78a573d5485b2c8a5830fec4b3e4722e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 4 Jul 2024 09:15:14 +0000 Subject: [PATCH 61/87] Run test stage again. --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 050523bc8..646cba77a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,6 @@ stages: # TEST ug4 do-test: stage: test - when: manual image: rigby132/ug4-test:latest timeout: 4 hours variables: From 82fa378803e5f2fcfeebf2c7d07e40782a083013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 4 Jul 2024 09:16:38 +0000 Subject: [PATCH 62/87] Enable single flag for testing. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 646cba77a..7a287a367 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ do-test: variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" - #CXX_FLAGS: "-O0 -coverage -fPIC" + CXX_FLAGS: "-fPIC" script: # copy ug4 without overwriting existing files (ugcore) - cd .. From 1e32e358c0216ea9c75809acb2c31111d1c96ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 29 Aug 2024 12:54:10 +0000 Subject: [PATCH 63/87] Remove flag. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a287a367..29f716352 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ do-test: variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" - CXX_FLAGS: "-fPIC" + #CXX_FLAGS: "-fPIC" script: # copy ug4 without overwriting existing files (ugcore) - cd .. From c4e639d69fa577fff9244c824f7f59ec02bc2a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Thu, 29 Aug 2024 13:55:54 +0000 Subject: [PATCH 64/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29f716352..112fcc96d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,7 +74,7 @@ build-clang: CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O3 -fPIC" before_script: - - docker info + #- docker info - echo "$CI_REGISTRY" - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin script: From 267ce974c5cb8507bd1aa1d78239bcc04614fce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Fri, 30 Aug 2024 08:13:09 +0000 Subject: [PATCH 65/87] Increase timeouts to 16h. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 112fcc96d..f9dbe7ef6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ stages: do-test: stage: test image: rigby132/ug4-test:latest - timeout: 4 hours + timeout: 16 hours variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" @@ -68,7 +68,7 @@ do-test: build-clang: stage: build image: rigby132/ug4-minimal:latest - timeout: 4 hours + timeout: 16 hours variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" From e913bfb73f0986847301f9ab0ec8b6c4f66dedac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 3 Sep 2024 12:16:32 +0000 Subject: [PATCH 66/87] Add linux tag. --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9dbe7ef6..f83f27c9c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ default: tags: - docker + - linux variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore From a5a55a887230b97a4978534d6b034c260afb2bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Wed, 4 Sep 2024 15:17:51 +0000 Subject: [PATCH 67/87] Add dind service and DOCKER_HOST variable. --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f83f27c9c..57a1bc25f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,9 @@ default: - docker - linux +services: + - docker:dind + variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" @@ -71,6 +74,7 @@ build-clang: image: rigby132/ug4-minimal:latest timeout: 16 hours variables: + DOCKER_HOST: "tcp://docker:2375" CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O3 -fPIC" From 9ea475417ec68cad8e21b00381586a198482ac95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 12:22:52 +0000 Subject: [PATCH 68/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57a1bc25f..ac5dc79df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ default: services: - docker:dind + alias docker variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore From bfb219abafe84439b29d5cc99399477b82db3e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 12:26:00 +0000 Subject: [PATCH 69/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac5dc79df..57a1bc25f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,6 @@ default: services: - docker:dind - alias docker variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore From 7057904b4dc1cd24c4cfa81e34c6fd7022b977a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 13:48:01 +0000 Subject: [PATCH 70/87] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57a1bc25f..b65df8e77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,9 +3,6 @@ default: - docker - linux -services: - - docker:dind - variables: GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" @@ -18,7 +15,7 @@ stages: do-test: stage: test image: rigby132/ug4-test:latest - timeout: 16 hours + timeout: 4 hours variables: CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" @@ -72,14 +69,13 @@ do-test: build-clang: stage: build image: rigby132/ug4-minimal:latest - timeout: 16 hours + timeout: 4 hours variables: - DOCKER_HOST: "tcp://docker:2375" CMAKE_C_COMPILER: "gcc" CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O3 -fPIC" before_script: - #- docker info + - docker info - echo "$CI_REGISTRY" - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin script: From d73329caf8afb6908db066ff91ab60cb3557a399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 13:51:11 +0000 Subject: [PATCH 71/87] temp disable test job. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b65df8e77..8ebed2045 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,8 @@ stages: # TEST ug4 do-test: + rules: + - when: never stage: test image: rigby132/ug4-test:latest timeout: 4 hours From 247e6c58bc6744396575c0688e40ed3d0bea546c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 13:59:57 +0000 Subject: [PATCH 72/87] remove docker info command --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ebed2045..3a27678f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,7 +77,7 @@ build-clang: CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O3 -fPIC" before_script: - - docker info + #- docker info - echo "$CI_REGISTRY" - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin script: From ed6a0092df908d1f50c998f874daff36417366cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 14:02:34 +0000 Subject: [PATCH 73/87] disable login temp --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a27678f3..6d95b8ec7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,7 +79,7 @@ build-clang: before_script: #- docker info - echo "$CI_REGISTRY" - - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin + #- echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin script: # copy ug4 without overwriting existing files (ugcore) - cd .. From b97a7d42a7960bed8acba190cc68577521e662dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 14:06:39 +0000 Subject: [PATCH 74/87] Add back removed commands. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d95b8ec7..8ebed2045 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,9 +77,9 @@ build-clang: CMAKE_CXX_COMPILER: "g++" CXX_FLAGS: "-O3 -fPIC" before_script: - #- docker info + - docker info - echo "$CI_REGISTRY" - #- echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin + - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin script: # copy ug4 without overwriting existing files (ugcore) - cd .. From 7b9652a28c55bc5d5775efabebb8dce217889cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20G=C3=BCven?= Date: Tue, 10 Sep 2024 14:08:37 +0000 Subject: [PATCH 75/87] Enable test job again. --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ebed2045..b65df8e77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,8 +13,6 @@ stages: # TEST ug4 do-test: - rules: - - when: never stage: test image: rigby132/ug4-test:latest timeout: 4 hours From a8b96e0a434a056d22931ac34c77266daffa96e4 Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Mon, 25 Nov 2024 15:06:47 +0000 Subject: [PATCH 76/87] Include SAST --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b65df8e77..19986bf8d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -111,3 +111,6 @@ build-clang: # paths: # - "ug4/build" # - "ughub" + + include: + - template: Jobs/SAST.gitlab-ci.yml From 2eda37f3855c28cda76759d42f2eefe7ff2f2488 Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Mon, 25 Nov 2024 15:08:15 +0000 Subject: [PATCH 77/87] Include SAST --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19986bf8d..0f6071dcf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -111,6 +111,6 @@ build-clang: # paths: # - "ug4/build" # - "ughub" - - include: + +include: - template: Jobs/SAST.gitlab-ci.yml From c5e5008abc65a5b463e6c90cdaa48db8cf102bcd Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Mon, 25 Nov 2024 16:18:46 +0000 Subject: [PATCH 78/87] Configure SAST in `.gitlab-ci.yml`, creating this file if it does not already exist --- .gitlab-ci.yml | 150 +++++++++++++++++++++---------------------------- 1 file changed, 63 insertions(+), 87 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f6071dcf..e6f405f26 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,116 +1,92 @@ +# You can override the included template(s) by including variable overrides +# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings +# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization +# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings +# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings +# Note that environment variables can be set in several places +# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence default: tags: - - docker - - linux - + - docker + - linux variables: - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore - #UG_PACKAGES_TO_INSTALL: "ugcore adaptive_mg_tests conv_diff_app d3f_app tests electromagnetism_app unit_tests" - + GIT_CLONE_PATH: "$CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_DIR/$CI_PIPELINE_ID/ug4/ugcore" stages: - - test - - build - -# TEST ug4 +- test +- build do-test: stage: test image: rigby132/ug4-test:latest timeout: 4 hours variables: - CMAKE_C_COMPILER: "gcc" - CMAKE_CXX_COMPILER: "g++" - #CXX_FLAGS: "-fPIC" + CMAKE_C_COMPILER: gcc + CMAKE_CXX_COMPILER: g++ script: - # copy ug4 without overwriting existing files (ugcore) - - cd .. - - cp --update=none -R /opt/ug4/. . - # build ug in debug - - mkdir -p build - - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja - - ninja -j8 - - cd .. - # build testsuite - - cd apps/unit_tests/ - - mkdir -p build - - cd build - - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja - - ninja -j8 - - cd ../../.. - - pwd - - ls -a - - source ugcore/scripts/shell/ugbash - - echo $UG4_ROOT - - ./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml -- --name report - - mv ug_test_numprocs_1.log ugcore/test.log - - mv report.xml ugcore/report.xml + - cd .. + - cp --update=none -R /opt/ug4/. . + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=ON -GNinja + - ninja -j8 + - cd .. + - cd apps/unit_tests/ + - mkdir -p build + - cd build + - cmake .. -DUSE_JSON=OFF -DINTERNAL_BOOST=ON -DDEBUG=ON -GNinja + - ninja -j8 + - cd ../../.. + - pwd + - ls -a + - source ugcore/scripts/shell/ugbash + - echo $UG4_ROOT + - "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml + -- --name report" + - mv ug_test_numprocs_1.log ugcore/test.log + - mv report.xml ugcore/report.xml artifacts: when: always expire_in: 1 week paths: - - report.xml - - test.log + - report.xml + - test.log reports: junit: report.xml - #coverage_report: - # coverage_format: cobertura - # path: coverage_reports/${CI_COMMIT_SHORT_SHA}.xml - #cache: - # policy: pull-push - # unprotect: false - # untracked: false - # when: on_success - # paths: - # - "ug4/build" - # - "ug4/apps/unit_tests/build" - # - "ughub" - -# BUILD sources on various platforms and compilers build-clang: stage: build image: rigby132/ug4-minimal:latest timeout: 4 hours variables: - CMAKE_C_COMPILER: "gcc" - CMAKE_CXX_COMPILER: "g++" + CMAKE_C_COMPILER: gcc + CMAKE_CXX_COMPILER: g++ CXX_FLAGS: "-O3 -fPIC" before_script: - - docker info - - echo "$CI_REGISTRY" - - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin + - docker info + - echo "$CI_REGISTRY" + - echo "$CI_JOB_TOKEN" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin script: - # copy ug4 without overwriting existing files (ugcore) - - cd .. - - cp --update=none -R /opt/ug4/. . - # build ug - - mkdir -p build - - cd build - - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja - - ninja -j8 - - cd .. - # build docker image - - cd .. - - echo -e 'FROM ubuntu:latest\nENV DEBIAN_FRONTEND=noninteractive\nRUN apt-get update && apt-get install -y python3 \nADD ug4 /opt/ug4' > Dockerfile - - docker build -t registry.gitlab.com/ug4-project/ugcore . - - docker push registry.gitlab.com/ug4-project/ugcore - # move artifacts to clone dir - - cd ug4 - - ls -a bin - - mv bin ugcore/bin + - cd .. + - cp --update=none -R /opt/ug4/. . + - mkdir -p build + - cd build + - cmake .. -DENABLE_ALL_PLUGINS=ON -DDEBUG=OFF -GNinja + - ninja -j8 + - cd .. + - cd .. + - echo -e 'FROM ubuntu:latest\nENV DEBIAN_FRONTEND=noninteractive\nRUN apt-get update + && apt-get install -y python3 \nADD ug4 /opt/ug4' > Dockerfile + - docker build -t registry.gitlab.com/ug4-project/ugcore . + - docker push registry.gitlab.com/ug4-project/ugcore + - cd ug4 + - ls -a bin + - mv bin ugcore/bin artifacts: when: on_success expire_in: 1 week paths: - - bin/* - - bin/plugins/* - #cache: - # policy: pull-push - # unprotect: false - # untracked: false - # when: on_success - # paths: - # - "ug4/build" - # - "ughub" - + - bin/* + - bin/plugins/* include: - - template: Jobs/SAST.gitlab-ci.yml +- template: Jobs/SAST.gitlab-ci.yml +- template: Security/SAST.gitlab-ci.yml +sast: + stage: test From b2c7aa28fd4facd74161fb57a22f14a1d93a7578 Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Mon, 25 Nov 2024 22:18:52 +0100 Subject: [PATCH 79/87] Create mirror.yml (from github to gitlab) --- .github/workflows/mirror.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 000000000..c03530702 --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,20 @@ +name: Mirror GitLab Repository + +on: + push: + branches: + - main + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Push to GitLab + run: | + git remote add gitlab git@gitlab.com:ug4-project/ugcore.git + git push --mirror gitlab + env: + SSH_PRIVATE_KEY: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }} From 5c8be16f47c364b2e3923a98f0d977436e683e1e Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Mon, 25 Nov 2024 22:20:09 +0100 Subject: [PATCH 80/87] Update mirror.yml --- .github/workflows/mirror.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index c03530702..e1b46580b 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -3,7 +3,7 @@ name: Mirror GitLab Repository on: push: branches: - - main + - master jobs: mirror: From ff54a8b147feb47595a58f5754dcca7303089460 Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Mon, 25 Nov 2024 22:44:38 +0100 Subject: [PATCH 81/87] Rename mirror.yml to mirror.yml.bak --- .github/workflows/{mirror.yml => mirror.yml.bak} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{mirror.yml => mirror.yml.bak} (100%) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml.bak similarity index 100% rename from .github/workflows/mirror.yml rename to .github/workflows/mirror.yml.bak From ed567ec06994ce58681440c0a3fb4f4c77eeb750 Mon Sep 17 00:00:00 2001 From: ug4-bot Date: Tue, 26 Nov 2024 09:20:22 +0100 Subject: [PATCH 82/87] Create mirror-main --- .gitlab/mirror-main | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitlab/mirror-main diff --git a/.gitlab/mirror-main b/.gitlab/mirror-main new file mode 100644 index 000000000..1cfc42a68 --- /dev/null +++ b/.gitlab/mirror-main @@ -0,0 +1,17 @@ +stages: + - sync + +sync_to_github: + stage: sync + image: alpine:latest + before_script: + - apk add --no-cache git + - git config --global user.name "UG4_BOT" + - git config --global user.email "ug4-bot@ug4.uni-frankfurt.de" + script: + - git clone --mirror https://oauth2:${CI_JOB_TOKEN}@gitlab.com/ug4-project/ugcore.git repo + - cd repo + - git remote add github https://${GITHUB_UG4BOT_NAME}:${GITHUB_UG4BOT_TOKEN}@github.com/UG4/ugcore.git + - git push --mirror github + only: + - main # Trigger on pushes to the main branch only From fd405009c3407daa5ec9081c160e513faedef3f4 Mon Sep 17 00:00:00 2001 From: ug4-bot Date: Tue, 26 Nov 2024 09:24:19 +0100 Subject: [PATCH 83/87] Update .gitlab-ci.yml: include mirror-main --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6f405f26..639444cb2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,8 @@ variables: stages: - test - build +- sync + do-test: stage: test image: rigby132/ug4-test:latest @@ -51,6 +53,7 @@ do-test: - test.log reports: junit: report.xml + build-clang: stage: build image: rigby132/ug4-minimal:latest @@ -85,8 +88,11 @@ build-clang: paths: - bin/* - bin/plugins/* + include: - template: Jobs/SAST.gitlab-ci.yml - template: Security/SAST.gitlab-ci.yml +- local: '/.gitlab/mirror-main.yml' + sast: stage: test From 87432c2697dada74be82605d9809bcd170407550 Mon Sep 17 00:00:00 2001 From: ug4-bot Date: Tue, 26 Nov 2024 09:25:24 +0100 Subject: [PATCH 84/87] Rename mirror-main to mirror-main.yml --- .gitlab/{mirror-main => mirror-main.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .gitlab/{mirror-main => mirror-main.yml} (100%) diff --git a/.gitlab/mirror-main b/.gitlab/mirror-main.yml similarity index 100% rename from .gitlab/mirror-main rename to .gitlab/mirror-main.yml From b877e0213bce0ae4a75a93e80922739b1272cde4 Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Tue, 26 Nov 2024 16:33:57 +0100 Subject: [PATCH 85/87] Removing "--" --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 639444cb2..7aaddf2a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,8 +41,7 @@ do-test: - ls -a - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - - "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml - -- --name report" + - "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml --name report" - mv ug_test_numprocs_1.log ugcore/test.log - mv report.xml ugcore/report.xml artifacts: From dd271ab2b556cdd97eaf7324e26a0272f2d15c29 Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Tue, 26 Nov 2024 16:34:50 +0100 Subject: [PATCH 86/87] Adding cat --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7aaddf2a5..3041a90bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,9 @@ do-test: - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml --name report" + - cat ug_test_numprocs_1.log - mv ug_test_numprocs_1.log ugcore/test.log + - cat report.xml - mv report.xml ugcore/report.xml artifacts: when: always From 04584ad3f7ce13edf17b63a411739bc57554641f Mon Sep 17 00:00:00 2001 From: Arne Naegel Date: Thu, 28 Nov 2024 22:38:57 +0100 Subject: [PATCH 87/87] Undo removal --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3041a90bf..d5737ab72 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,7 +41,7 @@ do-test: - ls -a - source ugcore/scripts/shell/ugbash - echo $UG4_ROOT - - "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml --name report" + - "./bin/testsuite --build-info=yes --log_level=all --log_format=JUNIT --log_sink=report.xml -- --name report" - cat ug_test_numprocs_1.log - mv ug_test_numprocs_1.log ugcore/test.log - cat report.xml