summaryrefslogtreecommitdiffstats
path: root/.github/workflows/mingw-cmake.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/mingw-cmake.yml')
-rw-r--r--.github/workflows/mingw-cmake.yml91
1 files changed, 91 insertions, 0 deletions
diff --git a/.github/workflows/mingw-cmake.yml b/.github/workflows/mingw-cmake.yml
new file mode 100644
index 0000000..4761318
--- /dev/null
+++ b/.github/workflows/mingw-cmake.yml
@@ -0,0 +1,91 @@
+name: hdf5 dev CMake MinGW
+
+on:
+ workflow_call:
+ inputs:
+ build_mode:
+ description: "release vs. debug build"
+ required: true
+ type: string
+ shared:
+ description: "shared true/false"
+ required: true
+ type: string
+ netcdf:
+ description: "netcdf true/false"
+ required: true
+ type: string
+
+permissions:
+ contents: read
+
+jobs:
+ mingw_build_and_test:
+ name: "mingw-${{ inputs.build_mode }}-NC=${{ inputs.netcdf }}"
+ if: "!contains(github.event.head_commit.message, 'skip-ci')"
+ runs-on: ubuntu-latest
+ steps:
+ - name: Get Sources
+ uses: actions/checkout@v4.1.1
+
+ - name: Install Dependencies
+ shell: bash
+ run: |
+ sudo apt update
+ sudo apt-get install -y ninja-build libtirpc-dev graphviz
+
+ - name: Install MinGW
+ uses: egor-tensin/setup-mingw@v2
+ with:
+ platform: x64
+
+ - name: Install Doxygen
+ uses: ssciwr/doxygen-install@v1
+ with:
+ version: "1.9.7"
+
+ - name: CMake Configure
+ shell: bash
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
+ -G Ninja \
+ --log-level=VERBOSE \
+ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
+ -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/config/toolchain/mingw64.cmake \
+ -DBUILD_SHARED_LIBS:BOOL=${{ inputs.shared }} \
+ -DHDF4_BUILD_EXAMPLES:BOOL=ON \
+ -DBUILD_JPEG_WITH_PIC:BOOL=ON \
+ -DHDF4_ENABLE_NETCDF:BOOL=${{ inputs.netcdf }} \
+ -DHDF4_BUILD_FORTRAN:BOOL=OFF \
+ -DHDF4_BUILD_JAVA:BOOL=OFF \
+ -DHDF4_BUILD_DOC:BOOL=ON \
+ -DJPEG_USE_LOCALCONTENT:BOOL=OFF \
+ -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \
+ -DZLIB_USE_LOCALCONTENT:BOOL=OFF \
+ -DHDF4_PACK_EXAMPLES:BOOL=ON \
+ -DHDF4_PACKAGE_EXTLIBS:BOOL=ON \
+ $GITHUB_WORKSPACE
+
+ - name: CMake Build
+ shell: bash
+ run: |
+ cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: CMake Run Tests
+ shell: bash
+ run: |
+ ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
+ if: false
+
+ - name: CMake Package
+ shell: bash
+ run: |
+ cpack -C ${{ inputs.build_mode }} -V
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: List files in the space
+ run: |
+ ls -l ${{ runner.workspace }}/build