From ec3737ab696e76574edee53cd137bf73de69aa2c Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:21:27 -0700 Subject: GitHub workflow cleanup (#2047) * Cleans up main GitHub workflow(s) * Combines main.yml and pr-check.yml, which differed trivially * Reduces config redundancy via proper use of the matrix scheme * Adds build-only configs for: - Version 1.6 default API - No deprecated symbols - Parallel HDF5 * The -Werror config was converted to build-only * Makes the naming scheme more uniform * Spaces out the code and adds comments * Typo fix * Fix mirror VFD CMake configure typo * Debugging hack * Undo debug hack and fix CMake build mode * Set CC=mpicc for parallel builds * Another attempt to fix parallel builds * Updates comments in main.yml * Fixes a v16 API bug in the mirror VFD test code * Committing clang-format changes * Added checks for v1.8 - 1.12 APIs * Manually specify Windows configs Java debug builds time out when running tests on Windows. We'll disable them in debub mode while we investigate. * Revert "Manually specify Windows configs" This reverts commit d710d8d21990a57084841e82bd9f7e7d9f53a244. * Skip Debug Windows configs while we investigate Java H5L timeouts Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 524 ++++++++++++++++++++++++++--------------- .github/workflows/pr-check.yml | 281 ---------------------- test/mirror_vfd.c | 4 +- 3 files changed, 334 insertions(+), 475 deletions(-) delete mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b062ce3..f75378f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,279 +4,419 @@ name: hdf5 dev CI on: workflow_dispatch: push: + pull_request: branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ] paths-ignore: - - '.github/CODEOWNERS' - - '.github/FUNDING.yml' - - 'doc/**' - - 'release_docs/**' - - 'ACKNOWLEDGEMENTS' - - 'COPYING**' - - '**.md' + - '.github/CODEOWNERS' + - '.github/FUNDING.yml' + - 'doc/**' + - 'release_docs/**' + - 'ACKNOWLEDGEMENTS' + - 'COPYING**' + - '**.md' -# A workflow run is made up of one or more jobs that can run sequentially or in parallel +# A workflow run is made up of one or more jobs that can run sequentially or +# in parallel. We just have one job, but the matrix items defined below will +# run in parallel. jobs: - # This workflow contains a single job called "build" - build: + + # A workflow that builds the library and runs all the tests + build_and_test: + strategy: -# fail-fast: false + + # The current matrix has three dimensions: + # + # * config name + # * thread-safety on/off + # * release vs. debug build + # + # Most configuration information is added via the 'include' mechanism, + # which will append the key-value pairs in the configuration where the + # names match. + matrix: - name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Ubuntu Debug Autotools GCC", "-Werror Ubuntu Debug Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"] + + name: + - "Windows MSVC CMake" + - "Ubuntu gcc CMake" + - "Ubuntu gcc Autotools" + - "Ubuntu gcc Autotools parallel (build only)" + - "MacOS Clang CMake" + + thread_safety: + - enabled: true + text: " TS" + - enabled: false + text: "" + + build_mode: + - text: " REL" + cmake: "Release" + autotools: "production" + - text: " DBG" + cmake: "Debug" + autotools: "debug" + + # This is where we list the bulk of the options for each configuration. + # The key-value pair values are usually appropriate for being CMake or + # Autotools configure values, so be aware of that. + include: - - name: "Windows Latest MSVC" - artifact: "Windows-MSVC.tar.xz" + + # Windows w/ MSVC + CMake + # + # No Fortran, parallel, or VFDs that rely on POSIX things + - name: "Windows MSVC CMake" os: windows-2022 - build_type: "Release" toolchain: "" cpp: ON fortran: OFF java: ON - ts: OFF - hl: ON parallel: OFF mirror_vfd: OFF direct_vfd: OFF generator: "-G \"Visual Studio 17 2022\" -A x64" - flags: "" - - name: "Ubuntu Latest GCC" - artifact: "Linux.tar.xz" + run_tests: true + + # Linux (Ubuntu) w/ gcc + CMake + # + # We might think about adding Clang, but MacOS already tests that + # so it's not critical + - name: "Ubuntu gcc CMake" os: ubuntu-latest - build_type: "Release" cpp: ON fortran: ON java: ON - ts: OFF - hl: ON parallel: OFF mirror_vfd: ON direct_vfd: ON toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" + run_tests: true + + # Linux (Ubuntu) w/ gcc + Autotools + # + # Keep this identical to the CMake configs. Note the difference in + # the values. + - name: "Ubuntu gcc Autotools" + os: ubuntu-latest + cpp: enable + fortran: enable + java: enable + parallel: disable + mirror_vfd: enable + direct_vfd: enable + deprec_sym: enable + default_api: v114 + toolchain: "" + generator: "autogen" flags: "" - - name: "macOS Latest Clang" - artifact: "macOS.tar.xz" + run_tests: true + + # Parallel Linux (Ubuntu) w/ gcc + Autotools + # + # The GitHub runners are inadequate for running parallel HDF5 tests, + # so we catch most issues in daily testing. What we have here is just + # a compile check to make sure nothing obvious is broken. + - name: "Ubuntu gcc Autotools parallel (build only)" + os: ubuntu-latest + cpp: disable + fortran: enable + java: disable + parallel: enable + mirror_vfd: disable + direct_vfd: disable + deprec_sym: enable + default_api: v114 + toolchain: "" + generator: "autogen" + flags: "CC=mpicc" + run_tests: false + + # MacOS w/ Clang + CMake + # + # We could also build with the Autotools via brew installing them, + # but that seems unnecessary + - name: "MacOS Clang CMake" os: macos-latest - build_type: "Release" cpp: ON fortran: OFF java: ON - ts: OFF - hl: ON parallel: OFF mirror_vfd: ON direct_vfd: OFF toolchain: "config/toolchain/clang.cmake" generator: "-G Ninja" - flags: "" - - name: "Ubuntu Debug GCC" - artifact: "LinuxDBG.tar.xz" - os: ubuntu-latest - build_type: "Debug" - cpp: ON - fortran: OFF - java: OFF - ts: OFF - hl: ON - parallel: OFF - mirror_vfd: ON - direct_vfd: ON - toolchain: "config/toolchain/GCC.cmake" - generator: "-G Ninja" - flags: "" - - name: "Ubuntu Autotools GCC" - artifact: "LinuxA.tar.xz" + run_tests: true + + + # + # SPECIAL AUTOTOOLS BUILDS + # + # These do not run tests and are not built into the matrix and instead + # become NEW configs as their name would clobber one of the matrix + # names (so make sure the names are UNIQUE). + # + + - name: "Ubuntu gcc Autotools v1.6 default API (build only)" os: ubuntu-latest - build_type: "production" cpp: enable fortran: enable java: enable - ts: disable - hl: enable parallel: disable mirror_vfd: enable direct_vfd: enable + deprec_sym: enable + default_api: v16 toolchain: "" generator: "autogen" flags: "" - - name: "Ubuntu Debug Autotools GCC" - artifact: "LinuxA.tar.xz" + run_tests: false + thread_safety: + - enabled: false + text: "" + build_mode: + - text: "DBG" + cmake: "Debug" + autotools: "debug" + + - name: "Ubuntu gcc Autotools v1.8 default API (build only)" os: ubuntu-latest - build_type: "debug" cpp: enable fortran: enable java: enable - ts: disable - hl: enable parallel: disable mirror_vfd: enable direct_vfd: enable + deprec_sym: enable + default_api: v18 toolchain: "" generator: "autogen" flags: "" - # Build that ensures no new warnings sneak into the library. - - name: "-Werror Ubuntu Debug Autotools GCC" - artifact: "LinuxA.tar.xz" + run_tests: false + thread_safety: + - enabled: false + text: "" + build_mode: + - text: "DBG" + cmake: "Debug" + autotools: "debug" + + - name: "Ubuntu gcc Autotools v1.10 default API (build only)" os: ubuntu-latest - build_type: "debug" cpp: enable - fortran: disable - java: disable - ts: disable - hl: enable + fortran: enable + java: enable parallel: disable - mirror_vfd: disable + mirror_vfd: enable direct_vfd: enable + deprec_sym: enable + default_api: v110 toolchain: "" generator: "autogen" - flags: "CFLAGS=-Werror" -# Threadsafe runs - - name: "Windows TS MSVC" - artifact: "Windows-MSVCTS.tar.xz" - os: windows-2019 - build_type: "Release" - toolchain: "" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: OFF - direct_vfd: OFF - generator: "-G \"Visual Studio 16 2019\" -A x64" flags: "" - - name: "Ubuntu TS GCC" - artifact: "LinuxTS.tar.xz" + run_tests: false + thread_safety: + - enabled: false + text: "" + build_mode: + - text: "DBG" + cmake: "Debug" + autotools: "debug" + + - name: "Ubuntu gcc Autotools v1.12 default API (build only)" os: ubuntu-latest - build_type: "Release" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: ON - direct_vfd: ON - toolchain: "config/toolchain/GCC.cmake" - generator: "-G Ninja" - flags: "" - - name: "macOS TS Clang" - artifact: "macOSTS.tar.xz" - os: macos-latest - build_type: "Release" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: ON - direct_vfd: OFF - toolchain: "config/toolchain/clang.cmake" - generator: "-G Ninja" + cpp: enable + fortran: enable + java: enable + parallel: disable + mirror_vfd: enable + direct_vfd: enable + deprec_sym: enable + default_api: v112 + toolchain: "" + generator: "autogen" flags: "" - - name: "TS Debug GCC" - artifact: "LinuxTSDBG.tar.xz" + run_tests: false + thread_safety: + - enabled: false + text: "" + build_mode: + - text: "DBG" + cmake: "Debug" + autotools: "debug" + + - name: "Ubuntu gcc Autotools no deprecated symbols (build only)" os: ubuntu-latest - build_type: "Debug" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: ON - direct_vfd: ON - toolchain: "config/toolchain/GCC.cmake" - generator: "-G Ninja" + cpp: enable + fortran: enable + java: enable + parallel: disable + mirror_vfd: enable + direct_vfd: enable + deprec_sym: disable + default_api: v114 + toolchain: "" + generator: "autogen" flags: "" - - name: "TS Autotools GCC" - artifact: "LinuxATS.tar.xz" + run_tests: false + thread_safety: + - enabled: false + text: "" + build_mode: + - text: "DBG" + cmake: "Debug" + autotools: "debug" + + - name: "Ubuntu gcc Autotools -Werror (build only)" os: ubuntu-latest - build_type: "production" - cpp: disable + cpp: enable fortran: disable java: disable - ts: enable - hl: disable parallel: disable mirror_vfd: enable direct_vfd: enable + deprec_sym: enable + default_api: v114 toolchain: "" generator: "autogen" - flags: "" + flags: "CFLAGS=-Werror" + run_tests: false + thread_safety: + - enabled: false + text: "" + build_mode: + - text: "DBG" + cmake: "Debug" + autotools: "debug" + + # Sets the job's name from the properties + name: "${{ matrix.name }}${{ matrix.build_mode.text }}${{ matrix.thread_safety.text }}" + + # Don't run the action if the commit message says to skip CI + if: "!contains(github.event.head_commit.message, 'skip-ci')" - name: ${{ matrix.name }} # The type of runner that the job will run on runs-on: ${{ matrix.os }} - if: "!contains(github.event.head_commit.message, 'skip-ci')" - + # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Install Dependencies (Linux) - run: sudo apt-get install ninja-build - if: matrix.os == 'ubuntu-latest' - - name: Install Autotools Dependencies (Linux) - run: | + + # + # SETUP + # + + - name: Install CMake Dependencies (Linux) + run: sudo apt-get install ninja-build + if: matrix.os == 'ubuntu-latest' + + - name: Install Autotools Dependencies (Linux, serial) + run: | sudo apt update sudo apt install automake autoconf libtool libtool-bin sudo apt install gcc-11 g++-11 gfortran-11 + echo "CC=gcc-11" >> $GITHUB_ENV + echo "CXX=g++-11" >> $GITHUB_ENV + echo "FC=gfortran-11" >> $GITHUB_ENV + if: (matrix.generator == 'autogen') && (matrix.parallel != 'enable') + + - name: Install Autotools Dependencies (Linux, parallel) + run: | + sudo apt update + sudo apt install automake autoconf libtool libtool-bin sudo apt install openmpi-bin openmpi-common - if: matrix.generator == 'autogen' - - name: Install Dependencies (Windows) - run: choco install ninja - if: matrix.os == 'windows-latest' - - name: Install Dependencies (macOS) - run: brew install ninja - if: matrix.os == 'macos-latest' - - name: Set environment for MSVC (Windows) - if: matrix.os == 'windows-latest' - run: | - # Set these env vars so cmake picks the correct compiler - echo "CXX=cl.exe" >> $GITHUB_ENV - echo "CC=cl.exe" >> $GITHUB_ENV + echo "CC=mpicc" >> $GITHUB_ENV + echo "FC=mpif90" >> $GITHUB_ENV + if: (matrix.generator == 'autogen') && (matrix.parallel == 'enable') + + - name: Install Dependencies (Windows) + run: choco install ninja + if: matrix.os == 'windows-latest' + + - name: Install Dependencies (macOS) + run: brew install ninja + if: matrix.os == 'macos-latest' + + - name: Set environment for MSVC (Windows) + run: | + # Set these environment variables so CMake picks the correct compiler + echo "CXX=cl.exe" >> $GITHUB_ENV + echo "CC=cl.exe" >> $GITHUB_ENV + if: matrix.os == 'windows-latest' - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v2 - - - name: Autotools Configure - if: matrix.generator == 'autogen' - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_type }} --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd - shell: bash - env: - CC: gcc-11 - CXX: g++-11 - FC: gfortran-11 - - - name: Configure - if: matrix.generator != 'autogen' - run: | - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DHDF5_ENABLE_MIRROR_VFD:BOOL={{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE - shell: bash - - - name: Autotools Build - if: matrix.generator == 'autogen' - run: make - working-directory: ${{ runner.workspace }}/build - - - name: Build - if: matrix.generator != 'autogen' - run: cmake --build . --config ${{ matrix.build_type }} - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Test - if: matrix.generator == 'autogen' - run: make check - working-directory: ${{ runner.workspace }}/build - - - name: Test - if: matrix.generator != 'autogen' - run: ctest --build . -C ${{ matrix.build_type }} -V - working-directory: ${{ runner.workspace }}/build + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v2 + + # + # AUTOTOOLS CONFIGURE + # + + - name: Autotools Configure + run: | + sh ./autogen.sh + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --${{ matrix.deprec_sym }}-deprecated-symbols --with-default-api-version=${{ matrix.default_api }} --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd + shell: bash + if: (matrix.generator == 'autogen') && (! matrix.thread_safe.enabled) + + - name: Autotools Configure (Thread-Safe) + run: | + sh ./autogen.sh + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --enable-shared --enable-threadsafe --disable-hl --${{ matrix.parallel }}-parallel --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd + shell: bash + if: (matrix.generator == 'autogen') && (matrix.thread_safe.enabled) + + # + # CMAKE CONFIGURE + # + + - name: CMake Configure + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE + shell: bash + if: (matrix.generator != 'autogen') && (! matrix.thread_safe.enabled) + + + - name: CMake Configure (Thread-Safe) + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_HL_LIB:BOOL=OFF -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE + shell: bash + if: (matrix.generator != 'autogen') && (matrix.thread_safe.enabled) + + # + # BUILD + # + + - name: Autotools Build + run: make + working-directory: ${{ runner.workspace }}/build + if: matrix.generator == 'autogen' + + - name: CMake Build + run: cmake --build . --config ${{ matrix.build_mode.cmake }} + working-directory: ${{ runner.workspace }}/build + if: matrix.generator != 'autogen' + + # + # RUN TESTS + # + + - name: Autotools Run Tests + run: make check + working-directory: ${{ runner.workspace }}/build + if: (matrix.generator == 'autogen') && (matrix.run_tests) + + - name: CMake Run Tests + run: ctest --build . -C ${{ matrix.build_mode.cmake }} -V + working-directory: ${{ runner.workspace }}/build + # Skip Debug MSVC while we investigate H5L Java test timeouts + if: (matrix.generator != 'autogen') && (matrix.run_tests) && ! ((matrix.name == 'Windows MSVC CMake') && (matrix.build_mode.cmake == 'Debug')) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml deleted file mode 100644 index c215eed..0000000 --- a/.github/workflows/pr-check.yml +++ /dev/null @@ -1,281 +0,0 @@ -name: PR hdf5 dev CI - -# Controls when the action will run. Triggers the workflow on push or pull request -on: - pull_request: - branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ] - paths-ignore: - - '.github/CODEOWNERS' - - '.github/FUNDING.yml' - - 'doc/**' - - 'release_docs/**' - - 'ACKNOWLEDGEMENTS' - - 'COPYING**' - - '**.md' - -# 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: - strategy: -# fail-fast: false - matrix: - name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Ubuntu Debug Autotools GCC", "-Werror Ubuntu Debug Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"] - include: - - name: "Windows Latest MSVC" - artifact: "Windows-MSVC.tar.xz" - os: windows-2022 - build_type: "Release" - toolchain: "" - cpp: ON - fortran: OFF - java: ON - ts: OFF - hl: ON - parallel: OFF - mirror_vfd: OFF - direct_vfd: OFF - generator: "-G \"Visual Studio 17 2022\" -A x64" - flags: "" - - name: "Ubuntu Latest GCC" - artifact: "Linux.tar.xz" - os: ubuntu-latest - build_type: "Release" - cpp: ON - fortran: ON - java: ON - ts: OFF - hl: ON - parallel: OFF - mirror_vfd: ON - direct_vfd: ON - toolchain: "config/toolchain/GCC.cmake" - generator: "-G Ninja" - flags: "" - - name: "macOS Latest Clang" - artifact: "macOS.tar.xz" - os: macos-latest - build_type: "Release" - cpp: ON - fortran: OFF - java: ON - ts: OFF - hl: ON - parallel: OFF - mirror_vfd: ON - direct_vfd: OFF - toolchain: "config/toolchain/clang.cmake" - generator: "-G Ninja" - flags: "" - - name: "Ubuntu Debug GCC" - artifact: "LinuxDBG.tar.xz" - os: ubuntu-latest - build_type: "Debug" - cpp: ON - fortran: OFF - java: OFF - ts: OFF - hl: ON - parallel: OFF - mirror_vfd: ON - direct_vfd: ON - toolchain: "config/toolchain/GCC.cmake" - generator: "-G Ninja" - flags: "" - - name: "Ubuntu Autotools GCC" - artifact: "LinuxA.tar.xz" - os: ubuntu-latest - build_type: "production" - cpp: enable - fortran: enable - java: enable - ts: disable - hl: enable - parallel: disable - mirror_vfd: enable - direct_vfd: enable - toolchain: "" - generator: "autogen" - flags: "" - - name: "Ubuntu Debug Autotools GCC" - artifact: "LinuxA.tar.xz" - os: ubuntu-latest - build_type: "debug" - cpp: enable - fortran: enable - java: enable - ts: disable - hl: enable - parallel: disable - mirror_vfd: enable - direct_vfd: enable - toolchain: "" - generator: "autogen" - flags: "" - # Build that ensures no new warnings sneak into the library. - - name: "-Werror Ubuntu Debug Autotools GCC" - artifact: "LinuxDBG.tar.xz" - os: ubuntu-latest - build_type: "debug" - cpp: enable - fortran: disable - java: disable - ts: disable - hl: enable - parallel: disable - mirror_vfd: disable - direct_vfd: enable - toolchain: "" - generator: "autogen" - flags: "CFLAGS=-Werror" -# Threadsafe runs - - name: "Windows TS MSVC" - artifact: "Windows-MSVCTS.tar.xz" - os: windows-2019 - build_type: "Release" - toolchain: "" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: OFF - direct_vfd: OFF - generator: "-G \"Visual Studio 16 2019\" -A x64" - flags: "" - - name: "Ubuntu TS GCC" - artifact: "LinuxTS.tar.xz" - os: ubuntu-latest - build_type: "Release" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: ON - direct_vfd: ON - toolchain: "config/toolchain/GCC.cmake" - generator: "-G Ninja" - flags: "" - - name: "macOS TS Clang" - artifact: "macOSTS.tar.xz" - os: macos-latest - build_type: "Release" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: ON - direct_vfd: OFF - toolchain: "config/toolchain/clang.cmake" - generator: "-G Ninja" - flags: "" - - name: "TS Debug GCC" - artifact: "LinuxTSDBG.tar.xz" - os: ubuntu-latest - build_type: "Debug" - cpp: OFF - fortran: OFF - java: OFF - ts: ON - hl: OFF - parallel: OFF - mirror_vfd: ON - direct_vfd: ON - toolchain: "config/toolchain/GCC.cmake" - generator: "-G Ninja" - flags: "" - - name: "TS Autotools GCC" - artifact: "LinuxATS.tar.xz" - os: ubuntu-latest - build_type: "production" - cpp: disable - fortran: disable - java: disable - ts: enable - hl: disable - parallel: disable - mirror_vfd: enable - direct_vfd: enable - toolchain: "" - generator: "autogen" - flags: "" - - name: ${{ matrix.name }} - # The type of runner that the job will run on - runs-on: ${{ matrix.os }} - if: "!contains(github.event.head_commit.message, 'skip-ci')" - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Install Dependencies (Linux) - run: sudo apt-get install ninja-build - if: matrix.os == 'ubuntu-latest' - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt update - sudo apt install automake autoconf libtool libtool-bin - sudo apt install gcc-11 g++-11 gfortran-11 - sudo apt install openmpi-bin openmpi-common - if: matrix.generator == 'autogen' - - name: Install Dependencies (Windows) - run: choco install ninja - if: matrix.os == 'windows-latest' - - name: Install Dependencies (macOS) - run: brew install ninja - if: matrix.os == 'macos-latest' - - name: Set environment for MSVC (Windows) - if: matrix.os == 'windows-latest' - run: | - # Set these env vars so cmake picks the correct compiler - echo "CXX=cl.exe" >> $GITHUB_ENV - echo "CC=cl.exe" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v2 - - - name: Autotools Configure - if: matrix.generator == 'autogen' - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_type }} --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd - shell: bash - env: - CC: gcc-11 - CXX: g++-11 - FC: gfortran-11 - - - name: Configure - if: matrix.generator != 'autogen' - run: | - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DHDF5_ENABLE_MIRROR_VFD:BOOL={{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE - shell: bash - - - name: Autotools Build - if: matrix.generator == 'autogen' - run: make - working-directory: ${{ runner.workspace }}/build - - - name: Build - if: matrix.generator != 'autogen' - run: cmake --build . --config ${{ matrix.build_type }} - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Test - if: matrix.generator == 'autogen' - run: make check - working-directory: ${{ runner.workspace }}/build - - - name: Test - if: matrix.generator != 'autogen' - run: ctest --build . -C ${{ matrix.build_type }} -V - working-directory: ${{ runner.workspace }}/build diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index 9a26c42..b4f4c2c 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -1464,8 +1464,8 @@ _create_chunking_ids(hid_t file_id, unsigned min_dset, unsigned max_dset, hsize_ FAIL_PUTS_ERROR(mesg); } - if ((dataset_ids[m] = H5Dcreate(file_id, dset_name, H5T_STD_I32BE, dataspace_ids[m], H5P_DEFAULT, - dcpl_id, H5P_DEFAULT)) < 0) { + if ((dataset_ids[m] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE, dataspace_ids[m], H5P_DEFAULT, + dcpl_id, H5P_DEFAULT)) < 0) { HDsnprintf(mesg, MIRR_MESG_SIZE, "unable to create dset ID %d\n", m); FAIL_PUTS_ERROR(mesg); } -- cgit v0.12