From 62cc3eda71346e22e836224cc795b0f7ecbccaae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Thu, 15 Jul 2021 15:41:54 +0200 Subject: [PATCH 01/43] #377: - first try with CI --- .github/workflows/tribits_testing.yml | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/tribits_testing.yml diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml new file mode 100644 index 000000000..b32758892 --- /dev/null +++ b/.github/workflows/tribits_testing.yml @@ -0,0 +1,43 @@ +name: TriBITS Testing + +# Controls when the action will run. +# Triggers the workflow on push or pull request +# for the master and develop branch +on: + push: + branches: [ 377-provide-feedback-on-TriBITS-package-dependencies-data-structures-CI ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + matrix: + config: + - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8" } + - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8" } + + runs-on: ${{ matrix.config.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Update OS and install packages + run: | + sudo apt-get update -y && sudo apt-get upgrade -y + wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh + sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/ + sudo apt-get -y install valgrind + sudo apt-get -y install ninja-build + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.config.python }} + - name: Run script + run: | + cd .. + mkdir tribits-build + cd tribits-build + which cmake + cmake --version + ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake From 42c175a086c6474744a082bc1b639ad055c24f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Thu, 15 Jul 2021 16:12:26 +0200 Subject: [PATCH 02/43] #377: - added no fortran option --- .github/workflows/tribits_testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index b32758892..bcbf79166 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -16,6 +16,8 @@ jobs: config: - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8" } - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8" } + - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, python: "3.8" } + - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, python: "3.8" } runs-on: ${{ matrix.config.os }} From ad5691100845f1ba57bbb824118591c7096f6b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Thu, 15 Jul 2021 16:34:05 +0200 Subject: [PATCH 03/43] #377: - run job only when push on master branch --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index bcbf79166..c85530b2e 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -5,7 +5,7 @@ name: TriBITS Testing # for the master and develop branch on: push: - branches: [ 377-provide-feedback-on-TriBITS-package-dependencies-data-structures-CI ] + branches: [ master ] pull_request: branches: [ master ] From 2c1af5195be09c76611e8ce20ac998e9ba0e8cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 08:23:21 +0200 Subject: [PATCH 04/43] #377: - attempt to try different variants --- .github/workflows/tribits_testing.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index c85530b2e..2d5cb850c 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -14,10 +14,10 @@ jobs: strategy: matrix: config: - - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8" } - - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8" } - - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, python: "3.8" } - - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, python: "3.8" } + - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0" } + - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8", cmake: "3.21.0" } + - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8", cmake: "3.17.0" } + - { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, python: "3.8", cmake: "3.17.0" } runs-on: ${{ matrix.config.os }} @@ -27,7 +27,7 @@ jobs: - name: Update OS and install packages run: | sudo apt-get update -y && sudo apt-get upgrade -y - wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh + wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ matrix.config.cmake }}/cmake-${{ matrix.config.cmake }}-Linux-x86_64.sh sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/ sudo apt-get -y install valgrind sudo apt-get -y install ninja-build From 15959a7243f99c8518ed96115ceaf9cbd996d6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 08:52:45 +0200 Subject: [PATCH 05/43] #377: - added version checking --- .github/workflows/tribits_testing.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 2d5cb850c..bb61e9b2a 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -5,7 +5,7 @@ name: TriBITS Testing # for the master and develop branch on: push: - branches: [ master ] + branches: [ 377-provide-feedback-on-TriBITS-package-dependencies-data-structures-CI ] pull_request: branches: [ master ] @@ -35,11 +35,23 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.config.python }} + - name: Version checks + run: | + echo "Checking Cmake path and version" + which cmake + cmake --version + echo "Checking gcc path and version" + which gcc + gcc --version + echo "Checking g++ path and version" + which g++ + g++ --version + echo "Checking gfortran path and version" + which gfortran + gfortran --version - name: Run script run: | cd .. mkdir tribits-build cd tribits-build - which cmake - cmake --version ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake From dabbcf85ed17739c267326a63f01256f7472de27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 09:32:41 +0200 Subject: [PATCH 06/43] #377: - try to get specific versions --- .github/workflows/tribits_testing.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index bb61e9b2a..b1123598d 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -5,7 +5,7 @@ name: TriBITS Testing # for the master and develop branch on: push: - branches: [ 377-provide-feedback-on-TriBITS-package-dependencies-data-structures-CI ] + branches: [ master ] pull_request: branches: [ master ] @@ -27,6 +27,8 @@ jobs: - name: Update OS and install packages run: | sudo apt-get update -y && sudo apt-get upgrade -y + sudo apt-get remove gcc g++ gfortran -y + sudo apt-get install -y ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }} wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ matrix.config.cmake }}/cmake-${{ matrix.config.cmake }}-Linux-x86_64.sh sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/ sudo apt-get -y install valgrind From 3fabb9128acdd55a17b2ecad3c1ec32a14c61d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 09:45:58 +0200 Subject: [PATCH 07/43] #377: - separate removing and installation --- .github/workflows/tribits_testing.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index b1123598d..17e32da64 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -24,10 +24,15 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Update OS and install packages + - name: Update OS run: | sudo apt-get update -y && sudo apt-get upgrade -y + - name: Remove packages + run: | sudo apt-get remove gcc g++ gfortran -y + sudo apt-get update -y + - name: Install packages + run: | sudo apt-get install -y ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }} wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ matrix.config.cmake }}/cmake-${{ matrix.config.cmake }}-Linux-x86_64.sh sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/ From 3d15fefb09be0dcada6a04ea29a43173bfbd2c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 09:56:58 +0200 Subject: [PATCH 08/43] #377: - checks for testing purposes --- .github/workflows/tribits_testing.yml | 29 +++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 17e32da64..4f4eb34ac 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -24,6 +24,23 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Check fot testing purposes + run: | + echo "Checking gcc path and version" + gcc-8 --version + gcc-9 --version + gcc-10 --version + gcc-11 --version + echo "Checking g++ path and version" + g++-8 --version + g++-9 --version + g++-10 --version + g++-11 --version + echo "Checking gfortran path and version" + gfortran-8 --version + gfortran-9 --version + gfortran-10 --version + gfortran-11 --version - name: Update OS run: | sudo apt-get update -y && sudo apt-get upgrade -y @@ -48,14 +65,14 @@ jobs: which cmake cmake --version echo "Checking gcc path and version" - which gcc - gcc --version + which ${{ matrix.config.cc }} + ${{ matrix.config.cc }} --version echo "Checking g++ path and version" - which g++ - g++ --version + which ${{ matrix.config.cxx }} + ${{ matrix.config.cxx }} --version echo "Checking gfortran path and version" - which gfortran - gfortran --version + which ${{ matrix.config.fc }} + ${{ matrix.config.fc }} --version - name: Run script run: | cd .. From 02da36a39ba1e95e83ec611a5fe6f2af8654153f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 09:59:39 +0200 Subject: [PATCH 09/43] #377: - removed checks --- .github/workflows/tribits_testing.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 4f4eb34ac..a052c89e5 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -24,26 +24,9 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Check fot testing purposes - run: | - echo "Checking gcc path and version" - gcc-8 --version - gcc-9 --version - gcc-10 --version - gcc-11 --version - echo "Checking g++ path and version" - g++-8 --version - g++-9 --version - g++-10 --version - g++-11 --version - echo "Checking gfortran path and version" - gfortran-8 --version - gfortran-9 --version - gfortran-10 --version - gfortran-11 --version - name: Update OS run: | - sudo apt-get update -y && sudo apt-get upgrade -y + sudo apt-get update -y - name: Remove packages run: | sudo apt-get remove gcc g++ gfortran -y From 6af8a6a9088d4eb2199b33a22c5125a7b3f3bc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 11:05:01 +0200 Subject: [PATCH 10/43] #377: - created aliases --- .github/workflows/tribits_testing.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index a052c89e5..a6b949960 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -42,20 +42,26 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.config.python }} + - name: Prepare compiler aliases + run: | + echo "Creating gcc alias" + alias gcc=${{ matrix.config.cc }} + echo "Creating g++ alias" + alias g++=${{ matrix.config.cxx }} + echo "Creating gfortran alias" + alias gfortran=${{ matrix.config.fc }} - name: Version checks run: | echo "Checking Cmake path and version" which cmake cmake --version echo "Checking gcc path and version" - which ${{ matrix.config.cc }} - ${{ matrix.config.cc }} --version + which gcc + gcc --version echo "Checking g++ path and version" - which ${{ matrix.config.cxx }} - ${{ matrix.config.cxx }} --version - echo "Checking gfortran path and version" - which ${{ matrix.config.fc }} - ${{ matrix.config.fc }} --version + which g++ + g++ --version + if [ ${{ matrix.config.fc }} == "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which gfortran && gfortran --version; fi - name: Run script run: | cd .. From 135b19a7603ba60e8ae97d45c0f87ad294622b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 11:39:22 +0200 Subject: [PATCH 11/43] #377: - check if aliases work --- .github/workflows/tribits_testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index a6b949960..ce534a238 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -46,6 +46,8 @@ jobs: run: | echo "Creating gcc alias" alias gcc=${{ matrix.config.cc }} + which gcc + gcc --version echo "Creating g++ alias" alias g++=${{ matrix.config.cxx }} echo "Creating gfortran alias" From 06ba32bedd4123e76677c301259e126ed8c7069b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 12:45:21 +0200 Subject: [PATCH 12/43] #377: - trying other way --- .github/workflows/tribits_testing.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index ce534a238..2a549185b 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -42,31 +42,21 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.config.python }} - - name: Prepare compiler aliases - run: | - echo "Creating gcc alias" - alias gcc=${{ matrix.config.cc }} - which gcc - gcc --version - echo "Creating g++ alias" - alias g++=${{ matrix.config.cxx }} - echo "Creating gfortran alias" - alias gfortran=${{ matrix.config.fc }} - name: Version checks run: | echo "Checking Cmake path and version" which cmake cmake --version echo "Checking gcc path and version" - which gcc - gcc --version + which ${{ matrix.config.cc }} + ${{ matrix.config.cc }} --version echo "Checking g++ path and version" - which g++ - g++ --version + which ${{ matrix.config.cxx }} + ${{ matrix.config.cxx }} --version if [ ${{ matrix.config.fc }} == "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which gfortran && gfortran --version; fi - name: Run script run: | cd .. mkdir tribits-build cd tribits-build - ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake + ctest -D CMAKE_C_COMPILER=${{ matrix.config.cc }} -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -D CMAKE_FC_COMPILER=${{ matrix.config.fc }} -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake From 6a51fe744c5b72781ea8d97d1f49b6a65ad7e749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 12:52:28 +0200 Subject: [PATCH 13/43] #377: - fixed if --- .github/workflows/tribits_testing.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 2a549185b..99210a613 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -31,11 +31,13 @@ jobs: run: | sudo apt-get remove gcc g++ gfortran -y sudo apt-get update -y - - name: Install packages + - name: Install CMake run: | - sudo apt-get install -y ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }} wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ matrix.config.cmake }}/cmake-${{ matrix.config.cmake }}-Linux-x86_64.sh sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/ + - name: Install packages + run: | + sudo apt-get install -y ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }} sudo apt-get -y install valgrind sudo apt-get -y install ninja-build - name: Set up Python @@ -53,7 +55,7 @@ jobs: echo "Checking g++ path and version" which ${{ matrix.config.cxx }} ${{ matrix.config.cxx }} --version - if [ ${{ matrix.config.fc }} == "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which gfortran && gfortran --version; fi + if [ ${{ matrix.config.fc }} = "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which gfortran && gfortran --version; fi - name: Run script run: | cd .. From adf2d2a35d815aa51f58c65a35bf9dff24482d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 13:25:32 +0200 Subject: [PATCH 14/43] #377: - fixed if --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 99210a613..aa46ca0d9 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -55,7 +55,7 @@ jobs: echo "Checking g++ path and version" which ${{ matrix.config.cxx }} ${{ matrix.config.cxx }} --version - if [ ${{ matrix.config.fc }} = "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which gfortran && gfortran --version; fi + if [ ${{ matrix.config.fc }} = "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which ${{ matrix.config.fc }} && ${{ matrix.config.fc }} --version; fi - name: Run script run: | cd .. From 7acbfbd144defec5e36af91bc90a1e5aa67bff5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 13:32:56 +0200 Subject: [PATCH 15/43] #377: - check for aliases --- .github/workflows/tribits_testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index aa46ca0d9..a5b752357 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -46,6 +46,7 @@ jobs: python-version: ${{ matrix.config.python }} - name: Version checks run: | + which gcc echo "Checking Cmake path and version" which cmake cmake --version From 127601f4441f3b118ca81956e45b1b0c5ad8065f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 14:09:49 +0200 Subject: [PATCH 16/43] #377: - try alternatives --- .github/workflows/tribits_testing.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index a5b752357..927b226c2 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -37,7 +37,13 @@ jobs: sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/ - name: Install packages run: | + sudo update-alternatives --remove-all gcc + sudo update-alternatives --remove-all g++ + sudo update-alternatives --remove-all gfortran sudo apt-get install -y ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }} + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/${{ matrix.config.cc }} 10 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${{ matrix.config.cxx }} 10 + sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/${{ matrix.config.fc }} 10 sudo apt-get -y install valgrind sudo apt-get -y install ninja-build - name: Set up Python @@ -46,7 +52,6 @@ jobs: python-version: ${{ matrix.config.python }} - name: Version checks run: | - which gcc echo "Checking Cmake path and version" which cmake cmake --version From 9a62a043acb48f2c8d4f5d648a0885f96cc11b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 14:15:15 +0200 Subject: [PATCH 17/43] #377: - try alternatives --- .github/workflows/tribits_testing.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 927b226c2..c65407848 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -27,10 +27,6 @@ jobs: - name: Update OS run: | sudo apt-get update -y - - name: Remove packages - run: | - sudo apt-get remove gcc g++ gfortran -y - sudo apt-get update -y - name: Install CMake run: | wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ matrix.config.cmake }}/cmake-${{ matrix.config.cmake }}-Linux-x86_64.sh @@ -44,6 +40,12 @@ jobs: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/${{ matrix.config.cc }} 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${{ matrix.config.cxx }} 10 sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/${{ matrix.config.fc }} 10 + sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 20 + sudo update-alternatives --set cc /usr/bin/gcc + sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 20 + sudo update-alternatives --set c++ /usr/bin/g++ + sudo update-alternatives --install /usr/bin/fortrann fortrann /usr/bin/gfortran 20 + sudo update-alternatives --set fortrann /usr/bin/gfortran sudo apt-get -y install valgrind sudo apt-get -y install ninja-build - name: Set up Python From 3e0b5bbc0615759006aee1e8d787950148a1e53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 14:16:17 +0200 Subject: [PATCH 18/43] #377: - try alternatives --- .github/workflows/tribits_testing.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index c65407848..496be7f5e 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -33,9 +33,6 @@ jobs: sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local/ - name: Install packages run: | - sudo update-alternatives --remove-all gcc - sudo update-alternatives --remove-all g++ - sudo update-alternatives --remove-all gfortran sudo apt-get install -y ${{ matrix.config.cc }} ${{ matrix.config.cxx }} ${{ matrix.config.fc }} sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/${{ matrix.config.cc }} 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${{ matrix.config.cxx }} 10 From fd4040f932a5795ba157c804ec435a2d16c5c16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 14:24:30 +0200 Subject: [PATCH 19/43] #377: - fix memory problem - fix if --- .github/workflows/tribits_testing.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 496be7f5e..fd5a3ee4a 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -12,6 +12,7 @@ on: jobs: build: strategy: + max-parallel: 1 matrix: config: - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0" } @@ -60,7 +61,7 @@ jobs: echo "Checking g++ path and version" which ${{ matrix.config.cxx }} ${{ matrix.config.cxx }} --version - if [ ${{ matrix.config.fc }} = "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which ${{ matrix.config.fc }} && ${{ matrix.config.fc }} --version; fi + if [ "${{ matrix.config.fc }}" = "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which ${{ matrix.config.fc }} && ${{ matrix.config.fc }} --version; fi - name: Run script run: | cd .. From 2a6bd9cca8378a4adf7814bf8467cb1fd3048762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 14:52:10 +0200 Subject: [PATCH 20/43] #377: - removed unnecessary options --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index fd5a3ee4a..c5d4cc9c9 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -67,4 +67,4 @@ jobs: cd .. mkdir tribits-build cd tribits-build - ctest -D CMAKE_C_COMPILER=${{ matrix.config.cc }} -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -D CMAKE_FC_COMPILER=${{ matrix.config.fc }} -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake + ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake From fdaf159c6cfae40dd6720801b07c17aa7cf14206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3bel?= Date: Fri, 16 Jul 2021 15:19:36 +0200 Subject: [PATCH 21/43] #377: - changing order of the tests --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index c5d4cc9c9..f2c48ac70 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -16,9 +16,9 @@ jobs: matrix: config: - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0" } - - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8", cmake: "3.21.0" } - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8", cmake: "3.17.0" } - { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, python: "3.8", cmake: "3.17.0" } + - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8", cmake: "3.21.0" } runs-on: ${{ matrix.config.os }} From 9429c5399374f9e5b3a3599406d8527357d739a9 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Fri, 16 Jul 2021 10:11:21 -0400 Subject: [PATCH 22/43] Add 'generator' option (not used yet) --- .github/workflows/tribits_testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index f2c48ac70..08c760e11 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -15,10 +15,10 @@ jobs: max-parallel: 1 matrix: config: - - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0" } - - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8", cmake: "3.17.0" } - - { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, python: "3.8", cmake: "3.17.0" } - - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8", cmake: "3.21.0" } + - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0", generator: "makefiles" } + - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8", cmake: "3.17.0", generator: "makefiles" } + - { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, python: "3.8", cmake: "3.17.0", generator: "ninja" } # No Fortran + - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8", cmake: "3.21.0", generator: "ninja" } runs-on: ${{ matrix.config.os }} From 895d4690e8d3c1ca6f6350542ab930747ff3eb55 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Fri, 16 Jul 2021 12:02:05 -0400 Subject: [PATCH 23/43] Disable submits to CDash So we can debug some without spamming CDash --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 08c760e11..569a2275b 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -67,4 +67,4 @@ jobs: cd .. mkdir tribits-build cd tribits-build - ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake + env CTEST_DO_SUBMIT=OFF ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake From 2aa9ffb282619ef0412bb480c72cabafb997913d Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 14:57:26 -0600 Subject: [PATCH 24/43] Add GitHub Actions-specific driver (#363) But any non-trivial logic in a script, we can develop and test it locally. This is a win-win-win over putting all of this logic in the GitHub Action YAML file. --- .../ctest_github_actions_serial_debug.cmake | 41 +++++ .../run_github_actions_ctest_driver.sh | 150 ++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake create mode 100755 cmake/ctest/github_actions/run_github_actions_ctest_driver.sh diff --git a/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake b/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake new file mode 100644 index 000000000..5bd5f43da --- /dev/null +++ b/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake @@ -0,0 +1,41 @@ +include("${CMAKE_CURRENT_LIST_DIR}/../TribitsProjCTestDriver.cmake") + +set(CTEST_BUILD_NAME $ENV{CTEST_BUILD_NAME}) + +set(CTEST_TEST_TIMEOUT 60) +set(CTEST_DO_UPDATES OFF) +set_default_and_from_env(CTEST_BUILD_FLAGS "-j2") +set_default_and_from_env(CTEST_PARALLEL_LEVEL "2") + +if (CTEST_BUILD_NAME MATCHES ".*_nofortran") + set(fortranCompilerStr "") + set(enableFortranStr "-DTriBITS_ENABLE_Fortran=OFF") +else() + set(fortranCompilerStr "-DCMAKE_Fortran_COMPILER=gfortran") + set(enableFortranStr "-DTriBITS_ENABLE_Fortran=ON") +endif() + +set( EXTRA_CONFIGURE_OPTIONS + "-DBUILD_SHARED_LIBS:BOOL=ON" + "-DCMAKE_BUILD_TYPE=DEBUG" + "-DCMAKE_C_COMPILER=gcc" + "-DCMAKE_CXX_COMPILER=g++" + "${fortranCompilerStr}" + "${enableFortranStr}" + "-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE" + "-DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE" + "-DTriBITS_ENABLE_DOC_GENERATION_TESTS=ON" + "-DTriBITS_ENABLE_REAL_GIT_CLONE_TESTS=TRUE" + "-DTriBITS_TRACE_ADD_TEST=ON" + "-DTriBITS_SHOW_TEST_START_END_DATE_TIME=ON" + ) + +if ("$ENV{CTEST_TEST_TYPE}" STREQUAL "") + set(CTEST_TEST_TYPE Experimental) +endif() + +# +# Run the CTest driver and submit to CDash +# + +tribits_proj_ctest_driver() diff --git a/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh b/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh new file mode 100755 index 000000000..89279a808 --- /dev/null +++ b/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh @@ -0,0 +1,150 @@ +#!/bin/bash -e + +# +# Run local configure/build/test and submit to CDash with +# tribits_ctest_driver(). +# +# Usage: +# +# $ cd / +# +# /run_github_actions_ctest_driver.sh \ +# --os --cmake-ver \ +# --generator ninja|makefiles \ +# --python-ver \ +# --cxx-comiler-and-ver \ +# [ --fortran-compiler-and-ver ] +# +# This is called by the GitHub Actions script: +# +# TriBITS/.github/workflows/tribits_testing.yml +# +# but can also be run locally to develop on and debug. +# +# NOTE: This will create the subdir 'tribits-build' under $PWD if that +# directory does not already exist. But it will not delete an existing +# directly 'tribits-build' if it already exists (but that is usually fine to +# do rebulids). +# +# NOTE: One can control various behaviors and other options as documented with +# tribits_ctest_driver() including not submitting to CDash to do testing +# output spamming CDash by running with: +# +# env CTEST_DO_SUBMIT=OFF /run_github_actions_ctest_driver.sh [options] +# + +# Get locaiton of TriBITS +if [ "$TRIBITS_BASE_DIR" == "" ] ; then + _ABS_FILE_PATH=`readlink -f $0` + _BASE_DIR=`dirname $_ABS_FILE_PATH` + TRIBITS_BASE_DIR=`realpath $_BASE_DIR/../../..` +fi + + +# +# Functions +# + + +function assert_required_option { + arg_name=$1 + arg_value=$2 + #echo "${arg_name} ${arg_value}" + if [[ "${arg_value}" == "" ]] ; then + echo "Error, argument ${arg_name} can not be empty!" + exit 1 + fi +} + + +# +# A) Parse and assert command-line arguments +# + +os= +cmake_ver= +cmake_generator= +python_ver= +cxx_compiler_and_ver= +fortran_compiler_and_ver= + +while (( "$#" )); do + case "$1" in + --os) + os=$2 + shift 2 + ;; + --cmake-ver) + cmake_ver=$2 + shift 2 + ;; + --generator) + cmake_generator=$2 + shift 2 + ;; + --python-ver) + python_ver=$2 + shift 2 + ;; + --cxx-compiler-and-ver) + cxx_compiler_and_ver=$2 + shift 2 + ;; + --fortran-compiler-and-ver) + fortran_compiler_and_ver=$2 + shift 2 + ;; + *) + echo "Error: The argument '$1' is not supported!" + exit 1 + ;; + esac +done + +assert_required_option --os ${os} +assert_required_option --cmake-ver "${cmake_ver}" +assert_required_option --generator "${cmake_generator}" +assert_required_option --python-ver "${python_ver}" +assert_required_option --cxx-compiler-and-ver "${cxx_compiler_and_ver}" +# NOTE: Fortran is not required! + +# +# B) Set up options for running build +# + +# CTEST_SITE +export CTEST_SITE=${os} + +# CTEST_BUILD_NAME +CTEST_BUILD_NAME=tribits_cmake-${cmake_ver}_${cmake_generator}_python-${python_ver}_${cxx_compiler_and_ver} +if [[ "${fortran_compiler_and_ver}" == "" ]] ; then + CTEST_BUILD_NAME=${CTEST_BUILD_NAME}_nofortran +fi +export CTEST_BUILD_NAME + +# CTEST_CMAKE_GENERATOR +if [[ "${cmake_generator}" == "ninja" ]] ; then + CTEST_CMAKE_GENERATOR=Ninja +elif [[ "${cmake_generator}" == "makefiles" ]] ; then + CTEST_CMAKE_GENERATOR="Unix Makefiles" +else + echo "Error, --generator ${cmake_generator} is invalid! Only 'makefiles', 'ninja'!" + exit 1 +fi +export CTEST_CMAKE_GENERATOR + +# +# C) Run the local configure, build, test and submit using exported vars above +# + +if [[ -d tribits-build ]] ; then + echo "tribits-build/ already exists so leaving it." +else + echo "tribits-build/ does not exist yet so creating it." + mkdir tribits-build +fi + +cd tribits-build/ + +ctest -V -S \ + ${TRIBITS_BASE_DIR}/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake From 5656f5a588effab2528434b846e7bb62e7c396fe Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 15:24:12 -0600 Subject: [PATCH 25/43] Switch over to use run_github_actions_ctest_driver.sh (#363) This should have the proper site name, build name, use the correct generator, and enable or disable Fortran correctly. --- .github/workflows/tribits_testing.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 569a2275b..b66369273 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -62,9 +62,13 @@ jobs: which ${{ matrix.config.cxx }} ${{ matrix.config.cxx }} --version if [ "${{ matrix.config.fc }}" = "" ]; then echo "No fortran compiler"; else echo "Checking gfortran path and version" && which ${{ matrix.config.fc }} && ${{ matrix.config.fc }} --version; fi - - name: Run script + - name: Run configure, build, test, and submit to CDash run: | cd .. - mkdir tribits-build - cd tribits-build - env CTEST_DO_SUBMIT=OFF ctest -V -S ../TriBITS/cmake/ctest/travisci/ctest_trusty_serial_debug.cmake + ../TriBITS/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh \ + --os ${{ matrix.config.os }} \ + --cmake-ver ${{ matrix.config.cmake }} \ + --generator ${{ matrix.config.generator }} \ + --python-ver ${{ matrix.config.python }} \ + --cxx-comiler-and-ver ${{ matrix.config.cxx }} \ + --fortran-compiler-and-ver ${{ matrix.config.cxx }} From a33fc8a904c868ba0024df271eb33b60fb3b7da7 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 15:31:39 -0600 Subject: [PATCH 26/43] Change max-parallel from 1 to 4 (#363) Why not let the jobs run all at the same time? --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index b66369273..765786ed9 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -12,7 +12,7 @@ on: jobs: build: strategy: - max-parallel: 1 + max-parallel: 4 # Only limit to 1 for debugging? matrix: config: - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0", generator: "makefiles" } From 8619153605a042656df8d532f9848cff961dff66 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 15:37:02 -0600 Subject: [PATCH 27/43] No more hello_world.yml (#363) We have a real GitHub Actions now. --- .github/workflows/hellow_world.yml | 33 ------------------------------ 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/hellow_world.yml diff --git a/.github/workflows/hellow_world.yml b/.github/workflows/hellow_world.yml deleted file mode 100644 index d6783e218..000000000 --- a/.github/workflows/hellow_world.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! - - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. From fd7e45a098d2354742b0fd0c8fa00a3ee62916d8 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 15:41:38 -0600 Subject: [PATCH 28/43] Fix path to run run_github_actions_ctest_driver.sh (#363) The script now creates and cds into 'tribits-build' subdir. --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 765786ed9..c61e7aa8f 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -65,7 +65,7 @@ jobs: - name: Run configure, build, test, and submit to CDash run: | cd .. - ../TriBITS/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh \ + ./TriBITS/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh \ --os ${{ matrix.config.os }} \ --cmake-ver ${{ matrix.config.cmake }} \ --generator ${{ matrix.config.generator }} \ From c76f7084c5ac3a5832fc9196e560719ef0facd31 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 15:46:17 -0600 Subject: [PATCH 29/43] Fix misspelling of 'compiler' (#363) --- .github/workflows/tribits_testing.yml | 2 +- cmake/ctest/github_actions/run_github_actions_ctest_driver.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index c61e7aa8f..a06942980 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -70,5 +70,5 @@ jobs: --cmake-ver ${{ matrix.config.cmake }} \ --generator ${{ matrix.config.generator }} \ --python-ver ${{ matrix.config.python }} \ - --cxx-comiler-and-ver ${{ matrix.config.cxx }} \ + --cxx-compiler-and-ver ${{ matrix.config.cxx }} \ --fortran-compiler-and-ver ${{ matrix.config.cxx }} diff --git a/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh b/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh index 89279a808..ebb099e77 100755 --- a/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh +++ b/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh @@ -12,7 +12,7 @@ # --os --cmake-ver \ # --generator ninja|makefiles \ # --python-ver \ -# --cxx-comiler-and-ver \ +# --cxx-compiler-and-ver \ # [ --fortran-compiler-and-ver ] # # This is called by the GitHub Actions script: From 4f57dc6d1cdee9d3760f82435a1318bd7fdb8b04 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 15:49:04 -0600 Subject: [PATCH 30/43] Property disable set --fortran-compiler-and-ver (#363) --- .github/workflows/tribits_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index a06942980..d6c5b9765 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -71,4 +71,4 @@ jobs: --generator ${{ matrix.config.generator }} \ --python-ver ${{ matrix.config.python }} \ --cxx-compiler-and-ver ${{ matrix.config.cxx }} \ - --fortran-compiler-and-ver ${{ matrix.config.cxx }} + --fortran-compiler-and-ver ${{ matrix.config.fc }} From 8c5fe4ef110860fe7a0e75c24981beec1033de8d Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 15:51:55 -0600 Subject: [PATCH 31/43] Set 'fail-fast' to false (#363) --- .github/workflows/tribits_testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index d6c5b9765..6003e9232 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -13,6 +13,7 @@ jobs: build: strategy: max-parallel: 4 # Only limit to 1 for debugging? + fail-fast: false # Allow each job to run to completion even if other jobs fail first matrix: config: - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0", generator: "makefiles" } From fa559e327f06754c335b28ba2dbdde5d90fdead7 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 16:10:47 -0600 Subject: [PATCH 32/43] Allow --fortran-compiler-and-ver with no val, improve cmndline checking, improve output (#363) Hopefully this will run correctly now for all of the build from the GitHub Actions YAML file. --- .../run_github_actions_ctest_driver.sh | 49 +++++++++++++++---- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh b/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh index ebb099e77..cfdb256d8 100755 --- a/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh +++ b/cmake/ctest/github_actions/run_github_actions_ctest_driver.sh @@ -46,7 +46,16 @@ fi # -function assert_required_option { +function assert_option_has_value { + value=$1 + if [[ ${value:0:1} == "-" ]] ; then + echo "Error, expecting a value, not next option '${value}'" >&2 + exit 1 + fi +} + + +function assert_required_option_set { arg_name=$1 arg_value=$2 #echo "${arg_name} ${arg_value}" @@ -71,49 +80,63 @@ fortran_compiler_and_ver= while (( "$#" )); do case "$1" in --os) + assert_option_has_value $2 os=$2 shift 2 ;; --cmake-ver) + assert_option_has_value $2 cmake_ver=$2 shift 2 ;; --generator) + assert_option_has_value $2 cmake_generator=$2 shift 2 ;; --python-ver) + assert_option_has_value $2 python_ver=$2 shift 2 ;; --cxx-compiler-and-ver) + assert_option_has_value $2 cxx_compiler_and_ver=$2 shift 2 ;; --fortran-compiler-and-ver) - fortran_compiler_and_ver=$2 - shift 2 + if [[ -n "$2" ]] && [[ ${2:0:1} != "-" ]]; then + fortran_compiler_and_ver=$2 + shift 2 + else + shift 1 + fi ;; *) - echo "Error: The argument '$1' is not supported!" + echo "Error: The argument '$1' is not supported!" >&2 exit 1 ;; esac done -assert_required_option --os ${os} -assert_required_option --cmake-ver "${cmake_ver}" -assert_required_option --generator "${cmake_generator}" -assert_required_option --python-ver "${python_ver}" -assert_required_option --cxx-compiler-and-ver "${cxx_compiler_and_ver}" +assert_required_option_set --os ${os} +assert_required_option_set --cmake-ver "${cmake_ver}" +assert_required_option_set --generator "${cmake_generator}" +assert_required_option_set --python-ver "${python_ver}" +assert_required_option_set --cxx-compiler-and-ver "${cxx_compiler_and_ver}" # NOTE: Fortran is not required! # # B) Set up options for running build # +echo +echo "Options to run set in github actions driver:" +echo + # CTEST_SITE export CTEST_SITE=${os} +echo "CTEST_SITE = '${CTEST_SITE}'" # CTEST_BUILD_NAME CTEST_BUILD_NAME=tribits_cmake-${cmake_ver}_${cmake_generator}_python-${python_ver}_${cxx_compiler_and_ver} @@ -121,6 +144,7 @@ if [[ "${fortran_compiler_and_ver}" == "" ]] ; then CTEST_BUILD_NAME=${CTEST_BUILD_NAME}_nofortran fi export CTEST_BUILD_NAME +echo "CTEST_BUILD_NAME = '${CTEST_BUILD_NAME}'" # CTEST_CMAKE_GENERATOR if [[ "${cmake_generator}" == "ninja" ]] ; then @@ -128,15 +152,18 @@ if [[ "${cmake_generator}" == "ninja" ]] ; then elif [[ "${cmake_generator}" == "makefiles" ]] ; then CTEST_CMAKE_GENERATOR="Unix Makefiles" else - echo "Error, --generator ${cmake_generator} is invalid! Only 'makefiles', 'ninja'!" + echo "Error, --generator ${cmake_generator} is invalid! Only 'makefiles', 'ninja'!" >&2 exit 1 fi export CTEST_CMAKE_GENERATOR +echo "CTEST_CMAKE_GENERATOR = '${CTEST_CMAKE_GENERATOR}'" # # C) Run the local configure, build, test and submit using exported vars above # +echo + if [[ -d tribits-build ]] ; then echo "tribits-build/ already exists so leaving it." else @@ -146,5 +173,7 @@ fi cd tribits-build/ +echo + ctest -V -S \ ${TRIBITS_BASE_DIR}/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake From 091a21d55ba5afb2ab6280df01971ebe48c7370c Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 16:15:36 -0600 Subject: [PATCH 33/43] Don't test build of docs for now (#363) We will need to install docutils if we want to test the generation of documentation. --- .../github_actions/ctest_github_actions_serial_debug.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake b/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake index 5bd5f43da..107a166cf 100644 --- a/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake +++ b/cmake/ctest/github_actions/ctest_github_actions_serial_debug.cmake @@ -24,7 +24,7 @@ set( EXTRA_CONFIGURE_OPTIONS "${enableFortranStr}" "-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE" "-DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE" - "-DTriBITS_ENABLE_DOC_GENERATION_TESTS=ON" + #"-DTriBITS_ENABLE_DOC_GENERATION_TESTS=ON" "-DTriBITS_ENABLE_REAL_GIT_CLONE_TESTS=TRUE" "-DTriBITS_TRACE_ADD_TEST=ON" "-DTriBITS_SHOW_TEST_START_END_DATE_TIME=ON" From 70de392c3c966333c5668ce14e40721715b788a5 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 16:32:56 -0600 Subject: [PATCH 34/43] Rearrange options in matrix to match order in CTEST_BUILD_NAME (#363) Makes easier to read. --- .github/workflows/tribits_testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 6003e9232..198896e75 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -16,10 +16,10 @@ jobs: fail-fast: false # Allow each job to run to completion even if other jobs fail first matrix: config: - - { os: ubuntu-latest, cc: gcc-8, cxx: g++-8, fc: gfortran-8, python: "2.7", cmake: "3.17.0", generator: "makefiles" } - - { os: ubuntu-latest, cc: gcc-10, cxx: g++-10, fc: gfortran-10, python: "3.8", cmake: "3.17.0", generator: "makefiles" } - - { os: ubuntu-latest, cc: gcc-11, cxx: g++-11, python: "3.8", cmake: "3.17.0", generator: "ninja" } # No Fortran - - { os: ubuntu-latest, cc: gcc-9, cxx: g++-9, fc: gfortran-9, python: "3.8", cmake: "3.21.0", generator: "ninja" } + - { os: ubuntu-latest, cmake: "3.17.0", generator: "makefiles", python: "2.7", cc: gcc-8, cxx: g++-8, fc: gfortran-8 } + - { os: ubuntu-latest, cmake: "3.17.0", generator: "makefiles", python: "3.8", cc: gcc-10, cxx: g++-10, fc: gfortran-10 } + - { os: ubuntu-latest, cmake: "3.17.0", generator: "ninja", python: "3.8", cc: gcc-11, cxx: g++-11 } + - { os: ubuntu-latest, cmake: "3.21.0", generator: "ninja", python: "3.8", cc: gcc-9, cxx: g++-9, fc: gfortran-9 } runs-on: ${{ matrix.config.os }} From 5ff5d9eccb64191123f1a239dfcfe19bb6da05e9 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 17:59:32 -0600 Subject: [PATCH 35/43] Make all builds use makefiles for now (#363) I suspect that some of the tests are not robust enough to work with Ninja as the outer generator. There are some tests that will use Ninja for the inner configure to make sure that it works. Making the entire TriBITS test suite pass using Ninja as the generator in place of Makefiles would be a lot of work. Or, we could conditionally enable many of the tests that depend Unix Makefile logic. --- .github/workflows/tribits_testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tribits_testing.yml b/.github/workflows/tribits_testing.yml index 198896e75..d8febfd7b 100644 --- a/.github/workflows/tribits_testing.yml +++ b/.github/workflows/tribits_testing.yml @@ -18,8 +18,8 @@ jobs: config: - { os: ubuntu-latest, cmake: "3.17.0", generator: "makefiles", python: "2.7", cc: gcc-8, cxx: g++-8, fc: gfortran-8 } - { os: ubuntu-latest, cmake: "3.17.0", generator: "makefiles", python: "3.8", cc: gcc-10, cxx: g++-10, fc: gfortran-10 } - - { os: ubuntu-latest, cmake: "3.17.0", generator: "ninja", python: "3.8", cc: gcc-11, cxx: g++-11 } - - { os: ubuntu-latest, cmake: "3.21.0", generator: "ninja", python: "3.8", cc: gcc-9, cxx: g++-9, fc: gfortran-9 } + - { os: ubuntu-latest, cmake: "3.17.0", generator: "makefiles", python: "3.8", cc: gcc-11, cxx: g++-11 } + - { os: ubuntu-latest, cmake: "3.21.0", generator: "makefiles", python: "3.8", cc: gcc-9, cxx: g++-9, fc: gfortran-9 } runs-on: ${{ matrix.config.os }} From f72490de84b535f7e82f8fbd49918cdf0d80ee63 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 19:50:41 -0600 Subject: [PATCH 36/43] Set TriBITS_SHOW_TEST_START_END_DATE_TIME=ON (#363) Nice to set just for completeness. Not really related to #363 but I did this while workoing on that. I also moved -DDART_TESTING_TIMEOUT=60 up in the argument list because -DCTEST_PARALLEL_LEVEL=16 these kind of go together. --- dev_testing/crf450/mpi-debug/do-configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev_testing/crf450/mpi-debug/do-configure b/dev_testing/crf450/mpi-debug/do-configure index 0dc9f1897..212fc3c92 100755 --- a/dev_testing/crf450/mpi-debug/do-configure +++ b/dev_testing/crf450/mpi-debug/do-configure @@ -14,6 +14,7 @@ if [ "$TRIBITS_BASE_DIR" == "" ] ; then fi ${TRIBITS_BASE_DIR}/dev_testing/generic/do-configure-mpi-debug \ +-DDART_TESTING_TIMEOUT=60 \ -DCTEST_PARALLEL_LEVEL=16 \ -DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE \ -DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE \ @@ -22,7 +23,7 @@ ${TRIBITS_BASE_DIR}/dev_testing/generic/do-configure-mpi-debug \ -DTribitsExProj_INSTALL_BASE_DIR=/tmp/tribits_install_tests \ -DTribitsExProj_INSTALL_OWNING_GROUP=wg-sems-users-son \ -DTriBITS_ENABLE_REAL_GIT_CLONE_TESTS=ON \ --DDART_TESTING_TIMEOUT=60 \ +-DTriBITS_SHOW_TEST_START_END_DATE_TIME=ON \ "$@" #-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE \ From d2ddbaa67e532758011ec6c47438c957ddac7d02 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 19:11:59 -0600 Subject: [PATCH 37/43] Adjust for MixedLang disable with no Fortran (#363) This is one of the test cases being enabled for the GitHub Actions builds for TriBITS in #363. Just reproducing locally and fixing. --- test/core/ExamplesUnitTests/CMakeLists.txt | 18 ++++++++++++++++-- .../TribitsExampleProject/CMakeLists.txt | 12 ++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/test/core/ExamplesUnitTests/CMakeLists.txt b/test/core/ExamplesUnitTests/CMakeLists.txt index 2c133c186..a00932183 100644 --- a/test/core/ExamplesUnitTests/CMakeLists.txt +++ b/test/core/ExamplesUnitTests/CMakeLists.txt @@ -1600,6 +1600,13 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() +if ( ${PROJECT_NAME}_ENABLE_Fortran ) + set(mixedLangHeaderRegex + "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* MixedLang.hpp") +else() + set(mixedLangHeaderRegex "") +endif() + tribits_add_advanced_test( TribitsExampleProject_install_perms OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 @@ -1678,7 +1685,7 @@ tribits_add_advanced_test( TribitsExampleProject_install_perms install_base/install/bin install_base/install/share/WithSubpackagesB/stuff PASS_REGULAR_EXPRESSION_ALL - "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* MixedLang.hpp" + "${mixedLangHeaderRegex}" "[d]rwxrwxr-x.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* wsp_c" "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* C.hpp" "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* Makefile.export.WithSubpackagesC" @@ -1714,6 +1721,13 @@ tribits_add_advanced_test( TribitsExampleProject_install_perms # install(DIRECTORY ... USE_SOURCE_PERMISSIONS) will actually have the # correct group and other permissions set. +if ( ${PROJECT_NAME}_ENABLE_Fortran ) + set(mixedLangHeaderRegex + "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* MixedLang.hpp") + +else() + set(mixedLangHeaderRegex "") +endif() tribits_add_advanced_test( TribitsExampleProject_install_package_by_package_perms OVERALL_WORKING_DIRECTORY TEST_NAME @@ -1806,7 +1820,7 @@ tribits_add_advanced_test( TribitsExampleProject_install_package_by_package_perm install_base/subdir/install/bin install_base/subdir/install/share/WithSubpackagesB/stuff PASS_REGULAR_EXPRESSION_ALL - "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* MixedLang.hpp" + "${mixedLangHeaderRegex}" "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* B.hpp" "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* Makefile.export.WithSubpackagesB" "[-]rw-rw-r--.* .* ${TribitsExProj_INSTALL_OWNING_USER} *${TribitsExProj_INSTALL_OWNING_GROUP} .* libpws_b.a" diff --git a/test/ctest_driver/TribitsExampleProject/CMakeLists.txt b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt index 5d50588f3..a7d842f8e 100644 --- a/test/ctest_driver/TribitsExampleProject/CMakeLists.txt +++ b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt @@ -668,6 +668,14 @@ tribits_add_advanced_test( CTestDriver_PBP_Dashboard_ST_ALL_PASS # Follow-on tests will not check so much output. +if ( ${PROJECT_NAME}_ENABLE_Fortran ) + set(TribitsExProj_PACKAGES_list + "SimpleCxx[;]MixedLang[;]WithSubpackagesA[;]WithSubpackages") +else() + set(TribitsExProj_PACKAGES_list + "SimpleCxx[;]WithSubpackagesA[;]WithSubpackages") +endif() + tribits_add_advanced_test( CTestDriver_AAO_Dashboard_ForwardArgs OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 @@ -712,7 +720,7 @@ tribits_add_advanced_test( CTestDriver_AAO_Dashboard_ForwardArgs CTEST_DASHBOARD_ROOT= make dashboard PASS_REGULAR_EXPRESSION_ALL - "Running: env TRIBITS_PROJECT_ROOT=.*/tribits/examples/TribitsExampleProject TribitsExProj_TRIBITS_DIR=.*/tribits TribitsExProj_WARNINGS_AS_ERRORS_FLAGS='' TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=OFF TribitsExProj_CTEST_DO_ALL_AT_ONCE=TRUE CTEST_BUILD_NAME=MyCustomBuildName CTEST_DO_COVERAGE_TESTING=FALSE CTEST_BUILD_FLAGS='-j6' CTEST_PARALLEL_LEVEL=10 CTEST_DO_SUBMIT=FALSE CTEST_DROP_METHOD=OFF CTEST_DROP_SITE=OFF CTEST_DROP_LOCATION=OFF CTEST_DROP_SITE_COVERAGE=FALSE CTEST_DROP_LOCATION_COVERAGE=FALSE TRIBITS_2ND_CTEST_DROP_LOCATION=FALSE TRIBITS_2ND_CTEST_DROP_SITE=FALSE TribitsExProj_EXTRAREPOS_FILE=FALSE TribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=NONE TribitsExProj_IGNORE_MISSING_EXTRA_REPOSITORIES=TRUE TribitsExProj_EXTRA_REPOSITORIES=DummyRepo1,DummyRepo2,DummyRepo3 TribitsExProj_PACKAGES=SimpleCxx[;]MixedLang[;]WithSubpackagesA[;]WithSubpackages PROJECT_SOURCE_DIR=.*/tribits/examples/TribitsExampleProject .*/ctest -VV -S .*/tribits/ctest_driver/experimental_build_test.cmake" + "Running: env TRIBITS_PROJECT_ROOT=.*/tribits/examples/TribitsExampleProject TribitsExProj_TRIBITS_DIR=.*/tribits TribitsExProj_WARNINGS_AS_ERRORS_FLAGS='' TribitsExProj_ENABLE_SECONDARY_TESTED_CODE=OFF TribitsExProj_CTEST_DO_ALL_AT_ONCE=TRUE CTEST_BUILD_NAME=MyCustomBuildName CTEST_DO_COVERAGE_TESTING=FALSE CTEST_BUILD_FLAGS='-j6' CTEST_PARALLEL_LEVEL=10 CTEST_DO_SUBMIT=FALSE CTEST_DROP_METHOD=OFF CTEST_DROP_SITE=OFF CTEST_DROP_LOCATION=OFF CTEST_DROP_SITE_COVERAGE=FALSE CTEST_DROP_LOCATION_COVERAGE=FALSE TRIBITS_2ND_CTEST_DROP_LOCATION=FALSE TRIBITS_2ND_CTEST_DROP_SITE=FALSE TribitsExProj_EXTRAREPOS_FILE=FALSE TribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE=NONE TribitsExProj_IGNORE_MISSING_EXTRA_REPOSITORIES=TRUE TribitsExProj_EXTRA_REPOSITORIES=DummyRepo1,DummyRepo2,DummyRepo3 TribitsExProj_PACKAGES=${TribitsExProj_PACKAGES_list} PROJECT_SOURCE_DIR=.*/tribits/examples/TribitsExampleProject .*/ctest -VV -S .*/tribits/ctest_driver/experimental_build_test.cmake" "ENV_PROJECT_SOURCE_DIR='.*/tribits/examples/TribitsExampleProject'" "ENV_CTEST_BUILD_NAME='MyCustomBuildName'" @@ -723,7 +731,7 @@ tribits_add_advanced_test( CTestDriver_AAO_Dashboard_ForwardArgs "ENV_CTEST_DO_COVERAGE_TESTING='FALSE'" "ENV_CTEST_DO_SUBMIT='FALSE'" "ENV_TribitsExProj_ENABLE_SECONDARY_TESTED_CODE='OFF'" - "ENV_TribitsExProj_PACKAGES='SimpleCxx[;]MixedLang[;]WithSubpackagesA[;]WithSubpackages'" + "ENV_TribitsExProj_PACKAGES='${TribitsExProj_PACKAGES_list}'" "ENV_TribitsExProj_EXTRAREPOS_FILE='FALSE'" "ENV_TribitsExProj_ENABLE_KNOWN_EXTERNAL_REPOS_TYPE='NONE'" "ENV_TribitsExProj_EXTRA_REPOSITORIES='DummyRepo1,DummyRepo2,DummyRepo3'" From 1f397e0dcd163abf72a2afe80a0375740f2bcfdf Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 19:53:43 -0600 Subject: [PATCH 38/43] Disable a bunch of tests that fail if there is no Fortran (#363) All of these tests fail to configure because we don't pass down the ENABLE_Fortran configure option to the inner CMake configure and if a working Fortran compiler does not even exist on the system, then these tests fail in the configure of the inner project. While I could pass down this info somehow, a lot of these tests would fail anyway without some adjustment. We don't need every test to run if we don't have a Fortran compiler. We just don't want the TriBITS test suite to have a bunch of failing tests if a user clones the repo and tries to build and run the TriBITS test suite on a machine with no Fortran compiler (like a Mac or a Windows machine). --- .../TribitsExampleMetaProject/CMakeLists.txt | 8 +++--- .../TribitsExampleProject/CMakeLists.txt | 26 +++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/test/ctest_driver/TribitsExampleMetaProject/CMakeLists.txt b/test/ctest_driver/TribitsExampleMetaProject/CMakeLists.txt index e9bd0fea0..346397c9f 100644 --- a/test/ctest_driver/TribitsExampleMetaProject/CMakeLists.txt +++ b/test/ctest_driver/TribitsExampleMetaProject/CMakeLists.txt @@ -101,6 +101,7 @@ set(TribitsExampleMetaProject_COMMON_CONFIG_ARGS tribits_add_advanced_test( CTestDriver_TribitsExMetaProj_clone_default_branch_remote OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Run ctest driver with intial clone of the repos on the default branch 'master' and remote 'origin'" @@ -326,6 +327,7 @@ tribits_add_advanced_test( CTestDriver_TribitsExMetaProj_clone_default_branch_re tribits_add_advanced_test( CTestDriver_TribitsExMetaProj_clone_custom_branch_remote OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Run ctest driver with intial clone of the repos on the default branch 'master' and remote 'origin'" @@ -531,9 +533,9 @@ set(FULL_TEST_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}_CTestDriver_TribitsExMetaProj_version_date") tribits_add_advanced_test( CTestDriver_TribitsExMetaProj_version_date - OVERALL_WORKING_DIRECTORY TEST_NAME - OVERALL_NUM_MPI_PROCS 1 - EXCLUDE_IF_NOT_TRUE GIT_SUPPORTS_VERSION_DATE + OVERALL_WORKING_DIRECTORY TEST_NAME + OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE GIT_SUPPORTS_VERSION_DATE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Run ctest driver with intial clone and generate version date files and install" diff --git a/test/ctest_driver/TribitsExampleProject/CMakeLists.txt b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt index a7d842f8e..a17979761 100644 --- a/test/ctest_driver/TribitsExampleProject/CMakeLists.txt +++ b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt @@ -226,6 +226,7 @@ set(TribitsExampleProject_COMMON_CONFIG_ARGS tribits_add_advanced_test( CTestDriver_PBP_ST_ALL_PASS OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." CMND ln @@ -311,6 +312,7 @@ tribits_add_advanced_test( CTestDriver_PBP_GlobalConfigureFail tribits_add_advanced_test( CTestDriver_PBP_ST_BreakConfigureOptionalPkg OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -354,6 +356,7 @@ tribits_add_advanced_test( CTestDriver_PBP_ST_BreakConfigureOptionalPkg tribits_add_advanced_test( CTestDriver_PBP_ST_BreakBuildLibOptionalPkg OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -399,6 +402,7 @@ tribits_add_advanced_test( CTestDriver_PBP_ST_BreakBuildLibOptionalPkg tribits_add_advanced_test( CTestDriver_PBP_ST_BreakBuildAllOptionalPkg OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -446,6 +450,7 @@ tribits_add_advanced_test( CTestDriver_PBP_ST_BreakBuildAllOptionalPkg tribits_add_advanced_test( CTestDriver_PBP_ST_BreakTestPkg OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -494,6 +499,7 @@ tribits_add_advanced_test( CTestDriver_PBP_ST_BreakTestPkg tribits_add_advanced_test( CTestDriver_PBP_ST_BreakConfigureRequiredPkg OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -542,6 +548,7 @@ tribits_add_advanced_test( CTestDriver_PBP_ST_BreakConfigureRequiredPkg tribits_add_advanced_test( CTestDriver_PBP_ST_ALL_COVERAGE OVERALL_WORKING_DIRECTORY TEST_NAME EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_COVERAGE_TESTS + ${PROJECT_NAME}_ENABLE_Fortran OVERALL_NUM_MPI_PROCS 1 TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -575,6 +582,7 @@ tribits_add_advanced_test( CTestDriver_PBP_ST_ALL_COVERAGE tribits_add_advanced_test( CTestDriver_PBP_ST_ALL_MEMORY OVERALL_WORKING_DIRECTORY TEST_NAME EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_MEMORY_TESTS + ${PROJECT_NAME}_ENABLE_Fortran OVERALL_NUM_MPI_PROCS 1 TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -865,6 +873,7 @@ tribits_add_advanced_test( CTestDriver_PBP_PT_ALL_PASS_CALLS_2 OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -963,6 +972,7 @@ tribits_add_advanced_test( CTestDriver_PBP_PT_ALL_PASS_CALLS_4 OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -1144,6 +1154,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_PASS OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." CMND ln @@ -1200,6 +1211,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_SKIP_CTEST_ADD_TEST OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -1238,6 +1250,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_INNER_ENABLE_TESTS OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -1273,6 +1286,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_SimpleCxx_PASS OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." CMND ln @@ -1338,6 +1352,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_PASS OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." CMND ln @@ -1464,6 +1479,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakWithSubpackagesALib OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -1524,6 +1540,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_PackagesSubset_BreakWithSubpackagesALib OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -1568,6 +1585,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakSimpleCxxTestBuild OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -1612,6 +1630,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_BreakSimpleCxxTestRun OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy the project dir so I can break it!" CMND cp @@ -1655,6 +1674,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_COVERAGE OVERALL_WORKING_DIRECTORY TEST_NAME EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_COVERAGE_TESTS + ${PROJECT_NAME}_ENABLE_Fortran OVERALL_NUM_MPI_PROCS 1 TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -1689,6 +1709,7 @@ function(generate_aao_tests) tribits_add_advanced_test( CTestDriver_AAO${AAO_POSTFIX}_ST_ALL_MEMORY OVERALL_WORKING_DIRECTORY TEST_NAME EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_CTEST_DRIVER_MEMORY_TESTS + ${PROJECT_NAME}_ENABLE_Fortran OVERALL_NUM_MPI_PROCS 1 TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -1878,6 +1899,7 @@ function(generate_aao_tests) OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -2077,6 +2099,7 @@ function(generate_aao_tests) OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." @@ -2201,6 +2224,7 @@ function(generate_aao_tests) tribits_add_advanced_test( ${TEST_NAME_BODY} OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Symlink TribitsExampleProject so no need to clone (which would not work)." CMND ln @@ -2261,6 +2285,7 @@ function(generate_aao_tests) tribits_add_advanced_test( ${TEST_NAME_BODY} OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy TribitsExampleProject in so we can break it the install." @@ -2381,6 +2406,7 @@ function(generate_aao_tests) tribits_add_advanced_test( ${TEST_NAME_BODY} OVERALL_WORKING_DIRECTORY TEST_NAME OVERALL_NUM_MPI_PROCS 1 + EXCLUDE_IF_NOT_TRUE ${PROJECT_NAME}_ENABLE_Fortran TEST_0 MESSAGE "Copy TribitsExampleProject in so we can break it the install." From d01b667fc6eca283ea4fa579517cfc00d98bb81d Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 20:50:41 -0600 Subject: [PATCH 39/43] Make WORLD_READABLE=TRUE set same perms as GROUP_WRITABLE (#314, #363) With CMake 3.21, with umask=g-rwx,o-rwx you need explicitly set g+rX for the group permissions to be r-X when setting _MAKE_INSTALL_WORLD_READABLE=ON which was doing just: chmod -R o+rX Now, when you ony set _MAKE_INSTALL_WORLD_READABLE=ON, you get: chmod -R g+rX,o+rX For some reason, with older verisons of CMake, it was setting the default group permission as 'r-x' when it should not have been. I ran exactly the same build on the same machine (crf450) with the same env except I used CMake 3.21.0 vs. 3.17.1 and I had to make this change to get the same permissions on the base install directory. Strange. --- test/core/ExamplesUnitTests/CMakeLists.txt | 2 +- .../package_arch/TribitsAddInstallGroupAndPermsFixups.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/core/ExamplesUnitTests/CMakeLists.txt b/test/core/ExamplesUnitTests/CMakeLists.txt index a00932183..ea8b3ff7b 100644 --- a/test/core/ExamplesUnitTests/CMakeLists.txt +++ b/test/core/ExamplesUnitTests/CMakeLists.txt @@ -599,7 +599,7 @@ tribits_add_advanced_test( TribitsHelloWorld_install_perms CMND make ARGS ${CTEST_BUILD_FLAGS} install PASS_REGULAR_EXPRESSION_ALL "Installing: .*/TriBITS_TribitsHelloWorld_install_perms/install/bin/hello_world.exe" - "0: Running: chmod -R o[+]rX /.*/TriBITS_TribitsHelloWorld_install_perms/install" + "0: Running: chmod -R g[+]rX,o[+]rX /.*/TriBITS_TribitsHelloWorld_install_perms/install" ALWAYS_FAIL_ON_NONZERO_RETURN TEST_10 diff --git a/tribits/core/package_arch/TribitsAddInstallGroupAndPermsFixups.cmake b/tribits/core/package_arch/TribitsAddInstallGroupAndPermsFixups.cmake index 32b39f3d8..885be784e 100644 --- a/tribits/core/package_arch/TribitsAddInstallGroupAndPermsFixups.cmake +++ b/tribits/core/package_arch/TribitsAddInstallGroupAndPermsFixups.cmake @@ -76,7 +76,9 @@ function(tribits_configure_set_installed_group_and_perms_file TARGET_FILE) set(group_perms "") if (${PROJECT_NAME}_MAKE_INSTALL_GROUP_WRITABLE) set(group_perms "g+rwX") - elseif (${PROJECT_NAME}_MAKE_INSTALL_GROUP_READABLE) + elseif (${PROJECT_NAME}_MAKE_INSTALL_GROUP_READABLE + OR ${PROJECT_NAME}_MAKE_INSTALL_WORLD_READABLE + ) set(group_perms "g+rX") endif() From aae3bede31941c64728b44cb2afd8c2c0c3bba6e Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 21:08:41 -0600 Subject: [PATCH 40/43] Adjust for different CMake 3.21 error output (#363) For CMake 3.21 it prints a "could not find requested file" instead of "could not find load file". The latter was obviously a typo so it is good they fixed it but I had this checked for in a test. Now the test passes in both cases. --- test/core/ExamplesUnitTests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/ExamplesUnitTests/CMakeLists.txt b/test/core/ExamplesUnitTests/CMakeLists.txt index ea8b3ff7b..9be8fa951 100644 --- a/test/core/ExamplesUnitTests/CMakeLists.txt +++ b/test/core/ExamplesUnitTests/CMakeLists.txt @@ -444,7 +444,7 @@ tribits_add_advanced_test( TribitsHelloWorld_CONFIGURE_OPTIONS_FILE ARGS -DTribitsHelloWorld_CONFIGURE_OPTIONS_FILE=ConfigOptions1.cmake . PASS_REGULAR_EXPRESSION_ALL - "(include|INCLUDE) could not find load file" + "(include|INCLUDE) could not find (load|requested) file" "TriBITS_TribitsHelloWorld_CONFIGURE_OPTIONS_FILE/ConfigOptions1.cmake" # NOTE: Above shows that FILEPATH type causes relative paths to be # evaluated w.r.t. the current working directory. From 65ee4e6ecd57e4626b42c58c216ad34100e39934 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 21:11:00 -0600 Subject: [PATCH 41/43] Adjust for different number of install errors reported by CMake 3.21 (#363) Seems CMake 3.21 reports two install failures instead of just one as older versions of CMake reported. I guess it depends how you count. Either way, the number is greater than 0 so that is what matters really. --- test/ctest_driver/TribitsExampleProject/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ctest_driver/TribitsExampleProject/CMakeLists.txt b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt index a17979761..a431c2b5d 100644 --- a/test/ctest_driver/TribitsExampleProject/CMakeLists.txt +++ b/test/ctest_driver/TribitsExampleProject/CMakeLists.txt @@ -2322,7 +2322,7 @@ function(generate_aao_tests) "CONFIGURE_OPTIONS = '.*[;]-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON[;].*[;]-DCMAKE_INSTALL_PREFIX=install[;]-DTribitsExProj_ENABLE_INSTALL_CMAKE_CONFIG_FILES=ON'" "Build PASSED!" "Installing [(]i.e. building target 'install_package_by_package'[)] [.][.][.]" - "Build install output: BUILD_INSTALL_NUM_ERRORS='1',BUILD_INSTALL_RETURN_VAL='2'" + "Build install output: BUILD_INSTALL_NUM_ERRORS='(1|2)',BUILD_INSTALL_RETURN_VAL='2'" "Install FAILED!" "File '' does NOT exist so all tests passed!" "TRIBITS_CTEST_DRIVER: OVERALL: ALL FAILED" From 36af2173dff4b1d411adcd515221724e948454de Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Mon, 19 Jul 2021 21:27:00 -0600 Subject: [PATCH 42/43] Adjust for move of rules.ninja in CMake 3.18 (#363) I searched the git logs and it looks like this change was pulled in the CMake 3.18.0 release. But I only tested this with CMake 3.17.1 and 3.21.0. --- test/core/ExamplesUnitTests/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/core/ExamplesUnitTests/CMakeLists.txt b/test/core/ExamplesUnitTests/CMakeLists.txt index 9be8fa951..f1e052b4b 100644 --- a/test/core/ExamplesUnitTests/CMakeLists.txt +++ b/test/core/ExamplesUnitTests/CMakeLists.txt @@ -2126,6 +2126,11 @@ tribits_add_advanced_test( TribitsExampleProject_ALL_ST_NoFortran_enable_install # Find ninja so we can test TriBITS using ninja as well find_program(NINJA_EXE ninja) +if ( CMAKE_VERSION VERSION_LESS 3.18.0 ) + set(rulesNinjaFilePath "rules.ninja") +else() + set(rulesNinjaFilePath "CMakeFiles/rules.ninja") +endif() tribits_add_advanced_test( TribitsExampleProject_ALL_ST_NoFortran_Ninja OVERALL_WORKING_DIRECTORY TEST_NAME @@ -2159,14 +2164,14 @@ tribits_add_advanced_test( TribitsExampleProject_ALL_ST_NoFortran_Ninja TEST_1 MESSAGE "Verify TribitsExProj_PARALLEL_COMPILE_JOBS_LIMIT=3 has correct effect" - CMND grep ARGS -A 1 compile_job_pool rules.ninja + CMND grep ARGS -A 1 compile_job_pool ${rulesNinjaFilePath} PASS_REGULAR_EXPRESSION "depth *= *3" ALWAYS_FAIL_ON_NONZERO_RETURN TEST_2 MESSAGE "Verify TribitsExProj_PARALLEL_LINK_JOBS_LIMIT=2 has correct effect" - CMND grep ARGS -A 1 link_job_pool rules.ninja + CMND grep ARGS -A 1 link_job_pool ${rulesNinjaFilePath} PASS_REGULAR_EXPRESSION "depth *= *2" ALWAYS_FAIL_ON_NONZERO_RETURN From 3024a805a7d2293e0b9c919515a17742cd209644 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Tue, 20 Jul 2021 10:23:26 -0600 Subject: [PATCH 43/43] Update min version of CMake from 2.6 to 2.17 of old Fortran name managing code (#363) With CMake 3.21, this was generating a deprecated warning. With the rest of TriBITS requiring CMake 3.17 it seems bad to have code that has min version going back to 2.6. However, this might change the behaivor of this code so that is a warning. (Fingers crossed.) --- tribits/core/config_tests/fmangle/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tribits/core/config_tests/fmangle/CMakeLists.txt b/tribits/core/config_tests/fmangle/CMakeLists.txt index c7459a43e..0e24dacff 100644 --- a/tribits/core/config_tests/fmangle/CMakeLists.txt +++ b/tribits/core/config_tests/fmangle/CMakeLists.txt @@ -37,7 +37,7 @@ # ************************************************************************ # @HEADER -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.17) project(fmangle C Fortran) add_definitions(${COMMON_DEFS}) set(CMAKE_VERBOSE_MAKEFILE ON)