From 5cd062eb6df7ca454c0377bce37f47deb92996cf Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Sun, 5 Jan 2025 11:42:48 +0100 Subject: [PATCH 01/13] try quoted --- .github/workflows/integration_trigger.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index f78e867c..886a132f 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -2,6 +2,8 @@ name: Integration Test Trigger on: pull_request: types: [closed] + workflow_dispatch: + jobs: merge-PR: if: github.event.pull_request.merged == true @@ -9,7 +11,7 @@ jobs: steps: - name: Trigger integration tests on highfive-devs/bbp-integration run: | - curl -X POST https://api.github.com/repos/highfive-devs/bbp-integration/dispatches \ + curl -X POST "https://api.github.com/repos/highfive-devs/bbp-integration/dispatches" \ -H 'Accept: application/vnd.github.everest-preview+json' \ -u ${{ secrets.ACCESS_TOKEN }} \ --data '{"event_type": "merge", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}' From 9ce047d1cc4d481887c525ee00e3464883b55dc8 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Sun, 5 Jan 2025 11:45:48 +0100 Subject: [PATCH 02/13] Debug workflow. --- .github/workflows/integration_trigger.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index 886a132f..ecb427e8 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -1,8 +1,13 @@ name: Integration Test Trigger + on: + push: + branches: + - main + - v2.x pull_request: - types: [closed] - workflow_dispatch: + branches: + - main jobs: merge-PR: From 1be1aa7b8526eb216457444e6f1f3bd91e7e6198 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Sun, 5 Jan 2025 11:50:03 +0100 Subject: [PATCH 03/13] Remove filter --- .github/workflows/integration_trigger.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index ecb427e8..4f9e4eac 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -11,7 +11,6 @@ on: jobs: merge-PR: - if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Trigger integration tests on highfive-devs/bbp-integration From 568e5b51f521ddd1eac2bb5313a61b4a4541dea6 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Thu, 9 Jan 2025 11:44:39 +0100 Subject: [PATCH 04/13] Update PAT for triggering. --- .github/workflows/integration_trigger.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index 4f9e4eac..cddf3494 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -17,5 +17,6 @@ jobs: run: | curl -X POST "https://api.github.com/repos/highfive-devs/bbp-integration/dispatches" \ -H 'Accept: application/vnd.github.everest-preview+json' \ - -u ${{ secrets.ACCESS_TOKEN }} \ + -H "Authorization: Bearer ${{ secrets.BBP_INTEGRATION_TRIGGER }} \ + -H "X-GitHub-Api-Version: 2022-11-28" \ --data '{"event_type": "merge", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}' From 12ae0ae7505a62f599516d7e4ed035e67ea10b71 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Thu, 9 Jan 2025 11:46:15 +0100 Subject: [PATCH 05/13] Add missing " --- .github/workflows/integration_trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index cddf3494..055c5309 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -17,6 +17,6 @@ jobs: run: | curl -X POST "https://api.github.com/repos/highfive-devs/bbp-integration/dispatches" \ -H 'Accept: application/vnd.github.everest-preview+json' \ - -H "Authorization: Bearer ${{ secrets.BBP_INTEGRATION_TRIGGER }} \ + -H "Authorization: Bearer ${{ secrets.BBP_INTEGRATION_TRIGGER }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ --data '{"event_type": "merge", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}' From eb2070576d5a625418496a84f2ca6af616e97996 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Thu, 9 Jan 2025 11:56:41 +0100 Subject: [PATCH 06/13] Trigger again. From a33178bf8561ebb18597f1e50cd2a26272f36bbd Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Thu, 9 Jan 2025 12:04:35 +0100 Subject: [PATCH 07/13] Update the trigger condition. --- .github/workflows/integration_trigger.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index 055c5309..8b7be0bf 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -3,11 +3,7 @@ name: Integration Test Trigger on: push: branches: - - main - v2.x - pull_request: - branches: - - main jobs: merge-PR: From f8a57f98cddb7765bb0cc3ac35c6b11e5c0f0821 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Thu, 9 Jan 2025 12:05:10 +0100 Subject: [PATCH 08/13] Also trigger on `main`. --- .github/workflows/integration_trigger.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index 8b7be0bf..06f57302 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -3,6 +3,7 @@ name: Integration Test Trigger on: push: branches: + - main - v2.x jobs: From fa8e68bb6ef6e426e66bf1351c916c2c7d626000 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Mon, 3 Mar 2025 22:22:37 +0100 Subject: [PATCH 09/13] undo: trigger on every push. --- .github/workflows/integration_trigger.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index 06f57302..055c5309 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -5,6 +5,9 @@ on: branches: - main - v2.x + pull_request: + branches: + - main jobs: merge-PR: From 36e801fb56dd5540dca6fff1151b3565c5382a87 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Mon, 3 Mar 2025 22:24:02 +0100 Subject: [PATCH 10/13] undo: remove unaffected CI. --- .../check_doxygen_awesome_version.yml | 20 - .github/workflows/ci.yml | 390 ------------------ .github/workflows/clang_format.yml | 23 -- .github/workflows/coverage.yml | 72 ---- .github/workflows/gh-pages.yml | 78 ---- .github/workflows/version_file.yml | 38 -- 6 files changed, 621 deletions(-) delete mode 100644 .github/workflows/check_doxygen_awesome_version.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/clang_format.yml delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/gh-pages.yml delete mode 100644 .github/workflows/version_file.yml diff --git a/.github/workflows/check_doxygen_awesome_version.yml b/.github/workflows/check_doxygen_awesome_version.yml deleted file mode 100644 index 2e4df283..00000000 --- a/.github/workflows/check_doxygen_awesome_version.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Auto-update doxygen-awesome - -on: - workflow_dispatch: - schedule: - - cron: 0 2 * * 1 - -jobs: - check-for-updates: - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - name: Open PR if doxygen-awesome outdated. - run: | - - VERSION=$(doc/doxygen-awesome-css/update_doxygen_awesome.sh "$(mktemp -d)") - .github/create_submodule_update_pr.sh doxygen-awesome ${VERSION} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0643302f..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,390 +0,0 @@ -name: HighFive_CI - -concurrency: - group: ${{ github.workflow }}#${{ github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - - main - - v2.x - pull_request: - branches: - - master - - main - - v2.x - paths-ignore: - - '**.md' - - '**.rst' - - 'doc/**' - -env: - HOMEBREW_NO_AUTO_UPDATE: 1 # for reproducibility, dont autoupdate - BUILD_TYPE: RelWithDebInfo - INSTALL_DIR: install - -jobs: - - # Job testing compiling on several Ubuntu systems + MPI - # ========================================================= - # - # XTensor tests are run for conda/mamba and MacOS - Linux_MPI: - runs-on: ${{matrix.config.os}} - name: Linux_MPI (${{toJson(matrix.config)}}) - strategy: - matrix: - include: - - config: - os: ubuntu-24.04 - pkgs: '' - - config: - os: ubuntu-24.04 - pkgs: 'libboost-all-dev libopencv-dev' - flags: '-DHIGHFIVE_TEST_BOOST:Bool=ON -DHIGHFIVE_TEST_OPENCV:Bool=ON -GNinja' - - config: - os: ubuntu-latest - pkgs: 'libboost-all-dev libeigen3-dev libopencv-dev' - flags: '-DHIGHFIVE_TEST_BOOST:Bool=ON -DHIGHFIVE_TEST_EIGEN:Bool=ON -DHIGHFIVE_TEST_OPENCV:Bool=ON -GNinja' - - config: - os: ubuntu-24.04 - pkgs: 'libboost-all-dev' - flags: '-DCMAKE_CXX_STANDARD=17 -DHIGHFIVE_TEST_BOOST:Bool=ON' - - config: - os: ubuntu-22.04 - flags: '-DHIGHFIVE_TEST_BOOST=Off -DCMAKE_CXX_STANDARD=20 -DHIGHFIVE_HAS_CONCEPTS=On' - - config: - os: ubuntu-24.04 - flags: '-DHIGHFIVE_TEST_BOOST=Off -DCMAKE_CXX_STANDARD=20 -DHIGHFIVE_HAS_CONCEPTS=On' - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: "Setup MPI" - uses: mpi4py/setup-mpi@v1 - with: - mpi: openmpi - - - name: "Install libraries" - run: | - sudo apt-get -qq update - sudo apt-get -qq install libhdf5-openmpi-dev libsz2 ninja-build ${{ matrix.config.pkgs }} - - - name: Build - run: | - CMAKE_OPTIONS=(-DHDF5_PREFER_PARALLEL:BOOL=ON ${{ matrix.config.flags }}) - source $GITHUB_WORKSPACE/.github/build.sh - - - name: Test - working-directory: ${{github.workspace}}/build - run: | - ctest -j2 --output-on-failure -C $BUILD_TYPE - - - name: Test No HDF5 Diagnositics - working-directory: ${{github.workspace}}/build - run: | - ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG - - - name: Examples - working-directory: ${{github.workspace}}/build/src/examples - run: $GITHUB_WORKSPACE/.github/run_examples.sh - - # Job testing several versions of hdf5 - # =================================================== - Linux_HDF5_Versions: - runs-on: ubuntu-latest - strategy: - matrix: - hdf5_version : [ hdf5-1_8_23, hdf5-1_10_11, hdf5-1_12_3, hdf5_1.14.6 ] - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: "Install libraries" - run: | - sudo apt-get -qq update - sudo apt-get -qq install ninja-build libsz2 zlib1g-dev libboost-all-dev - - - name: Build HDF5 - run: | - wget https://github.com/HDFGroup/hdf5/archive/refs/tags/${{ matrix.hdf5_version }}.tar.gz --output-document hdf5.tar.gz - tar xf hdf5.tar.gz - mkdir -p hdf5-${{ matrix.hdf5_version }}/BUILD && cd hdf5-${{ matrix.hdf5_version }}/BUILD - cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.hdf5_version }} -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DUSE_LIBAEC=ON -DHDF5_BUILD_EXAMPLES=OFF -DBUILD_STATIC_LIBS=OFF -DBUILD_TESTING=OFF - ninja && ninja install - - - name: Build - run: | - CMAKE_OPTIONS=( - -GNinja - -DHDF5_ROOT=$HOME/${{ matrix.hdf5_version }} - ) - source $GITHUB_WORKSPACE/.github/build.sh - - - name: Test - working-directory: ${{github.workspace}}/build - run: | - ctest -j2 --output-on-failure -C $BUILD_TYPE - - - name: Test No HDF5 Diagnositics - working-directory: ${{github.workspace}}/build - run: | - ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG - - - name: Examples - working-directory: ${{github.workspace}}/build/src/examples - run: $GITHUB_WORKSPACE/.github/run_examples.sh - - # Job testing several compilers on a stable Linux - # ==================================================== - Linux_Compilers: - runs-on: ${{matrix.os}} - env: ${{ matrix.env }} - strategy: - matrix: - os: [ "ubuntu-24.04" ] - env: [ - {CC: clang-18, CXX: clang++-18, pkgs: "clang-18"}, - {CC: gcc-9, CXX: g++-9, pkgs: "gcc-9 g++-9"}, - {CC: gcc-14, CXX: g++-14, pkgs: "gcc-14 g++-14"}, - ] - - include: - - os: "ubuntu-22.04" - env: - CC: clang-11 - CXX: clang++-11 - pkgs: clang-11 - - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: "Install libraries" - run: | - sudo apt-get -qq update - sudo apt-get -qq install ${pkgs} - sudo apt-get -qq install libboost-all-dev libhdf5-dev libsz2 ninja-build - - - name: Build - run: | - CMAKE_OPTIONS=(-DHIGHFIVE_TEST_BOOST=ON -GNinja) - source $GITHUB_WORKSPACE/.github/build.sh - - - name: Test - working-directory: ${{github.workspace}}/build - run: | - ctest -j2 --output-on-failure -C $BUILD_TYPE - - - name: Test No HDF5 Diagnositics - working-directory: ${{github.workspace}}/build - run: | - ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG - - - name: Examples - working-directory: ${{github.workspace}}/build/src/examples - run: $GITHUB_WORKSPACE/.github/run_examples.sh - - # Job running unit-test with sanitizers - # ===================================== - Linux_Sanitizers: - runs-on: ubuntu-24.04 - strategy: - matrix: - env: [ - {CC: clang, CXX: clang++, HIGHFIVE_SANITIZER: address}, - {CC: clang, CXX: clang++, HIGHFIVE_SANITIZER: undefined}, - {CC: gcc, CXX: g++, HIGHFIVE_GLIBCXX_ASSERTIONS: On}, - ] - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: "Install libraries" - run: | - sudo apt-get -qq update - sudo apt-get -qq install boost1.83 libeigen3-dev libhdf5-dev libsz2 ninja-build - - - name: Build - run: | - CMAKE_OPTIONS=( - -GNinja - -DHIGHFIVE_TEST_BOOST:BOOL=ON - -DHIGHFIVE_TEST_BOOST_SPAN:BOOL=ON - -DHIGHFIVE_TEST_EIGEN:BOOL=ON - -DHIGHFIVE_BUILD_DOCS:BOOL=FALSE - -DHIGHFIVE_GLIBCXX_ASSERTIONS=${HIGHFIVE_GLIBCXX_ASSERTIONS:-OFF} - -DHIGHFIVE_SANITIZER=${HIGHFIVE_SANITIZER:-OFF} - ) - source $GITHUB_WORKSPACE/.github/build.sh - - - name: Test - working-directory: ${{github.workspace}}/build - run: | - ctest -j2 --output-on-failure -C $BUILD_TYPE - - - name: Test No HDF5 Diagnositics - working-directory: ${{github.workspace}}/build - run: | - ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG - - - name: Examples - working-directory: ${{github.workspace}}/build/src/examples - run: $GITHUB_WORKSPACE/.github/run_examples.sh - - - # Job to check using HighFive from other CMake projects - # ===================================================== - CMake_Project: - runs-on: ubuntu-24.04 - strategy: - matrix: - parallelism: [ serial, parallel ] - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: "Update Ubuntu" - run: | - sudo apt-get -qq update - - - name: "Install common libraries" - run: | - sudo apt-get -qq install libboost-all-dev libsz2 ninja-build - - - name: "Install serial HDF5" - if: matrix.parallelism == 'serial' - run: | - sudo apt-get -qq install libhdf5-dev - - - - name: "Install parallel HDF5" - if: matrix.parallelism == 'parallel' - run: | - sudo apt-get -qq install libhdf5-openmpi-dev - - - name: "CMake Project Integration" - run: bash tests/cmake_integration/test_cmake_integration.sh - - - # Job checking the benchmarks work - # ================================ - Benchmarks: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: "Install libraries" - run: | - sudo apt -y update - sudo apt -y install --no-install-recommends libhdf5-dev pkg-config - - - name: "Build benchmarks" - working-directory: ${{github.workspace}}/src/benchmarks - run: make - - - run: time ${{github.workspace}}/src/benchmarks/highfive_bench - - - # Job testing in OSX - # ================== - OSX: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ "macOS-14" ] - cxxstd: ["14", "17", "20"] - - include: - - os: "macOS-13" - cxxstd: "20" - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: "Install libraries (OSX)" - run: brew install boost eigen hdf5 ninja xtensor - - - name: Build - run: | - CMAKE_OPTIONS=( - -GNinja - -DHIGHFIVE_TEST_BOOST:BOOL=ON - -DHIGHFIVE_TEST_EIGEN:BOOL=ON - -DHIGHFIVE_TEST_XTENSOR:BOOL=ON - -DHIGHFIVE_BUILD_DOCS:BOOL=FALSE - -DCMAKE_CXX_STANDARD=${{matrix.cxxstd}} - ) - source $GITHUB_WORKSPACE/.github/build.sh - - - name: Test - working-directory: ${{github.workspace}}/build - run: | - ctest -j2 --output-on-failure -C $BUILD_TYPE - - - name: Test No HDF5 Diagnositics - working-directory: ${{github.workspace}}/build - run: | - ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG - - - name: Examples - working-directory: ${{github.workspace}}/build/src/examples - run: $GITHUB_WORKSPACE/.github/run_examples.sh - - - # Job testing in Windows - # ====================== - Windows: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ "windows-2019", "windows-2022"] - cxxstd: ["14", "17", "20"] - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - uses: mamba-org/setup-micromamba@v1 - with: - environment-file: .github/mamba_env.yaml - environment-name: win-test - - - name: Build - shell: bash -l {0} - run: | - CMAKE_OPTIONS=( - -DCMAKE_CXX_STANDARD=${{matrix.cxxstd}} - -DHIGHFIVE_UNIT_TESTS=ON - -DHIGHFIVE_TEST_BOOST:BOOL=ON - -DHIGHFIVE_TEST_EIGEN:BOOL=ON - -DHIGHFIVE_TEST_XTENSOR:BOOL=ON - ) - source $GITHUB_WORKSPACE/.github/build.sh - - - name: Test - working-directory: ${{github.workspace}}/build - shell: bash -l {0} - run: | - ctest -j2 --output-on-failure -C $BUILD_TYPE - - - name: Test No HDF5 Diagnositics - working-directory: ${{github.workspace}}/build - shell: bash -l {0} - run: | - ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml deleted file mode 100644 index c8257b44..00000000 --- a/.github/workflows/clang_format.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: ClangFormat - -concurrency: - group: ${{ github.workflow }}#${{ github.ref }} - cancel-in-progress: true - -on: - pull_request: - branches: - - master - - main - - v2.x - -jobs: - Code_Format: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Run clang-format - run: | - bash bin/format.sh diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index df075c33..00000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Coverage - -concurrency: - group: ${{ github.workflow }}#${{ github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - - main - - v2.x - pull_request: - branches: - - master - - main - - v2.x - paths-ignore: - - '**.md' - - '**.rst' - - 'doc/**' - -env: - BUILD_TYPE: RelWithDebInfo - INSTALL_DIR: install - -jobs: - # Job producing code coverage report - # ================================== - Code_coverage: - runs-on: ubuntu-22.04 - - steps: - - name: "Install libraries" - run: | - sudo apt-get update - sudo apt-get install ninja-build lcov - sudo apt-get install libhdf5-dev libsz2 libboost-all-dev libeigen3-dev libopencv-dev - sudo apt-get install libxtensor-dev - - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - submodules: true - - - name: Build for code coverage - run: | - CMAKE_OPTIONS=( - -GNinja - -DHIGHFIVE_TEST_BOOST:BOOL=ON - -DHIGHFIVE_TEST_EIGEN:BOOL=ON - -DHIGHFIVE_TEST_OPENCV:BOOL=ON - -DHIGHFIVE_TEST_XTENSOR:BOOL=ON - -DHIGHFIVE_TEST_SINGLE_INCLUDES=ON - -DHIGHFIVE_BUILD_DOCS:BOOL=FALSE - -DCMAKE_CXX_FLAGS="-coverage -O0" - ) - source $GITHUB_WORKSPACE/.github/build.sh - - - name: Test for code coverage - run: | - lcov --capture --initial --directory . --no-external --output-file build/coverage-base.info - (cd build; cmake --build . --target test) - lcov --capture --directory . --no-external --output-file build/coverage-run.info - (cd build; lcov --add-tracefile coverage-base.info --add-tracefile coverage-run.info --output-file coverage-combined.info) - - - uses: codecov/codecov-action@v3 - with: - files: ./build/coverage-combined.info - fail_ci_if_error: false - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index ff30bb97..00000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - pull_request: - branches: - - v2.x - - main - -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - build: - name: Build Documentation - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: 'recursive' - fetch-depth: 0 - - - name: Install dependencies - run: | - pkgs=( - doxygen - graphviz - libhdf5-dev - libboost-all-dev - libeigen3-dev - libxtensor-dev - ) - - sudo apt-get update - sudo apt-get install -y ${pkgs[@]} - - - name: Build documentation with CMake - run: | - CMAKE_OPTIONS=( - -DHIGHFIVE_UNIT_TESTS=OFF - ) - cmake -B build -S . "${CMAKE_OPTIONS[@]}" - cmake --build build --target doc - cp -r doc/poster build/doc/html/ - - - name: Upload artifact - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - uses: actions/upload-pages-artifact@v3 - with: - path: build/doc/html - - deploy: - name: Deploy to GitHub Pages - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/version_file.yml b/.github/workflows/version_file.yml deleted file mode 100644 index 55cf0f6f..00000000 --- a/.github/workflows/version_file.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: HighFive Check Version File - -on: - push: - branches: - - master - - main - - v2.x - pull_request: - branches: - - master - - main - - v2.x - -jobs: - CheckVersion: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - - name: "Install libraries" - run: | - sudo apt-get -qq update - sudo apt-get -qq install libhdf5-dev ninja-build - - - name: Build - run: | - # Will trigger `configure_file` for H5Version.hpp. - cmake -B build . - - - name: Test - run: | - # Check that the file hasn't changed, i.e. was updated - # after changing the version number. - ! git status | grep include/highfive/H5Version.hpp From a60b12b5a038f23ea669207ae820be3024a3cfb6 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Mon, 3 Mar 2025 22:25:08 +0100 Subject: [PATCH 11/13] rerun From 906bb09fff17704e42f8199eb10766b7d7b4ee72 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Mon, 3 Mar 2025 22:33:10 +0100 Subject: [PATCH 12/13] Revert "undo: remove unaffected CI." This reverts commit 36e801fb56dd5540dca6fff1151b3565c5382a87. --- .../check_doxygen_awesome_version.yml | 20 + .github/workflows/ci.yml | 390 ++++++++++++++++++ .github/workflows/clang_format.yml | 23 ++ .github/workflows/coverage.yml | 72 ++++ .github/workflows/gh-pages.yml | 78 ++++ .github/workflows/version_file.yml | 38 ++ 6 files changed, 621 insertions(+) create mode 100644 .github/workflows/check_doxygen_awesome_version.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/clang_format.yml create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/gh-pages.yml create mode 100644 .github/workflows/version_file.yml diff --git a/.github/workflows/check_doxygen_awesome_version.yml b/.github/workflows/check_doxygen_awesome_version.yml new file mode 100644 index 00000000..2e4df283 --- /dev/null +++ b/.github/workflows/check_doxygen_awesome_version.yml @@ -0,0 +1,20 @@ +name: Auto-update doxygen-awesome + +on: + workflow_dispatch: + schedule: + - cron: 0 2 * * 1 + +jobs: + check-for-updates: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + - name: Open PR if doxygen-awesome outdated. + run: | + + VERSION=$(doc/doxygen-awesome-css/update_doxygen_awesome.sh "$(mktemp -d)") + .github/create_submodule_update_pr.sh doxygen-awesome ${VERSION} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..0643302f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,390 @@ +name: HighFive_CI + +concurrency: + group: ${{ github.workflow }}#${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - master + - main + - v2.x + pull_request: + branches: + - master + - main + - v2.x + paths-ignore: + - '**.md' + - '**.rst' + - 'doc/**' + +env: + HOMEBREW_NO_AUTO_UPDATE: 1 # for reproducibility, dont autoupdate + BUILD_TYPE: RelWithDebInfo + INSTALL_DIR: install + +jobs: + + # Job testing compiling on several Ubuntu systems + MPI + # ========================================================= + # + # XTensor tests are run for conda/mamba and MacOS + Linux_MPI: + runs-on: ${{matrix.config.os}} + name: Linux_MPI (${{toJson(matrix.config)}}) + strategy: + matrix: + include: + - config: + os: ubuntu-24.04 + pkgs: '' + - config: + os: ubuntu-24.04 + pkgs: 'libboost-all-dev libopencv-dev' + flags: '-DHIGHFIVE_TEST_BOOST:Bool=ON -DHIGHFIVE_TEST_OPENCV:Bool=ON -GNinja' + - config: + os: ubuntu-latest + pkgs: 'libboost-all-dev libeigen3-dev libopencv-dev' + flags: '-DHIGHFIVE_TEST_BOOST:Bool=ON -DHIGHFIVE_TEST_EIGEN:Bool=ON -DHIGHFIVE_TEST_OPENCV:Bool=ON -GNinja' + - config: + os: ubuntu-24.04 + pkgs: 'libboost-all-dev' + flags: '-DCMAKE_CXX_STANDARD=17 -DHIGHFIVE_TEST_BOOST:Bool=ON' + - config: + os: ubuntu-22.04 + flags: '-DHIGHFIVE_TEST_BOOST=Off -DCMAKE_CXX_STANDARD=20 -DHIGHFIVE_HAS_CONCEPTS=On' + - config: + os: ubuntu-24.04 + flags: '-DHIGHFIVE_TEST_BOOST=Off -DCMAKE_CXX_STANDARD=20 -DHIGHFIVE_HAS_CONCEPTS=On' + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: "Setup MPI" + uses: mpi4py/setup-mpi@v1 + with: + mpi: openmpi + + - name: "Install libraries" + run: | + sudo apt-get -qq update + sudo apt-get -qq install libhdf5-openmpi-dev libsz2 ninja-build ${{ matrix.config.pkgs }} + + - name: Build + run: | + CMAKE_OPTIONS=(-DHDF5_PREFER_PARALLEL:BOOL=ON ${{ matrix.config.flags }}) + source $GITHUB_WORKSPACE/.github/build.sh + + - name: Test + working-directory: ${{github.workspace}}/build + run: | + ctest -j2 --output-on-failure -C $BUILD_TYPE + + - name: Test No HDF5 Diagnositics + working-directory: ${{github.workspace}}/build + run: | + ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG + + - name: Examples + working-directory: ${{github.workspace}}/build/src/examples + run: $GITHUB_WORKSPACE/.github/run_examples.sh + + # Job testing several versions of hdf5 + # =================================================== + Linux_HDF5_Versions: + runs-on: ubuntu-latest + strategy: + matrix: + hdf5_version : [ hdf5-1_8_23, hdf5-1_10_11, hdf5-1_12_3, hdf5_1.14.6 ] + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: "Install libraries" + run: | + sudo apt-get -qq update + sudo apt-get -qq install ninja-build libsz2 zlib1g-dev libboost-all-dev + + - name: Build HDF5 + run: | + wget https://github.com/HDFGroup/hdf5/archive/refs/tags/${{ matrix.hdf5_version }}.tar.gz --output-document hdf5.tar.gz + tar xf hdf5.tar.gz + mkdir -p hdf5-${{ matrix.hdf5_version }}/BUILD && cd hdf5-${{ matrix.hdf5_version }}/BUILD + cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.hdf5_version }} -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DUSE_LIBAEC=ON -DHDF5_BUILD_EXAMPLES=OFF -DBUILD_STATIC_LIBS=OFF -DBUILD_TESTING=OFF + ninja && ninja install + + - name: Build + run: | + CMAKE_OPTIONS=( + -GNinja + -DHDF5_ROOT=$HOME/${{ matrix.hdf5_version }} + ) + source $GITHUB_WORKSPACE/.github/build.sh + + - name: Test + working-directory: ${{github.workspace}}/build + run: | + ctest -j2 --output-on-failure -C $BUILD_TYPE + + - name: Test No HDF5 Diagnositics + working-directory: ${{github.workspace}}/build + run: | + ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG + + - name: Examples + working-directory: ${{github.workspace}}/build/src/examples + run: $GITHUB_WORKSPACE/.github/run_examples.sh + + # Job testing several compilers on a stable Linux + # ==================================================== + Linux_Compilers: + runs-on: ${{matrix.os}} + env: ${{ matrix.env }} + strategy: + matrix: + os: [ "ubuntu-24.04" ] + env: [ + {CC: clang-18, CXX: clang++-18, pkgs: "clang-18"}, + {CC: gcc-9, CXX: g++-9, pkgs: "gcc-9 g++-9"}, + {CC: gcc-14, CXX: g++-14, pkgs: "gcc-14 g++-14"}, + ] + + include: + - os: "ubuntu-22.04" + env: + CC: clang-11 + CXX: clang++-11 + pkgs: clang-11 + + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: "Install libraries" + run: | + sudo apt-get -qq update + sudo apt-get -qq install ${pkgs} + sudo apt-get -qq install libboost-all-dev libhdf5-dev libsz2 ninja-build + + - name: Build + run: | + CMAKE_OPTIONS=(-DHIGHFIVE_TEST_BOOST=ON -GNinja) + source $GITHUB_WORKSPACE/.github/build.sh + + - name: Test + working-directory: ${{github.workspace}}/build + run: | + ctest -j2 --output-on-failure -C $BUILD_TYPE + + - name: Test No HDF5 Diagnositics + working-directory: ${{github.workspace}}/build + run: | + ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG + + - name: Examples + working-directory: ${{github.workspace}}/build/src/examples + run: $GITHUB_WORKSPACE/.github/run_examples.sh + + # Job running unit-test with sanitizers + # ===================================== + Linux_Sanitizers: + runs-on: ubuntu-24.04 + strategy: + matrix: + env: [ + {CC: clang, CXX: clang++, HIGHFIVE_SANITIZER: address}, + {CC: clang, CXX: clang++, HIGHFIVE_SANITIZER: undefined}, + {CC: gcc, CXX: g++, HIGHFIVE_GLIBCXX_ASSERTIONS: On}, + ] + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: "Install libraries" + run: | + sudo apt-get -qq update + sudo apt-get -qq install boost1.83 libeigen3-dev libhdf5-dev libsz2 ninja-build + + - name: Build + run: | + CMAKE_OPTIONS=( + -GNinja + -DHIGHFIVE_TEST_BOOST:BOOL=ON + -DHIGHFIVE_TEST_BOOST_SPAN:BOOL=ON + -DHIGHFIVE_TEST_EIGEN:BOOL=ON + -DHIGHFIVE_BUILD_DOCS:BOOL=FALSE + -DHIGHFIVE_GLIBCXX_ASSERTIONS=${HIGHFIVE_GLIBCXX_ASSERTIONS:-OFF} + -DHIGHFIVE_SANITIZER=${HIGHFIVE_SANITIZER:-OFF} + ) + source $GITHUB_WORKSPACE/.github/build.sh + + - name: Test + working-directory: ${{github.workspace}}/build + run: | + ctest -j2 --output-on-failure -C $BUILD_TYPE + + - name: Test No HDF5 Diagnositics + working-directory: ${{github.workspace}}/build + run: | + ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG + + - name: Examples + working-directory: ${{github.workspace}}/build/src/examples + run: $GITHUB_WORKSPACE/.github/run_examples.sh + + + # Job to check using HighFive from other CMake projects + # ===================================================== + CMake_Project: + runs-on: ubuntu-24.04 + strategy: + matrix: + parallelism: [ serial, parallel ] + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: "Update Ubuntu" + run: | + sudo apt-get -qq update + + - name: "Install common libraries" + run: | + sudo apt-get -qq install libboost-all-dev libsz2 ninja-build + + - name: "Install serial HDF5" + if: matrix.parallelism == 'serial' + run: | + sudo apt-get -qq install libhdf5-dev + + + - name: "Install parallel HDF5" + if: matrix.parallelism == 'parallel' + run: | + sudo apt-get -qq install libhdf5-openmpi-dev + + - name: "CMake Project Integration" + run: bash tests/cmake_integration/test_cmake_integration.sh + + + # Job checking the benchmarks work + # ================================ + Benchmarks: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: "Install libraries" + run: | + sudo apt -y update + sudo apt -y install --no-install-recommends libhdf5-dev pkg-config + + - name: "Build benchmarks" + working-directory: ${{github.workspace}}/src/benchmarks + run: make + + - run: time ${{github.workspace}}/src/benchmarks/highfive_bench + + + # Job testing in OSX + # ================== + OSX: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ "macOS-14" ] + cxxstd: ["14", "17", "20"] + + include: + - os: "macOS-13" + cxxstd: "20" + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: "Install libraries (OSX)" + run: brew install boost eigen hdf5 ninja xtensor + + - name: Build + run: | + CMAKE_OPTIONS=( + -GNinja + -DHIGHFIVE_TEST_BOOST:BOOL=ON + -DHIGHFIVE_TEST_EIGEN:BOOL=ON + -DHIGHFIVE_TEST_XTENSOR:BOOL=ON + -DHIGHFIVE_BUILD_DOCS:BOOL=FALSE + -DCMAKE_CXX_STANDARD=${{matrix.cxxstd}} + ) + source $GITHUB_WORKSPACE/.github/build.sh + + - name: Test + working-directory: ${{github.workspace}}/build + run: | + ctest -j2 --output-on-failure -C $BUILD_TYPE + + - name: Test No HDF5 Diagnositics + working-directory: ${{github.workspace}}/build + run: | + ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG + + - name: Examples + working-directory: ${{github.workspace}}/build/src/examples + run: $GITHUB_WORKSPACE/.github/run_examples.sh + + + # Job testing in Windows + # ====================== + Windows: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ "windows-2019", "windows-2022"] + cxxstd: ["14", "17", "20"] + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - uses: mamba-org/setup-micromamba@v1 + with: + environment-file: .github/mamba_env.yaml + environment-name: win-test + + - name: Build + shell: bash -l {0} + run: | + CMAKE_OPTIONS=( + -DCMAKE_CXX_STANDARD=${{matrix.cxxstd}} + -DHIGHFIVE_UNIT_TESTS=ON + -DHIGHFIVE_TEST_BOOST:BOOL=ON + -DHIGHFIVE_TEST_EIGEN:BOOL=ON + -DHIGHFIVE_TEST_XTENSOR:BOOL=ON + ) + source $GITHUB_WORKSPACE/.github/build.sh + + - name: Test + working-directory: ${{github.workspace}}/build + shell: bash -l {0} + run: | + ctest -j2 --output-on-failure -C $BUILD_TYPE + + - name: Test No HDF5 Diagnositics + working-directory: ${{github.workspace}}/build + shell: bash -l {0} + run: | + ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml new file mode 100644 index 00000000..c8257b44 --- /dev/null +++ b/.github/workflows/clang_format.yml @@ -0,0 +1,23 @@ +name: ClangFormat + +concurrency: + group: ${{ github.workflow }}#${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + branches: + - master + - main + - v2.x + +jobs: + Code_Format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Run clang-format + run: | + bash bin/format.sh diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..df075c33 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,72 @@ +name: Coverage + +concurrency: + group: ${{ github.workflow }}#${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - master + - main + - v2.x + pull_request: + branches: + - master + - main + - v2.x + paths-ignore: + - '**.md' + - '**.rst' + - 'doc/**' + +env: + BUILD_TYPE: RelWithDebInfo + INSTALL_DIR: install + +jobs: + # Job producing code coverage report + # ================================== + Code_coverage: + runs-on: ubuntu-22.04 + + steps: + - name: "Install libraries" + run: | + sudo apt-get update + sudo apt-get install ninja-build lcov + sudo apt-get install libhdf5-dev libsz2 libboost-all-dev libeigen3-dev libopencv-dev + sudo apt-get install libxtensor-dev + + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + submodules: true + + - name: Build for code coverage + run: | + CMAKE_OPTIONS=( + -GNinja + -DHIGHFIVE_TEST_BOOST:BOOL=ON + -DHIGHFIVE_TEST_EIGEN:BOOL=ON + -DHIGHFIVE_TEST_OPENCV:BOOL=ON + -DHIGHFIVE_TEST_XTENSOR:BOOL=ON + -DHIGHFIVE_TEST_SINGLE_INCLUDES=ON + -DHIGHFIVE_BUILD_DOCS:BOOL=FALSE + -DCMAKE_CXX_FLAGS="-coverage -O0" + ) + source $GITHUB_WORKSPACE/.github/build.sh + + - name: Test for code coverage + run: | + lcov --capture --initial --directory . --no-external --output-file build/coverage-base.info + (cd build; cmake --build . --target test) + lcov --capture --directory . --no-external --output-file build/coverage-run.info + (cd build; lcov --add-tracefile coverage-base.info --add-tracefile coverage-run.info --output-file coverage-combined.info) + + - uses: codecov/codecov-action@v3 + with: + files: ./build/coverage-combined.info + fail_ci_if_error: false + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..ff30bb97 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,78 @@ +name: Documentation + +on: + push: + branches: + - main + pull_request: + branches: + - v2.x + - main + +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + name: Build Documentation + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: 'recursive' + fetch-depth: 0 + + - name: Install dependencies + run: | + pkgs=( + doxygen + graphviz + libhdf5-dev + libboost-all-dev + libeigen3-dev + libxtensor-dev + ) + + sudo apt-get update + sudo apt-get install -y ${pkgs[@]} + + - name: Build documentation with CMake + run: | + CMAKE_OPTIONS=( + -DHIGHFIVE_UNIT_TESTS=OFF + ) + cmake -B build -S . "${CMAKE_OPTIONS[@]}" + cmake --build build --target doc + cp -r doc/poster build/doc/html/ + + - name: Upload artifact + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + uses: actions/upload-pages-artifact@v3 + with: + path: build/doc/html + + deploy: + name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/version_file.yml b/.github/workflows/version_file.yml new file mode 100644 index 00000000..55cf0f6f --- /dev/null +++ b/.github/workflows/version_file.yml @@ -0,0 +1,38 @@ +name: HighFive Check Version File + +on: + push: + branches: + - master + - main + - v2.x + pull_request: + branches: + - master + - main + - v2.x + +jobs: + CheckVersion: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: "Install libraries" + run: | + sudo apt-get -qq update + sudo apt-get -qq install libhdf5-dev ninja-build + + - name: Build + run: | + # Will trigger `configure_file` for H5Version.hpp. + cmake -B build . + + - name: Test + run: | + # Check that the file hasn't changed, i.e. was updated + # after changing the version number. + ! git status | grep include/highfive/H5Version.hpp From bb68f7da461ba230cb3085ba04084a065f526f32 Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Mon, 3 Mar 2025 22:33:20 +0100 Subject: [PATCH 13/13] Revert "undo: trigger on every push." This reverts commit fa8e68bb6ef6e426e66bf1351c916c2c7d626000. --- .github/workflows/integration_trigger.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/integration_trigger.yml b/.github/workflows/integration_trigger.yml index 055c5309..06f57302 100644 --- a/.github/workflows/integration_trigger.yml +++ b/.github/workflows/integration_trigger.yml @@ -5,9 +5,6 @@ on: branches: - main - v2.x - pull_request: - branches: - - main jobs: merge-PR: