Files
hdf5/.github/workflows/cross-compile.yml
T
Allen Byrne fb35cde24a Rework Fortran configure to allow cross compile overrides (#5720)
Behavior:
Modify HDF5UseFortran.cmake to handle cross-compilation by providing default KINDs and sizes when CMAKE_CROSSCOMPILING is true.
Default values for INTEGER and REAL KINDs and their sizes are set when cross-compiling.
Error messages are adjusted to reflect cross-compilation scenarios.
Logic:
Conditional checks added for CMAKE_CROSSCOMPILING to determine if default values should be used.
Default values include INTEGER KINDs {1,2,4,8,16} and REAL KINDs {4,8,10,16}.
Default sizes for native kinds are set to 4 for INTEGER and REAL, and 8 for DOUBLE PRECISION when cross-compiling.
Misc:
Adjustments to verbose messages to indicate when defaults are used during cross-compilation.
2025-10-12 17:30:46 -05:00

105 lines
3.5 KiB
YAML

name: hdf5 dev CMake 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:
build_and_test_linux:
name: "Ubuntu mingw64-${{ inputs.build_mode }}"
runs-on: ubuntu-24.04
steps:
- name: Install CMake Dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install ninja-build graphviz
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
- name: Install Wine64 and dependencies
run: |
sudo apt update
sudo apt install -y wine64 winbind
# - name: Verify Wine64 installation
# run: wine64 --version
- name: Install MinGW64 Cross-Compiler
run: |
sudo apt update
sudo apt-get install -y mingw-w64
sudo apt-get install gfortran-mingw-w64-x86-64-win32
- name: Install Dependencies
uses: ssciwr/doxygen-install@v1
with:
version: "1.13.2"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v4.1.7
# CMAKE CONFIGURE
- name: CMake Configure
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
-G Ninja \
--log-level=VERBOSE \
-DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/mingw64.cmake \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DHDF5_ENABLE_DOXY_WARNINGS:BOOL=ON \
-DHDF5_BUILD_DOC:BOOL=ON \
-DHDF5_BUILD_JAVA:BOOL=OFF \
-DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=OFF \
-DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=ON \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON \
-DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \
-DZLIB_USE_LOCALCONTENT:BOOL=OFF \
-DHDF5_PACK_EXAMPLES:BOOL=ON \
-DHDF5_PACKAGE_EXTLIBS:BOOL=ON \
-DHDF5_TEST_API:BOOL=OFF \
-DHDF5_USE_PREGEN:BOOL=ON \
$GITHUB_WORKSPACE
shell: bash
# BUILD
- name: CMake Build
run: cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
working-directory: ${{ runner.workspace }}/build
# RUN TESTS
# - name: CMake Run Tests
# run: ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -E "err_compat|filenotclosed|swmr|cache_api"
# working-directory: ${{ runner.workspace }}/build
# RUN Failing TESTS
# - name: CMake Run Tests
# run: ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -R "err_compat|filenotclosed|swmr|cache_api"
# working-directory: ${{ runner.workspace }}/build
# continue-on-error: true
- name: CMake Run Package
run: cpack -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
- name: List files in the space
run: |
ls -l ${{ runner.workspace }}/build
- name: Save published binary (linux)
uses: actions/upload-artifact@v4
with:
name: tgz-ubuntu-2404_mingw64-${{ inputs.build_mode }}-binary
path: ${{ runner.workspace }}/build/HDF5-*-win64.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ inputs.build_mode != 'Debug' }}