forked from jaak-s/macau
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from ExaScience/dev/cibw
cibw: cibuildwheel for linux and macOS
- Loading branch information
Showing
7 changed files
with
164 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build Wheels | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-13, macos-14] | ||
# os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v5 | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.18.1 | ||
|
||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM quay.io/pypa/manylinux2014_x86_64 | ||
|
||
RUN yum -y install wget eigen3-devel openblas-devel hdf5-devel && \ | ||
yum clean all | ||
|
||
#install HighFive | ||
RUN wget -O HighFive.tar.gz https://github.com/BlueBrain/HighFive/archive/v2.2.tar.gz && \ | ||
tar xzf HighFive.tar.gz && \ | ||
rm HighFive.tar.gz && \ | ||
cd HighFive* && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. -DHIGHFIVE_USE_BOOST=OFF && \ | ||
make -j2 && \ | ||
make install && \ | ||
cd ../.. && \ | ||
rm -r HighFive* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM quay.io/pypa/musllinux_1_2_x86_64 | ||
|
||
RUN apk add wget eigen openblas hdf5 | ||
|
||
#install HighFive | ||
RUN wget -O HighFive.tar.gz https://github.com/BlueBrain/HighFive/archive/v2.2.tar.gz && \ | ||
tar xzf HighFive.tar.gz && \ | ||
rm HighFive.tar.gz && \ | ||
cd HighFive* && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. -DHIGHFIVE_USE_BOOST=OFF && \ | ||
make -j2 && \ | ||
make install && \ | ||
cd ../.. && \ | ||
rm -r HighFive* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) | ||
cd "$SCRIPT_DIR" | ||
|
||
echo "MACOSX_DEPLOYMENT_TARGET: [$MACOSX_DEPLOYMENT_TARGET]" | ||
echo "PWD: [$PWD]" | ||
|
||
brew install --formulae eigen ../highfive.rb | ||
brew uninstall --ignore-dependencies hdf5 | ||
|
||
./install_hdf5.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
BASEDIR=$PWD | ||
|
||
# Set the HDF5 version | ||
HDF5_MAJOR=1 | ||
HDF5_MINOR=12 | ||
HDF5_RELEASE=2 | ||
HDF5_VERSION=${HDF5_MAJOR}.${HDF5_MINOR}.${HDF5_RELEASE} | ||
HDF5_URL="https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_MAJOR}.${HDF5_MINOR}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz" | ||
|
||
mkdir -p hdf5_build | ||
cd hdf5_build | ||
|
||
wget -q $HDF5_URL -O - | tar -xvzf - --strip-components 2 | ||
|
||
./configure --prefix=/usr/local/hdf5 | ||
make -j4 | ||
sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
VERSION=0.3.27 | ||
BASEDIR=$PWD | ||
|
||
# Define OpenBLAS GitHub repository URL | ||
REPO_URL="https://github.com/xianyi/OpenBLAS" | ||
|
||
# Create a directory for the build process | ||
BUILD_DIR="openblas_build_$VERSION" | ||
mkdir -p $BUILD_DIR | ||
cd $BUILD_DIR | ||
|
||
# Download the specified version of OpenBLAS | ||
echo "Downloading OpenBLAS version $VERSION..." | ||
wget -qO- "$REPO_URL/archive/refs/tags/v$VERSION.tar.gz" | tar xz --strip-components=1 | ||
|
||
# Build OpenBLAS | ||
echo "Building OpenBLAS version $VERSION..." | ||
make MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} | ||
|
||
make install PREFIX=$BASEDIR/openblas | ||
|
||
echo "OpenBLAS version $VERSION has been installed in $BASEDIR/openblas" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters