diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:28:21 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:28:21 (GMT) |
commit | ca0c0c3dc83acb7261e607cfee3b3ef04d167188 (patch) | |
tree | 6aa9407c7a4cb1bd10975205c14ff8b1ce3f0d5e /.github | |
parent | 636cba89e605644c8f094fcc7f951c70cd895a39 (diff) | |
download | hdf5-ca0c0c3dc83acb7261e607cfee3b3ef04d167188.zip hdf5-ca0c0c3dc83acb7261e607cfee3b3ef04d167188.tar.gz hdf5-ca0c0c3dc83acb7261e607cfee3b3ef04d167188.tar.bz2 |
Merge of clang-format changes from develop
Diffstat (limited to '.github')
-rw-r--r-- | .github/CODEOWNERS | 42 | ||||
-rw-r--r-- | .github/workflows/clang-format-check.yml | 16 | ||||
-rw-r--r-- | .github/workflows/main.yml | 62 | ||||
-rw-r--r-- | .github/workflows/pr-check.yml | 134 |
4 files changed, 250 insertions, 4 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..31b194f --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,42 @@ +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. + +# These owners will be the default owners for everything in the repo. +* @lrknox + +# Order is important. The last matching pattern has the most precedence. +# So if a pull request only touches javascript files, only these owners +# will be requested to review. +*.cmake @byrnHDF +CMakeLists.txt @byrnHDF +CMakeTests.* @byrnHDF + +/bin/ @lrknox @derobins @byrnHDF + +/c++/ bmribler@hdfgroup.org + +/config/ @lrknox @derobins @byrnHDF + +/doc/ @gnuoyd mainzer@hdfgroup.org + +/examples/ @lrknox @derobins bljones@hdfgroup.org + +/fortran/ @brtnfld @epourmal + +/hl/ bmribler@hdfgroup.org + +/java/ @jhendersonHDF @byrnHDF + +/m4/ @lrknox @derobins + +/release_docs/ @lrknox bljones@hdfgroup.org @byrnHDF + +/src/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup mainzer@hdfgroup.org + +/test/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup mainzer@hdfgroup.org + +/testpar/ @jhendersonHDF @rawarren mainzer@hdfgroup.org + +/tools/ @byrnHDF + +/utils/ @lrknox @byrnHDF diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml new file mode 100644 index 0000000..5b5222b --- /dev/null +++ b/.github/workflows/clang-format-check.yml @@ -0,0 +1,16 @@ +name: clang-format Check +on: [push, pull_request] +jobs: + formatting-check: + name: Formatting Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run clang-format style check for C programs. + uses: DoozyX/clang-format-lint-action@v0.8 + with: + source: '.' + extensions: 'c,h,cpp' + clangFormatVersion: 10 + style: file + exclude: './config ./hl/src/H5LTanalyze.c' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 60e21c7..355e2e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,6 @@ name: hdf5 dev CI on: push: branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ] - pull_request: - branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -14,7 +12,7 @@ jobs: strategy: # fail-fast: false matrix: - name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "macOS Latest Clang"] + name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"] include: - name: "Windows Latest MSVC" artifact: "Windows-MSVC.tar.xz" @@ -27,16 +25,47 @@ jobs: artifact: "Linux.tar.xz" os: ubuntu-latest build_type: "Release" + cpp: ON fortran: OFF + parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" - name: "macOS Latest Clang" artifact: "macOS.tar.xz" os: macos-latest build_type: "Release" + cpp: ON fortran: OFF + parallel: OFF toolchain: "config/toolchain/clang.cmake" generator: "-G Ninja" + - name: "Ubuntu Debug GCC" + artifact: "LinuxDBG.tar.xz" + os: ubuntu-latest + build_type: "Debug" + cpp: ON + fortran: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "Ubuntu Autotools GCC" + artifact: "Linux.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: enable + fortran: enable + parallel: disable + toolchain: "" + generator: "autogen" +# - name: "Ubuntu Parallel GCC" +# artifact: "LinuxPar.tar.xz" +# os: ubuntu-latest +# build_type: "Release" +# cpp: OFF +# fortran: OFF +# parallel: ON +# toolchain: "config/toolchain/GCC.cmake" +# generator: "-G Ninja" name: ${{ matrix.name }} # The type of runner that the job will run on @@ -47,6 +76,9 @@ jobs: - name: Install Dependencies (Linux) run: sudo apt-get install ninja-build if: matrix.os == 'ubuntu-latest' + - name: Install Autotools Dependencies (Linux) + run: sudo apt-get install automake autoconf libtool libtool-bin + if: matrix.generator == 'autogen' - name: Install Dependencies (Windows) run: choco install ninja if: matrix.os == 'windows-latest' @@ -64,17 +96,39 @@ jobs: - 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" + $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java + shell: bash + - 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_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE + 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_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $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/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..e3b9d9b --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,134 @@ +name: 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 ] + +# 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"] + include: + - name: "Windows Latest MSVC" + artifact: "Windows-MSVC.tar.xz" + os: windows-latest + build_type: "Release" + toolchain: "" + fortran: OFF + generator: "-G \"Visual Studio 16 2019\" -A x64" + - name: "Ubuntu Latest GCC" + artifact: "Linux.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: ON + fortran: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "macOS Latest Clang" + artifact: "macOS.tar.xz" + os: macos-latest + build_type: "Release" + cpp: ON + fortran: OFF + parallel: OFF + toolchain: "config/toolchain/clang.cmake" + generator: "-G Ninja" + - name: "Ubuntu Debug GCC" + artifact: "LinuxDBG.tar.xz" + os: ubuntu-latest + build_type: "Debug" + cpp: ON + fortran: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "Ubuntu Autotools GCC" + artifact: "Linux.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: enable + fortran: enable + parallel: disable + toolchain: "" + generator: "autogen" +# - name: "Ubuntu Parallel GCC" +# artifact: "LinuxPar.tar.xz" +# os: ubuntu-latest +# build_type: "Release" +# cpp: OFF +# fortran: OFF +# parallel: ON +# toolchain: "config/toolchain/GCC.cmake" +# generator: "-G Ninja" + + name: ${{ matrix.name }} + # The type of runner that the job will run on + runs-on: ${{ matrix.os }} + + # 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-get install automake autoconf libtool libtool-bin + 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 "::set-env name=CXX::cl.exe" + echo "::set-env name=CC::cl.exe" + + # 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" + $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java + shell: bash + + - 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_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $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 |