Skip to content

provide patch for ISMRMRD 1.15.0 and curl linking problems #1057

provide patch for ISMRMRD 1.15.0 and curl linking problems

provide patch for ISMRMRD 1.15.0 and curl linking problems #1057

Workflow file for this run

name: native
on:
push:
branches: [master]
paths-ignore:
- 'docker/Dockerfile'
- 'docker/docker*.yml'
- '**.md'
- 'VirtualBox/**'
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- 'NOTICE.txt'
- 'LICENSE.txt'
pull_request:
branches: [master]
paths-ignore:
- 'docker/Dockerfile'
- 'docker/docker*.yml'
- '**.md'
- 'VirtualBox/**'
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- 'NOTICE.txt'
- 'LICENSE.txt'
workflow_dispatch:
inputs:
tmate:
description: Debug with tmate ssh session
type: boolean
default: false
required: true
jobs:
test:
runs-on: ${{ matrix.os }}
defaults: {run: {shell: 'bash -el {0}'}}
env:
COMPILER: gcc
BUILD_TYPE: Release
strategy:
matrix:
include:
# note: need +boost on ubuntu 22.04 to get recent enough version (as APT version is too old)
- cxx-ver: 9
flags: -devel -armadillo +boost -fftw3 +hdf5 -swig
os: ubuntu-22.04
- cxx-ver: 9
flags: -devel -armadillo +boost +fftw3 -hdf5 -swig +gtest
os: ubuntu-22.04
- cxx-ver: 11
flags: +devel +armadillo +boost -fftw3 -hdf5 +swig -root
os: ubuntu-22.04
- cxx-ver: 11
flags: -devel -armadillo -boost -fftw3 +hdf5 -swig
os: ubuntu-24.04
- cxx-ver: 11
flags: -devel +armadillo -boost +fftw3 -hdf5 -swig
os: ubuntu-24.04
- cxx-ver: 11
flags: +devel -armadillo -boost -fftw3 -hdf5 +swig
os: ubuntu-24.04
fail-fast: false # don't terminate matrix if one job fails
steps:
- uses: actions/checkout@v7
- if: contains(matrix.os, fromJSON('["ubuntu","macos"]'))
name: increase disk space
run: sudo .github/workflows/GHA_increase_disk_space.sh
- uses: conda-incubator/setup-miniconda@v4
with:
auto-activate: true
activate-environment: ""
channels: conda-forge,defaults
mamba-version: "*"
- id: deps
name: install dependencies
working-directory: docker
run: |
conda env update -n base -f requirements.yml
echo "Python_ROOT_DIR=$CONDA_PREFIX" >> $GITHUB_ENV
echo "Python3_ROOT_DIR=$CONDA_PREFIX" >> $GITHUB_ENV
sudo ./raw-ubuntu.sh
sudo ./build_system-ubuntu.sh
sudo ./build_essential-ubuntu.sh
sudo ./build_gadgetron-ubuntu.sh
- name: optionally install ROOT
run: |
sh -ex
if [[ " ${{ matrix.flags }} " =~ " -root " ]]; then
# Install ROOT (warning: currently only valid on Ubuntu)
ROOT_file=root_v6.28.12.Linux-ubuntu20-x86_64-gcc9.4.tar.gz
wget https://root.cern/download/"$ROOT_file"
tar -xzf "$ROOT_file"
rm "$ROOT_file"
source root/bin/thisroot.sh
echo ROOT_DIR="$ROOTSYS/cmake" >> $GITHUB_ENV
echo ROOTSYS="$ROOTSYS" >> $GITHUB_ENV
echo
# work-around problem with problem with Vdt for ROOT version pre-6.30.04 as per https://github.com/root-project/root/pull/14178
echo Vdt_ROOT="$ROOTSYS" >> $GITHUB_ENV
# thisroot modifies the following
case ${{matrix.os}} in
(ubuntu*)
echo LD_LIBRARY_PATH="${CMAKE_INSTALL_PREFIX}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo PATH="$PATH" >> $GITHUB_ENV
;;
(macOS*) # future-proof
echo DYLD_FALLBACK_LIBRARY_PATH="${CMAKE_INSTALL_PREFIX}/lib:$DYLD_FALLBACK_LIBRARY_PATH" >> $GITHUB_ENV
echo PATH="$PATH" >> $GITHUB_ENV
;;
(windows*) # future-proof
echo PATH="${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/bin:$PATH" >> $GITHUB_ENV
;;
esac
fi
- uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ env.COMPILER }}-${{ matrix.cxx-ver }}-${{ env.BUILD_TYPE }}-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
${{ matrix.os }}-${{ env.COMPILER }}-${{ matrix.cxx-ver }}-${{ env.BUILD_TYPE }}-${{ github.ref_name }}
${{ matrix.os }}-${{ env.COMPILER }}-${{ matrix.cxx-ver }}-${{ env.BUILD_TYPE }}
append-timestamp: false
- name: export CC CXX
run: |
set -ex
if test '${{ env.COMPILER }}' = clang; then
CC=clang
CXX=clang++
elif test '${{ env.COMPILER }}' = gcc; then
CC=gcc
CXX=g++
fi
if test -n '${{ matrix.cxx-ver }}'; then
CC=${CC}-${{ matrix.cxx-ver }}
CXX=${CXX}-${{ matrix.cxx-ver }}
sudo apt install -yq ${CXX} ${CC}
fi
# make available to jobs below
echo "CC=$CC" >> $GITHUB_ENV
echo "CXX=$CXX" >> $GITHUB_ENV
- name: cmake -S .
env:
CMAKE_BUILD_TYPE: ${{ env.BUILD_TYPE }}
run: |
set -ex
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export superbuild=`pwd`
BUILD_FLAGS="-DCMAKE_INSTALL_PREFIX=~/install -DPYVER=3 -DUSE_SYSTEM_RocksDB:BOOL=OFF -DBUILD_TESTING_Gadgetron:BOOL=ON -DSTIR_DISABLE_HDF5:BOOL=ON -DUSE_ITK:BOOL=ON -DBUILD_CIL:BOOL=ON -DBUILD_siemens_to_ismrmrd:BOOL=ON"
[[ " ${{ matrix.flags }} " =~ " +armadillo " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_Armadillo:BOOL=OFF"
[[ " ${{ matrix.flags }} " =~ " -armadillo " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_Armadillo:BOOL=ON"
[[ " ${{ matrix.flags }} " =~ " +boost " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_Boost:BOOL=OFF"
[[ " ${{ matrix.flags }} " =~ " -boost " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_Boost:BOOL=ON"
[[ " ${{ matrix.flags }} " =~ " +fftw3 " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_FFTW3:BOOL=OFF"
[[ " ${{ matrix.flags }} " =~ " -fftw3 " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_FFTW3:BOOL=ON"
[[ " ${{ matrix.flags }} " =~ " +hdf5 " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_HDF5:BOOL=OFF"
[[ " ${{ matrix.flags }} " =~ " -hdf5 " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_HDF5:BOOL=ON -DPATCH_ISMRMRD:BOOL=ON"
[[ " ${{ matrix.flags }} " =~ " +swig " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_SWIG:BOOL=OFF"
[[ " ${{ matrix.flags }} " =~ " -swig " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_SWIG:BOOL=ON"
[[ " ${{ matrix.flags }} " =~ " +gtest " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_GTest:BOOL=OFF"
[[ " ${{ matrix.flags }} " =~ " -gtest " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_SYSTEM_GTest:BOOL=ON"
# note: SIRF needs CMP0074 with older versions of pre-built ROOT (see above)
[[ " ${{ matrix.flags }} " =~ " -root " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DUSE_ROOT:BOOL=ON -DUSE_SYSTEM_ROOT:BOOL=ON -DSIRF_EXTRA_CMAKE_ARGS=-DCMAKE_POLICY_DEFAULT_CMP0074=NEW"
[[ " ${{ matrix.flags }} " =~ " +devel " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DDEVEL_BUILD:BOOL=ON"
[[ " ${{ matrix.flags }} " =~ " -devel " ]] && BUILD_FLAGS="${BUILD_FLAGS} -DDEVEL_BUILD:BOOL=OFF"
cmake -G Ninja -S ${GITHUB_WORKSPACE} -B ./build ${BUILD_FLAGS}
- run: cmake --build ./build
# tmate ssh debugging
- if: github.event_name == 'workflow_dispatch' && github.event.inputs.tmate == 'true'
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
- if: failure()
name: Upload build log files for debugging
uses: actions/upload-artifact@v7
with:
name: logs-${{ matrix.cxx-ver }}-${{ matrix.flags }}-${{ matrix.os }}
path: ${{ github.workspace }}/build/**/*.log
retention-days: 7
- name: pip install torch
run: pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: ctest
run: ./docker/ctest_sirf.sh