Skip to content

Commit

Permalink
Try wheel build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhale committed Nov 25, 2024
1 parent 070a2cd commit 90c601a
Showing 1 changed file with 6 additions and 40 deletions.
46 changes: 6 additions & 40 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ jobs:
runs-on: ubuntu-latest

env:
MPI4PY_VERSION: 3.1.2
PETSC4PY_VERSION: 3.16.1
CIBW_MANYLINUX_X86_64_IMAGE: docker.io/fenicsproject/wheelbuilder_x86_64:latest
CIBW_BUILD: cp37-manylinux_x86_64 cp38-manylinux_x86_64 cp39-manylinux_x86_64
CIBW_BUILD: cp39-manylinux_x86_64
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=file:///project/simple PETSC_DIR=/usr/local MAKEFLAGS=-j2
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=file:///project/simple MAKEFLAGS=-j3
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64:2024-09-16-ab73a4b

steps:
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -115,32 +113,12 @@ jobs:
if: ${{ github.event.inputs.build_fenicsx_stack == 'true' }}
run: python -m pip wheel --no-deps -w wheelhouse ./ffcx

- name: Download mpi4py
run: |
curl -L -O https://github.com/mpi4py/mpi4py/releases/download/${MPI4PY_VERSION}/mpi4py-${MPI4PY_VERSION}.tar.gz
mkdir -p mpi4py
tar -xf mpi4py-${MPI4PY_VERSION}.tar.gz -C mpi4py --strip-components 1
- name: Build mpi4py wheels
run: python -m cibuildwheel --output-dir wheelhouse mpi4py

- name: Make temporary simple503 repository
run: |
mkdir -p simple
cp wheelhouse/* simple/
python -m simple503 --base-url file:///project/simple simple
- name: Download petsc4py
run: |
curl -L -O https://pypi.io/packages/source/p/petsc4py/petsc4py-${PETSC4PY_VERSION}.tar.gz
mkdir -p petsc4py
tar -xf petsc4py-${PETSC4PY_VERSION}.tar.gz -C petsc4py --strip-components 1
- name: Build petsc4py wheels
run: python -m cibuildwheel --output-dir wheelhouse petsc4py
env:
CIBW_BEFORE_BUILD: python -m pip install numpy # Not specified correctly in petsc4py

- name: Update temporary simple503 repository
run: |
cp wheelhouse/* simple/
Expand All @@ -157,8 +135,9 @@ jobs:
- name: Build DOLFINx wheel
run: python -m cibuildwheel --output-dir wheelhouse dolfinx/python
env:
CIBW_BEFORE_BUILD: python -m pip -v install --prefer-binary fenics-ffcx fenics-basix && python -m pip -v install --prefer-binary petsc4py mpi4py && cmake -S dolfinx/cpp -B build-dir -DPython3_EXECUTABLE=$(which python) && cmake --build build-dir && cmake --install build-dir
CIBW_REPAIR_WHEEL_COMMAND_LINUX: export LD_LIBRARY_PATH=$(python -c "import site; print(site.getsitepackages()[0] + '/fenics_basix.libs')") && auditwheel repair -w {dest_dir} {wheel}
CIBW_BEFORE_BUILD: yum -y update && yum -y install mpich && python -m pip -v install --prefer-binary fenics-ffcx fenics-basix fenics-ufl && python -m pip -v install --prefer-binary mpi4py -i https://pypi.anaconda.org/mpi4py/simple && cmake -S dolfinx/cpp -B build-dir -DPython3_EXECUTABLE=$(which python) && cmake --build build-dir && cmake --install build-dir
CIBW_REPAIR_WHEEL_COMMAND_LINUX: export LD_LIBRARY_PATH=$(python -c "import site; print(site.getsitepackages()[0] + '/fenics_basix.libs')"):${LD_LIBRARY_PATH} && auditwheel repair -w {dest_dir} {wheel}
CIBW_ENVIRONMENT: PIP_EXTRA_INDEX_URL=file:///project/simple MAKEFLAGS=-j3 LD_LIBRARY_PATH=/usr/lib64/mpich/lib

- name: Update temporary simple503 repository
run: |
Expand Down Expand Up @@ -189,16 +168,3 @@ jobs:
with:
name: "simple503"
path: simple/*

# Extract mpiexec from docker image
- name: Extract mpiexec.hydra from Docker image
run: |
export CONTAINER_ID=$(docker create ${CIBW_MANYLINUX_X86_64_IMAGE})
docker cp ${CONTAINER_ID}:/usr/local/bin/mpiexec.hydra mpiexec.hydra
docker rm ${CONTAINER_ID}
- name: Upload mpiexec artifact
uses: actions/upload-artifact@v4
with:
name: "mpiexec.hydra"
path: mpiexec.hydra

0 comments on commit 90c601a

Please sign in to comment.