forked from HDFGroup/hdf5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add msys2 workflow for CMake (HDFGroup#4991)
Also updates CMake configure checks to build HDF5 w/ MSYS2
- Loading branch information
Showing
4 changed files
with
121 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: hdf5 dev CMake MSys2 CI | ||
|
||
# Triggers the workflow on a call from another workflow | ||
on: | ||
workflow_call: | ||
inputs: | ||
build_mode: | ||
description: "release vs. debug build" | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
CMake_build_and_test: | ||
|
||
# The type of runner that the job will run on | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- { icon: '⬛', sys: mingw32 } | ||
- { icon: '🟦', sys: mingw64 } | ||
- { icon: '🟨', sys: ucrt64 } | ||
- { icon: '🟧', sys: clang64 } | ||
name: ${{ matrix.icon }} MSYS2-${{ matrix.sys }}-${{ inputs.build_mode }} | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
|
||
steps: | ||
- name: '${{ matrix.icon }} Setup MSYS2' | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{matrix.sys}} | ||
update: true | ||
install: >- | ||
base-devel | ||
git | ||
gcc | ||
make | ||
development | ||
pacboy: >- | ||
toolchain:p | ||
cmake:p | ||
ninja:p | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf input | ||
- name: Get Sources | ||
uses: actions/[email protected] | ||
|
||
- name: CMake Configure | ||
run: | | ||
mkdir "${{ runner.workspace }}/build" | ||
cd "${{ runner.workspace }}/build" | ||
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ | ||
-G Ninja \ | ||
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ | ||
-DCMAKE_TOOLCHAIN_FILE="" \ | ||
-DHDF5_GENERATE_HEADERS=OFF \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DHDF5_ENABLE_ALL_WARNINGS=ON \ | ||
-DHDF5_ENABLE_PARALLEL:BOOL=OFF \ | ||
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \ | ||
-DHDF5_BUILD_FORTRAN=OFF \ | ||
-DHDF5_BUILD_JAVA=OFF \ | ||
-DHDF5_BUILD_DOC=OFF \ | ||
-DLIBAEC_USE_LOCALCONTENT=OFF \ | ||
-DZLIB_USE_LOCALCONTENT=OFF \ | ||
$GITHUB_WORKSPACE | ||
- name: CMake Build | ||
run: | | ||
cmake --build . --parallel 3 --config ${{ inputs.build_mode }} | ||
working-directory: ${{ runner.workspace }}/build | ||
|
||
- name: CMake Run Tests | ||
run: | | ||
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -E "tfloatsattrs|testhdf5-base|cache_api|dt_arith|H5TEST-dtypes|err_compat" | ||
working-directory: ${{ runner.workspace }}/build | ||
|
||
- name: CMake Run Expected to Fail Tests | ||
run: | | ||
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -R "tfloatsattrs|testhdf5-base|cache_api|dt_arith|H5TEST-dtypes|err_compat" | ||
working-directory: ${{ runner.workspace }}/build | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters