From 8cbcca8f3a86a82bd389a00b29d425ab87965343 Mon Sep 17 00:00:00 2001 From: andrewcoughtrie <24609575+andrewcoughtrie@users.noreply.github.com> Date: Tue, 9 Aug 2022 16:23:33 +0100 Subject: [PATCH 1/3] Added a build docs workflow for testing doc building on PRs and renamed documentation to deploy docs. --- .github/workflows/build-docs.yml | 45 +++++++++++++++++++ .../{documentation.yml => deploy-docs.yml} | 20 +++++---- 2 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build-docs.yml rename .github/workflows/{documentation.yml => deploy-docs.yml} (58%) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 00000000..5ce50bac --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,45 @@ +name: Build Docs + +on: + pull_request: + branches: [ main ] + paths: + # Only build if there has been a change in the following files + - 'src/**.h' + - 'src/**.cpp' + - 'documentation/**.md' + - '.github/workflows/build-docs.yml' + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + runs-on: ubuntu-latest + env: + CXX: /usr/bin/g++-10 + steps: + - uses: actions/checkout@v2 + + - name: Install Doxygen + # Install doxygen from apt + run: | + sudo apt-get update + sudo apt-get -y install doxygen graphviz + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. + run: > + cmake -B ${{github.workspace}}/build + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_CXX_COMPILER=${{ env.CXX }} + -DBUILD_TESTS=OFF + -DBUILD_DOXYGEN=ON + + - name: Build + # Build your program with the given configuration + run: > + cmake --build ${{github.workspace}}/build + --config ${{env.BUILD_TYPE}} + --target doxygen-docs diff --git a/.github/workflows/documentation.yml b/.github/workflows/deploy-docs.yml similarity index 58% rename from .github/workflows/documentation.yml rename to .github/workflows/deploy-docs.yml index 4d3ca3d8..cf1f6fea 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/deploy-docs.yml @@ -7,7 +7,7 @@ on: - 'src/**.h' - 'src/**.cpp' - 'documentation/**.md' - - '.github/workflows/documentation.yml' + - '.github/workflows/deploy_docs.yml' env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -15,9 +15,6 @@ env: jobs: build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ubuntu-latest env: CXX: /usr/bin/g++-10 @@ -31,13 +28,20 @@ jobs: sudo apt-get -y install doxygen graphviz - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_COMPILER=${{ env.CXX }} -DBUILD_TESTS=OFF + # Configure CMake in a 'build' subdirectory. + run: > + cmake -B ${{github.workspace}}/build + -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_CXX_COMPILER=${{ env.CXX }} + -DBUILD_TESTS=OFF + -DBUILD_DOXYGEN=ON - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target doxygen-docs + run: > + cmake --build ${{github.workspace}}/build + --config ${{env.BUILD_TYPE}} + --target doxygen-docs - name: Update Doxygen Pages run: | From c5581a3fedb29f83c29cc6218d42a2627d1dec4a Mon Sep 17 00:00:00 2001 From: andrewcoughtrie <24609575+andrewcoughtrie@users.noreply.github.com> Date: Wed, 17 Aug 2022 10:56:23 +0100 Subject: [PATCH 2/3] Test of ubuntu-22.04 --- .github/workflows/build-ub2204.yml | 68 ++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build-ub2204.yml diff --git a/.github/workflows/build-ub2204.yml b/.github/workflows/build-ub2204.yml new file mode 100644 index 00000000..89a84803 --- /dev/null +++ b/.github/workflows/build-ub2204.yml @@ -0,0 +1,68 @@ +name: Build and Test Ubuntu 22.04 + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Debug + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + compiler: [ + {c: gcc-11, cpp: g++-11, fortran: gfortran-11}, + {c: clang-14, cpp: clang++-14, fortran: flang-14} + ] + + steps: + - uses: actions/checkout@v2 + + - name: Install libomp-devel + # Ensure that the OpenMP development libraries are installed. + run: | + sudo apt-get update + sudo apt-get install -y libomp-14-dev + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} + -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} + -DCMAKE_Fortran_COMPILER=${{ matrix.compiler.fortran }} + -DBUILD_TESTS=ON + -DBUILD_FORTRAN_TESTS=OFF + -DINCLUDE_GTEST=ON + -DWARNINGS_AS_ERRORS=ON + -DUSE_SANITIZERS=ON + -DENABLE_DOXYGEN=ON + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + # Run tests on a single thread + - name: "Test (1 thread)" + env: + OMP_NUM_THREADS: 1 + working-directory: ${{github.workspace}}/build + run: ctest -C ${{env.BUILD_TYPE}} + + # Run tests on 4 threads + - name: "Test (4 threads)" + env: + OMP_NUM_THREADS: 4 + working-directory: ${{github.workspace}}/build + run: ctest -C ${{env.BUILD_TYPE}} + From 7d8ba49cffe51221d9d4d990bebd78979292f0ba Mon Sep 17 00:00:00 2001 From: andrewcoughtrie <24609575+andrewcoughtrie@users.noreply.github.com> Date: Wed, 17 Aug 2022 10:59:34 +0100 Subject: [PATCH 3/3] Remove Test of ubuntu-22.04 --- .github/workflows/build-ub2204.yml | 68 ------------------------------ 1 file changed, 68 deletions(-) delete mode 100644 .github/workflows/build-ub2204.yml diff --git a/.github/workflows/build-ub2204.yml b/.github/workflows/build-ub2204.yml deleted file mode 100644 index 89a84803..00000000 --- a/.github/workflows/build-ub2204.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Build and Test Ubuntu 22.04 - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Debug - -jobs: - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - compiler: [ - {c: gcc-11, cpp: g++-11, fortran: gfortran-11}, - {c: clang-14, cpp: clang++-14, fortran: flang-14} - ] - - steps: - - uses: actions/checkout@v2 - - - name: Install libomp-devel - # Ensure that the OpenMP development libraries are installed. - run: | - sudo apt-get update - sudo apt-get install -y libomp-14-dev - - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: > - cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} - -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} - -DCMAKE_Fortran_COMPILER=${{ matrix.compiler.fortran }} - -DBUILD_TESTS=ON - -DBUILD_FORTRAN_TESTS=OFF - -DINCLUDE_GTEST=ON - -DWARNINGS_AS_ERRORS=ON - -DUSE_SANITIZERS=ON - -DENABLE_DOXYGEN=ON - - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - # Run tests on a single thread - - name: "Test (1 thread)" - env: - OMP_NUM_THREADS: 1 - working-directory: ${{github.workspace}}/build - run: ctest -C ${{env.BUILD_TYPE}} - - # Run tests on 4 threads - - name: "Test (4 threads)" - env: - OMP_NUM_THREADS: 4 - working-directory: ${{github.workspace}}/build - run: ctest -C ${{env.BUILD_TYPE}} -