Skip to content

v4.4.7

v4.4.7 #48

Workflow file for this run

name: "Build and Publish OpenImpala CPU Wheels"
on:
release:
types:
- published
workflow_dispatch:
jobs:
build_wheels:
name: Build manylinux wheels on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Extract version from tag
id: version
run: |
if [[ "$GITHUB_REF_NAME" == v* ]]; then
VERSION="${GITHUB_REF_NAME#v}"
else
VERSION="$(git describe --tags --abbrev=0 | sed 's/^v//')"
fi
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "Resolved version: ${VERSION}"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5
- name: Cache native dependencies
uses: actions/cache@v4
with:
path: .cibw-deps-cache
key: cibw-deps-manylinux_2_28-x86_64-hdf5_1.14.6-tiff_4.6.0-hypre_2.31.0-amrex_25.03-tinyprof-eb-v6
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*musllinux* *i686*"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_ALL_LINUX: >
dnf install -y epel-release &&
dnf --enablerepo=powertools install -y
openmpi-devel gcc-gfortran gcc-c++ wget git
zlib-devel libjpeg-turbo-devel python3-pip &&
pip3 install "cmake>=3.28,<4" &&
export PATH=/usr/lib64/openmpi/bin:$PATH &&
if [ -f /project/.cibw-deps-cache/deps.tar.gz ]; then
echo "=== Restoring cached dependencies ===" &&
tar xzf /project/.cibw-deps-cache/deps.tar.gz -C / ;
else
echo "=== Building dependencies from source ===" &&
wget -q https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.6/hdf5-1.14.6.tar.gz &&
tar xzf hdf5-1.14.6.tar.gz &&
cd hdf5-1.14.6 &&
CC=mpicc CXX=mpicxx ./configure
--prefix=/usr/local
--enable-parallel
--enable-cxx
--enable-unsupported
--disable-shared
--with-pic &&
make -j$(nproc) &&
make install &&
cd .. &&
wget -q https://download.osgeo.org/libtiff/tiff-4.6.0.tar.gz &&
tar xzf tiff-4.6.0.tar.gz &&
cd tiff-4.6.0 &&
cmake -S . -B build
-DCMAKE_INSTALL_PREFIX=/usr/local
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON &&
cmake --build build -j$(nproc) &&
cmake --install build &&
cd .. &&
wget -q https://github.com/hypre-space/hypre/archive/v2.31.0.tar.gz &&
tar xzf v2.31.0.tar.gz &&
cd hypre-2.31.0/src &&
./configure --prefix=/usr/local --with-MPI --enable-shared=no
CC=mpicc CXX=mpicxx FC=mpif90
CFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC" FFLAGS="-O2 -fPIC" &&
make -j$(nproc) &&
make install &&
cd ../.. &&
git clone --depth 1 --branch 25.03 https://github.com/AMReX-Codes/amrex.git /tmp/amrex &&
cmake -S /tmp/amrex -B /tmp/amrex/build
-DCMAKE_INSTALL_PREFIX=/usr/local
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=OFF
-DAMReX_MPI=ON
-DAMReX_OMP=ON
-DAMReX_EB=ON
-DAMReX_SPACEDIM=3
-DAMReX_FORTRAN=ON
-DAMReX_PARTICLES=OFF
-DAMReX_TINY_PROFILE=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON &&
cmake --build /tmp/amrex/build -j$(nproc) &&
cmake --install /tmp/amrex/build &&
mkdir -p /project/.cibw-deps-cache &&
tar czf /project/.cibw-deps-cache/deps.tar.gz /usr/local ;
fi
CIBW_BEFORE_BUILD: pip install "cmake>=3.28,<4"
CIBW_ENVIRONMENT_LINUX: >
PATH="/usr/lib64/openmpi/bin:$PATH"
CMAKE_C_COMPILER="mpicc"
CMAKE_CXX_COMPILER="mpicxx"
CMAKE_PREFIX_PATH="/usr/local"
CMAKE_GENERATOR="Unix Makefiles"
SETUPTOOLS_SCM_PRETEND_VERSION="${{ steps.version.outputs.version }}"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
auditwheel repair -w {dest_dir} {wheel}
--exclude libmpi.so
--exclude libmpi.so.12
--exclude libmpi.so.40
--exclude libmpi_cxx.so
--exclude libmpi_cxx.so.1
--exclude libmpi_cxx.so.40
--exclude libopen-rte.so
--exclude libopen-rte.so.40
--exclude libopen-pal.so
--exclude libopen-pal.so.40
--exclude libmpi_mpifh.so
--exclude libmpi_mpifh.so.40
--exclude libgomp.so.1
--exclude libgfortran.so.5
--exclude libquadmath.so.0
- name: Upload wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: cibw-wheels
path: ./wheelhouse/*.whl
publish_to_pypi:
name: Publish wheels to PyPI
needs: build_wheels
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
name: cibw-wheels
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true