Skip to content

Commit

Permalink
Update build_wheels.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
borisbolliet authored Sep 28, 2024
1 parent 8a9f16d commit f87496c
Showing 1 changed file with 51 additions and 51 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,61 +36,61 @@ jobs:
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.14.1

# # Build wheels for Linux (with custom build options)
# - name: Build wheels for Linux
# if: matrix.os == 'ubuntu-latest'
# env:
# CIBW_BEFORE_BUILD: "yum install -y gsl-devel fftw-devel"
# CIBW_ARCHS: aarch64
# CIBW_BUILD: cp39-manylinux_aarch64
# run: python -m cibuildwheel --output-dir wheelhouse

# - name: Install dependencies on macOS
# if: matrix.os == 'macos-latest'
# run: |
# brew install gsl fftw libomp
# chmod +x select_makefile.sh
# ./select_makefile.sh
# make clean

# # Check that omp.h is available in the include directory
# if [ -f /opt/homebrew/opt/libomp/include/omp.h ]; then
# echo "omp.h found"
# else
# echo "omp.h not found" && exit 1
# fi

# # Check that gsl_integration.h and fftw3.h are available
# if [ -f /opt/homebrew/opt/gsl/include/gsl/gsl_integration.h ]; then
# echo "gsl_integration.h found"
# else
# echo "gsl_integration.h not found" && exit 1
# fi
# Build wheels for Linux (with custom build options)
- name: Build wheels for Linux
if: matrix.os == 'ubuntu-latest'
env:
CIBW_BEFORE_BUILD: "yum install -y gsl-devel fftw-devel"
CIBW_ARCHS: aarch64
CIBW_BUILD: cp39-manylinux_aarch64
run: python -m cibuildwheel --output-dir wheelhouse

- name: Install dependencies on macOS
if: matrix.os == 'macos-latest'
run: |
brew install gsl fftw libomp
chmod +x select_makefile.sh
./select_makefile.sh
make clean
# Check that omp.h is available in the include directory
if [ -f /opt/homebrew/opt/libomp/include/omp.h ]; then
echo "omp.h found"
else
echo "omp.h not found" && exit 1
fi
# Check that gsl_integration.h and fftw3.h are available
if [ -f /opt/homebrew/opt/gsl/include/gsl/gsl_integration.h ]; then
echo "gsl_integration.h found"
else
echo "gsl_integration.h not found" && exit 1
fi
# if [ -f /opt/homebrew/opt/fftw/include/fftw3.h ]; then
# echo "fftw3.h found"
# else
# echo "fftw3.h not found" && exit 1
# fi
if [ -f /opt/homebrew/opt/fftw/include/fftw3.h ]; then
echo "fftw3.h found"
else
echo "fftw3.h not found" && exit 1
fi
# export LIBRARY_PATH=/opt/homebrew/opt/libomp/lib:$LIBRARY_PATH
# export C_INCLUDE_PATH=/opt/homebrew/opt/libomp/include:$C_INCLUDE_PATH
# export DYLD_LIBRARY_PATH=/opt/homebrew/opt/libomp/lib:$DYLD_LIBRARY_PATH # (Mac M1 users only)
# working-directory: class-sz
export LIBRARY_PATH=/opt/homebrew/opt/libomp/lib:$LIBRARY_PATH
export C_INCLUDE_PATH=/opt/homebrew/opt/libomp/include:$C_INCLUDE_PATH
export DYLD_LIBRARY_PATH=/opt/homebrew/opt/libomp/lib:$DYLD_LIBRARY_PATH # (Mac M1 users only)
working-directory: class-sz

# # Build wheels for macOS (with Apple Silicon support)
# - name: Build wheels for macOS
# if: matrix.os == 'macos-latest'
# env:
# CIBW_ARCHS: "arm64"
# LDFLAGS: "-L/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/gsl/lib -L/opt/homebrew/opt/fftw/lib"
# CPPFLAGS: "-I/opt/homebrew/opt/libomp/include -I/opt/homebrew/opt/gsl/include -I/opt/homebrew/opt/fftw/include"
# LIBRARY_PATH: "/opt/homebrew/opt/libomp/lib:/opt/homebrew/opt/gsl/lib:/opt/homebrew/opt/fftw/lib:$LIBRARY_PATH"
# C_INCLUDE_PATH: "/opt/homebrew/opt/libomp/include:/opt/homebrew/opt/gsl/include:/opt/homebrew/opt/fftw/include:$C_INCLUDE_PATH"
# DYLD_LIBRARY_PATH: "/opt/homebrew/opt/libomp/lib:/opt/homebrew/opt/gsl/lib:/opt/homebrew/opt/fftw/lib:$DYLD_LIBRARY_PATH"

# run: python -m cibuildwheel --output-dir wheelhouse
# Build wheels for macOS (with Apple Silicon support)
- name: Build wheels for macOS
if: matrix.os == 'macos-latest'
env:
CIBW_ARCHS: "arm64"
LDFLAGS: "-L/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/gsl/lib -L/opt/homebrew/opt/fftw/lib"
CPPFLAGS: "-I/opt/homebrew/opt/libomp/include -I/opt/homebrew/opt/gsl/include -I/opt/homebrew/opt/fftw/include"
LIBRARY_PATH: "/opt/homebrew/opt/libomp/lib:/opt/homebrew/opt/gsl/lib:/opt/homebrew/opt/fftw/lib:$LIBRARY_PATH"
C_INCLUDE_PATH: "/opt/homebrew/opt/libomp/include:/opt/homebrew/opt/gsl/include:/opt/homebrew/opt/fftw/include:$C_INCLUDE_PATH"
DYLD_LIBRARY_PATH: "/opt/homebrew/opt/libomp/lib:/opt/homebrew/opt/gsl/lib:/opt/homebrew/opt/fftw/lib:$DYLD_LIBRARY_PATH"

run: python -m cibuildwheel --output-dir wheelhouse



Expand Down

0 comments on commit f87496c

Please sign in to comment.