From 7f9d57605547eb3d2ba39ee1dd68daf1b944ea87 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:57:46 +0800 Subject: [PATCH 01/11] Install the boost library. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23206a4e..e7468382 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Install Dependencies on Linux if: startsWith(runner.os, 'Linux') - run: sudo apt update && sudo apt install libhdf5-mpi-dev + run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev - name: Install Dependencies on macOS if: startsWith(runner.os, 'macOS') run: brew install hdf5-mpi From 0f518e55fd2c9ca1bf2d7c3d5dad20414e21a6fa Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:06:16 +0800 Subject: [PATCH 02/11] Install boost on macOS. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7468382..54157a10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev - name: Install Dependencies on macOS if: startsWith(runner.os, 'macOS') - run: brew install hdf5-mpi + run: brew install hdf5-mpi boost - uses: actions/checkout@main with: submodules: 'recursive' From be0c7fd1d14bddc374f34c7ca7c4554ba99788d4 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:26:20 +0800 Subject: [PATCH 03/11] Use more recent versions of GCC. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54157a10..cbafd20f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Install Dependencies on Linux if: startsWith(runner.os, 'Linux') - run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev + run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev gcc-12 - name: Install Dependencies on macOS if: startsWith(runner.os, 'macOS') - run: brew install hdf5-mpi boost + run: brew install hdf5-mpi boost gcc@12 - uses: actions/checkout@main with: submodules: 'recursive' @@ -31,7 +31,7 @@ jobs: # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DminiCFD_BUILD_DEMOS=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DminiCFD_BUILD_DEMOS=ON -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 - name: Build working-directory: ${{ runner.workspace }}/build shell: bash From 7586e09568e7051fc306dca9db512a32d947e904 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:34:06 +0800 Subject: [PATCH 04/11] Add include and library paths. --- test/mesh/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mesh/CMakeLists.txt b/test/mesh/CMakeLists.txt index 21c49aa1..d2b3afcd 100644 --- a/test/mesh/CMakeLists.txt +++ b/test/mesh/CMakeLists.txt @@ -28,7 +28,8 @@ target_link_libraries(test_mesh_part ${CGNS_LIB} ${MPI_LIBRARIES}) set_target_properties(test_mesh_part PROPERTIES OUTPUT_NAME part) add_executable(test_mesh_cgal cgal.cpp) -target_include_directories(test_mesh_cgal PRIVATE ${CGAL_INCLUDE_DIRS}) +target_include_directories(test_mesh_cgal PRIVATE ${CGAL_INCLUDE_DIRS} ${CGNS_INC}) +target_link_libraries(test_mesh_cgal ${CGNS_LIB}) set_target_properties(test_mesh_cgal PROPERTIES OUTPUT_NAME cgal) add_test(NAME test_mesh_cgal COMMAND cgal) From 28e9ba137750dca13ef4092be7928f4b72bc7fbd Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:48:08 +0800 Subject: [PATCH 05/11] Prepend Boost's header path before CGAL's. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 57f4dbdf..02a12163 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,10 @@ include_directories(${EIGEN_INC}) set(CGAL_DISABLE_GMP ON) find_package(CGAL REQUIRED PATHS "${PROJECT_SOURCE_DIR}/ThirdParty/CGAL/Installation/lib/cmake/CGAL") -# message("${CGAL_INCLUDE_DIRS}") + +find_package(Boost REQUIRED) +list(PREPEND CGAL_INCLUDE_DIRS "${Boost_INCLUDE_DIR}") +message("${CGAL_INCLUDE_DIRS}") # Additional headers that depends on ${PROJECT_SOURCE_DIR} include_directories("${PROJECT_SOURCE_DIR}/include") From cb19bef02ae7a6ffb14281b9b53b83e46fa3cd9b Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:04:57 +0800 Subject: [PATCH 06/11] Install gmsh for running tests. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbafd20f..b3bb4ddf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Install Dependencies on Linux if: startsWith(runner.os, 'Linux') - run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev gcc-12 + run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev gcc-12 gmsh - name: Install Dependencies on macOS if: startsWith(runner.os, 'macOS') - run: brew install hdf5-mpi boost gcc@12 + run: brew install hdf5-mpi boost gcc@12 gmsh - uses: actions/checkout@main with: submodules: 'recursive' From 50ec195ec1674ed4eebb84522f065051d9a813b8 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:38:34 +0800 Subject: [PATCH 07/11] Install the pip version of gmsh for cgns support. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3bb4ddf..53fa476b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Install Dependencies on Linux if: startsWith(runner.os, 'Linux') - run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev gcc-12 gmsh + run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev gcc-12 && pip install --upgrade gmsh - name: Install Dependencies on macOS if: startsWith(runner.os, 'macOS') - run: brew install hdf5-mpi boost gcc@12 gmsh + run: brew install hdf5-mpi boost gcc@12 && pip install --upgrade gmsh - uses: actions/checkout@main with: submodules: 'recursive' From 72bf13fca07bd5ac3120683af34c8983de9f0891 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:05:10 +0800 Subject: [PATCH 08/11] Install libGLU required by Gmsh. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53fa476b..6d98cc91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Install Dependencies on Linux if: startsWith(runner.os, 'Linux') - run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev gcc-12 && pip install --upgrade gmsh + run: sudo apt update && sudo apt install libhdf5-mpi-dev libboost-all-dev gcc-12 libglu1-mesa && pip install --upgrade gmsh - name: Install Dependencies on macOS if: startsWith(runner.os, 'macOS') run: brew install hdf5-mpi boost gcc@12 && pip install --upgrade gmsh From 6850cb7d6800e7d1244f8d15cb9769f322f28d79 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:40:03 +0800 Subject: [PATCH 09/11] Run build only. --- .github/workflows/build.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d98cc91..8a2254f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,8 @@ name: Build -on: [push, pull_request] +on: + push: + pull_request: + workflow_call: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release @@ -37,8 +40,8 @@ jobs: shell: bash # Execute the build. You can specify a specific target with "--target " run: cmake --build . --config $BUILD_TYPE - - name: Test - working-directory: ${{ runner.workspace }}/build - shell: bash - # Execute the build. You can specify a specific target with "--target " - run: ctest -V -C $BUILD_TYPE + # - name: Test + # working-directory: ${{ runner.workspace }}/build + # shell: bash + # # Execute the build. You can specify a specific target with "--target " + # run: ctest -V -C $BUILD_TYPE From 9c338bebbb04a3c3c4f5e824e3e28a51ce60b2d6 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:55:34 +0800 Subject: [PATCH 10/11] Initialize the test workflow. --- .github/workflows/test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..550b763c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test + +on: + push: + pull_request: + +jobs: + build: + uses: ./.github/workflows/build.yml + test: + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} # For each os, run this job on it. + steps: + - name: Run the Tests + working-directory: ${{ runner.workspace }}/build + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: ctest -V -C $BUILD_TYPE From 5b24a834c9c1438ab789ab8abc9acc56122dc0c9 Mon Sep 17 00:00:00 2001 From: pvc1989 <21127966+pvc1989@users.noreply.github.com> Date: Sat, 9 Dec 2023 18:14:06 +0800 Subject: [PATCH 11/11] Delete the test workflow. --- .github/workflows/test.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 550b763c..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Test - -on: - push: - pull_request: - -jobs: - build: - uses: ./.github/workflows/build.yml - test: - strategy: - matrix: - os: [macos-latest, ubuntu-latest] - runs-on: ${{ matrix.os }} # For each os, run this job on it. - steps: - - name: Run the Tests - working-directory: ${{ runner.workspace }}/build - shell: bash - # Execute the build. You can specify a specific target with "--target " - run: ctest -V -C $BUILD_TYPE