Skip to content

Add native .npy (NumPy) file reading to ForwardSimulationCompressed. #1059

Add native .npy (NumPy) file reading to ForwardSimulationCompressed.

Add native .npy (NumPy) file reading to ForwardSimulationCompressed. #1059

Workflow file for this run

name: CI Build & Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test-linux:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
pkg-config \
python3-dev \
python3-pip \
zlib1g-dev \
libjpeg-dev \
libtiff-dev \
libpng-dev \
libssl-dev \
libbz2-dev \
liblzma-dev \
libzstd-dev \
liblz4-dev \
libzip-dev \
libhdf5-dev \
libblosc-dev \
libblosc2-dev \
libnlopt-dev \
libfftw3-dev
- name: Build (no CUDA)
id: build
run: |
# Move custom cmake files to avoid forcing custom builds
mkdir -p cmake/deps/backup
mv cmake/deps/*_custom.cmake cmake/deps/backup/ 2>/dev/null || true
# HDF5 specific configuration for Ubuntu
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial
export HDF5_INCLUDE_DIR=/usr/include/hdf5/serial
chmod +x build.sh
mkdir -p build
cd build
cmake .. \
-DUSE_SYSTEM_DEPS=ON \
-DDOWNLOAD_DEPENDENCIES=OFF \
-DINSTALL_PYTHON_DEPENDENCIES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_CUDA=OFF \
-DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/hdf5/serial" \
-DCMAKE_C_FLAGS="-I/usr/include/hdf5/serial" \
-DCMAKE_CXX_FLAGS="-I/usr/include/hdf5/serial" \
-DHDF5_DIR="/usr/lib/x86_64-linux-gnu/hdf5/serial" \
-DHDF5_INCLUDE_DIRS="/usr/include/hdf5/serial" \
-Wno-dev
cmake --build . -j $(nproc)
# Binaries are built to build/bin/ and POST_BUILD copies to FF_HEDM/bin/ etc.
# Some binaries internally call sibling binaries via $MIDAS_HOME/bin/ — symlink it.
- name: Create top-level bin symlink
if: steps.build.outcome == 'success'
run: ln -sf build/bin bin
# ── Python test dependencies ──────────────────────────────────────
- name: Install Python dependencies
if: steps.build.outcome == 'success'
run: |
pip install --break-system-packages \
matplotlib numpy pandas parsl scikit-image pillow h5py numba \
"zarr==2.18.3" "numcodecs==0.15.1" hdf5plugin \
scipy fsspec tqdm diskcache multiprocess
# ── Benchmark tests (2 vCPUs on standard GitHub runners) ─────────
- name: Test NF-HEDM
if: always() && steps.build.outcome == 'success'
env:
MIDAS_HOME: ${{ github.workspace }}
run: python tests/test_nf_hedm.py -nCPUs 2
- name: Test FF-HEDM
if: always() && steps.build.outcome == 'success'
env:
MIDAS_HOME: ${{ github.workspace }}
run: python tests/test_ff_hedm.py -nCPUs 2 --px-overlap --dual-dataset
- name: Test Calibration + Integration
if: always() && steps.build.outcome == 'success'
env:
MIDAS_HOME: ${{ github.workspace }}
run: python tests/test_calibration_integration.py -nCPUs 2
- name: Test Phase ID
if: always() && steps.build.outcome == 'success'
env:
MIDAS_HOME: ${{ github.workspace }}
run: python tests/test_phase_id.py -nCPUs 2
- name: Test Tomography
if: always() && steps.build.outcome == 'success'
env:
MIDAS_HOME: ${{ github.workspace }}
run: python tests/test_tomo.py -nCPUs 2
build-linux-cuda:
runs-on: ubuntu-latest
container: nvidia/cuda:12.6.3-devel-ubuntu24.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update
apt-get install -y \
build-essential \
cmake \
pkg-config \
python3-dev \
zlib1g-dev \
libjpeg-dev \
libtiff-dev \
libpng-dev \
libssl-dev \
libbz2-dev \
liblzma-dev \
libzstd-dev \
liblz4-dev \
libzip-dev \
libhdf5-dev \
libblosc-dev \
libblosc2-dev \
libnlopt-dev \
libfftw3-dev
- name: Build (with CUDA)
run: |
# Move custom cmake files to avoid forcing custom builds
mkdir -p cmake/deps/backup
mv cmake/deps/*_custom.cmake cmake/deps/backup/ 2>/dev/null || true
# HDF5 specific configuration for Ubuntu
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial
export HDF5_INCLUDE_DIR=/usr/include/hdf5/serial
mkdir -p build
cd build
cmake .. \
-DUSE_SYSTEM_DEPS=ON \
-DDOWNLOAD_DEPENDENCIES=OFF \
-DINSTALL_PYTHON_DEPENDENCIES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES="86;90" \
-DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/hdf5/serial" \
-DCMAKE_C_FLAGS="-I/usr/include/hdf5/serial" \
-DCMAKE_CXX_FLAGS="-I/usr/include/hdf5/serial" \
-DHDF5_DIR="/usr/lib/x86_64-linux-gnu/hdf5/serial" \
-DHDF5_INCLUDE_DIRS="/usr/include/hdf5/serial" \
-Wno-dev
cmake --build . -j $(nproc)