mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-23 16:20:57 +08:00
Turns on testing, both serial and parallel, but skips: * dt_arith and dtransform in CMake * All main library tests in the Autotools Due to dt_arith and dtransform segfaults when handling long doubles.
96 lines
4.0 KiB
YAML
96 lines
4.0 KiB
YAML
name: hdf5 dev autotools nvhpc
|
|
|
|
# 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:
|
|
nvhpc_build_and_test:
|
|
name: "nvhpc ${{ inputs.build_mode }}"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get Sources
|
|
uses: actions/checkout@v4.1.7
|
|
|
|
- name: Install Dependencies
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install autoconf automake libtool libtool-bin libaec-dev
|
|
sudo apt-get install doxygen graphviz
|
|
sudo apt install -y zlib1g-dev libcurl4-openssl-dev libjpeg-dev wget curl bzip2
|
|
sudo apt install -y m4 flex bison cmake libzip-dev openssl build-essential
|
|
|
|
- name: Install NVHPC
|
|
shell: bash
|
|
run: |
|
|
curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
|
|
echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y nvhpc-24-7
|
|
echo "NVHPCSDK=/opt/nvidia/hpc_sdk" >> $GITHUB_ENV
|
|
echo "OMPI_CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin/nvc++" >> $GITHUB_ENV
|
|
echo "OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin/nvc" >> $GITHUB_ENV
|
|
echo "OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin/nvfortran" >> $GITHUB_ENV
|
|
echo "CC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin/mpicc" >> $GITHUB_ENV
|
|
echo "FC=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin/mpifort" >> $GITHUB_ENV
|
|
echo "LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/lib" >> $GITHUB_ENV
|
|
echo "DESTDIR=/tmp" >> $GITHUB_ENV
|
|
|
|
- name: Autotools Configure
|
|
shell: bash
|
|
run: |
|
|
export RUNPARALLEL="mpiexec -np 2"
|
|
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH
|
|
sh ./autogen.sh
|
|
mkdir "${{ runner.workspace }}/build"
|
|
cd "${{ runner.workspace }}/build"
|
|
$GITHUB_WORKSPACE/configure \
|
|
FCFLAGS="-fPIC -fortranlibs" \
|
|
--enable-build-mode=${{ inputs.build_mode }} \
|
|
--enable-fortran \
|
|
--enable-shared \
|
|
--enable-parallel
|
|
|
|
- name: Autotools Build
|
|
shell: bash
|
|
run: |
|
|
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH
|
|
make -j3
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
# ph5diff tests are in the tools/tests directory so they will get run
|
|
# here, so leave NPROCS set here as well
|
|
- name: Autotools Run Tests
|
|
env:
|
|
NPROCS: 2
|
|
run: |
|
|
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH
|
|
cd tools && make check -j2 && cd ..
|
|
cd hl && make check -j2 && cd ..
|
|
cd fortran && make check -j2 && cd ..
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
- name: Autotools Run Parallel Tests
|
|
env:
|
|
NPROCS: 2
|
|
run: |
|
|
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH
|
|
cd testpar && make check && cd ..
|
|
working-directory: ${{ runner.workspace }}/build
|
|
|
|
- name: Autotools Install
|
|
shell: bash
|
|
run: |
|
|
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/comm_libs/openmpi4/bin:/opt/nvidia/hpc_sdk/Linux_x86_64/24.7/compilers/bin:$PATH
|
|
make install
|
|
working-directory: ${{ runner.workspace }}/build
|