summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-04 21:36:52 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-04 21:36:52 (GMT)
commit30c7264c2ca0f169b099b6ebbf13c5bd71652ebc (patch)
tree1a92edfa20e5e6dfe467b002227220c7f9d61cfd /.github
parent6b71d6dc9453e8f94ac82732496ee59ca6495587 (diff)
downloadhdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.zip
hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.gz
hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.bz2
CMake and script changes for clang-format
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/clang-format-check.yml16
-rw-r--r--.github/workflows/main.yml60
2 files changed, 74 insertions, 2 deletions
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml
new file mode 100644
index 0000000..e18c5b1
--- /dev/null
+++ b/.github/workflows/clang-format-check.yml
@@ -0,0 +1,16 @@
+name: clang-format Check
+on: [push]
+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..936a826 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,7 +14,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 +27,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 +78,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 +98,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