mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-28 04:09:38 +03:00
113 lines
3.6 KiB
YAML
113 lines
3.6 KiB
YAML
name: hdf5 dev CMake icx 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:
|
|
intel_oneapi_linux:
|
|
name: "linux-oneapi ${{ inputs.build_mode }}"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get Sources (Linux)
|
|
uses: actions/checkout@v4.1.7
|
|
|
|
- name: Install Dependencies (Linux)
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install ninja-build doxygen graphviz
|
|
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
|
|
|
|
- name: Install oneAPI (Linux)
|
|
uses: fortran-lang/setup-fortran@v1
|
|
id: setup-fortran
|
|
with:
|
|
compiler: intel
|
|
version: '2024.1'
|
|
|
|
- name: CMake Configure (Linux)
|
|
shell: bash
|
|
env:
|
|
FC: ${{ steps.setup-fortran.outputs.fc }}
|
|
CC: ${{ steps.setup-fortran.outputs.cc }}
|
|
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 }} \
|
|
-DHDF5_BUILD_FORTRAN:BOOL=ON \
|
|
-DHDF5_BUILD_CPP_LIB:BOOL=ON \
|
|
${{ github.workspace }}
|
|
|
|
- name: CMake Build (Linux)
|
|
shell: bash
|
|
env:
|
|
FC: ${{ steps.setup-fortran.outputs.fc }}
|
|
CC: ${{ steps.setup-fortran.outputs.cc }}
|
|
run: |
|
|
cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
- name: CMake Run Tests (Linux)
|
|
shell: bash
|
|
env:
|
|
FC: ${{ steps.setup-fortran.outputs.fc }}
|
|
CC: ${{ steps.setup-fortran.outputs.cc }}
|
|
run: |
|
|
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
Intel_oneapi_windows:
|
|
name: "windows-oneapi ${{ inputs.build_mode }}"
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Get Sources (Windows)
|
|
uses: actions/checkout@v4.1.7
|
|
|
|
- name: Install Dependencies (Windows)
|
|
run: choco install ninja
|
|
|
|
- name: install oneAPI (Windows)
|
|
uses: fortran-lang/setup-fortran@v1
|
|
id: setup-fortran
|
|
with:
|
|
compiler: intel
|
|
version: '2024.1'
|
|
|
|
- name: CMake Configure (Windows)
|
|
shell: pwsh
|
|
env:
|
|
FC: ${{ steps.setup-fortran.outputs.fc }}
|
|
CC: ${{ steps.setup-fortran.outputs.cc }}
|
|
run: |
|
|
mkdir "${{ runner.workspace }}/build"
|
|
Set-Location -Path "${{ runner.workspace }}\\build"
|
|
cmake -C ${{ github.workspace }}/config/cmake/cacheinit.cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} -DHDF5_BUILD_FORTRAN=ON -DHDF5_BUILD_CPP_LIB=ON -DLIBAEC_USE_LOCALCONTENT=OFF -DZLIB_USE_LOCALCONTENT=OFF ${{ github.workspace }}
|
|
|
|
- name: CMake Build (Windows)
|
|
shell: pwsh
|
|
env:
|
|
FC: ${{ steps.setup-fortran.outputs.fc }}
|
|
CC: ${{ steps.setup-fortran.outputs.cc }}
|
|
run: |
|
|
cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
- name: CMake Run Tests (Windows)
|
|
shell: pwsh
|
|
env:
|
|
FC: ${{ steps.setup-fortran.outputs.fc }}
|
|
CC: ${{ steps.setup-fortran.outputs.cc }}
|
|
run: |
|
|
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -E tfloatsattrs
|
|
working-directory: ${{ runner.workspace }}/build
|