Skip to content

Commit d266f57

Browse files
committed
Use new M1 runner to build arm64 Mac OS wheels natively
1 parent c2d3303 commit d266f57

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

.github/workflows/wheels.yml

+4-26
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ jobs:
3333
buildplat:
3434
- [ubuntu-latest, manylinux, x86_64]
3535
- [macos-latest, macosx, x86_64]
36-
- [macos-latest, macosx, arm64]
36+
- [macos-14, macosx, arm64]
3737
- [windows-2019, win, amd64]
3838
python: ["cp38", "cp39", "cp310", "cp311", "cp312"]
3939
steps:
4040
- uses: actions/checkout@v4
4141
- name: Install GSL (Windows / Mac OS x86_64)
4242
uses: mamba-org/setup-micromamba@v1
43-
if: matrix.buildplat[1] == 'win' || ( matrix.buildplat[1] == 'macosx' && matrix.buildplat[2] == 'x86_64' )
43+
if: matrix.buildplat[1] == 'win' || matrix.buildplat[1] == 'macosx'
4444
with:
4545
environment-name: gsl
4646
condarc: |
@@ -57,36 +57,14 @@ jobs:
5757
echo "LIB=$CONDA_PREFIX\\Library\\lib" >> $GITHUB_ENV
5858
echo "LIBPATH=$CONDA_PREFIX\\Library\\lib" >> $GITHUB_ENV
5959
echo "$CONDA_PREFIX\\Library\\bin" >> $GITHUB_PATH # necessary when we don't activate the environment
60-
- name: Set GSL environment variables (Mac OS x86_64)
61-
if: matrix.buildplat[1] == 'macosx' && matrix.buildplat[2] == 'x86_64'
60+
- name: Set GSL environment variables (Mac OS)
61+
if: matrix.buildplat[1] == 'macosx'
6262
shell: bash -l {0}
6363
run: |
6464
echo "CFLAGS=-I$CONDA_PREFIX/include" >> $GITHUB_ENV
6565
echo "LDFLAGS=-L$CONDA_PREFIX/lib" >> $GITHUB_ENV
6666
echo "REPAIR_LIBRARY_PATH=$CONDA_PREFIX/lib" >> $GITHUB_ENV # https://github.com/pypa/cibuildwheel/issues/816#issuecomment-916197079
6767
echo "$CONDA_PREFIX/bin" >> $GITHUB_PATH # necessary when we don't activate the environment
68-
- name: Install GSL (Mac OS ARM64) !HACK!
69-
if: matrix.buildplat[1] == 'macosx' && matrix.buildplat[2] == 'arm64'
70-
run: |
71-
curl -O https://conda.anaconda.org/conda-forge/osx-arm64/gsl-2.7-h6e638da_0.tar.bz2
72-
curl -O https://conda.anaconda.org/conda-forge/osx-arm64/libblas-3.9.0-16_osxarm64_openblas.tar.bz2
73-
curl -O https://conda.anaconda.org/conda-forge/osx-arm64/libcblas-3.9.0-16_osxarm64_openblas.tar.bz2
74-
curl -O https://conda.anaconda.org/conda-forge/osx-arm64/libopenblas-0.3.21-openmp_hc731615_3.tar.bz2
75-
curl -O https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran-5.0.0-11_3_0_hd922786_25.tar.bz2
76-
curl -O https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran5-11.3.0-hdaf2cc0_25.tar.bz2
77-
curl -O https://conda.anaconda.org/conda-forge/osx-arm64/llvm-openmp-14.0.4-hd125106_0.tar.bz2
78-
mkdir gsl
79-
tar -xjf gsl-2.7-h6e638da_0.tar.bz2 -C gsl
80-
tar -xjf libblas-3.9.0-16_osxarm64_openblas.tar.bz2 -C gsl
81-
tar -xjf libcblas-3.9.0-16_osxarm64_openblas.tar.bz2 -C gsl
82-
tar -xjf libopenblas-0.3.21-openmp_hc731615_3.tar.bz2 -C gsl
83-
tar -xjf libgfortran-5.0.0-11_3_0_hd922786_25.tar.bz2 -C gsl
84-
tar -xjf libgfortran5-11.3.0-hdaf2cc0_25.tar.bz2 -C gsl
85-
tar -xjf llvm-openmp-14.0.4-hd125106_0.tar.bz2 -C gsl
86-
rsync -azv gsl/bin/ /usr/local/bin/
87-
rsync -azv gsl/include/ /usr/local/include/
88-
rsync -azv gsl/lib/ /usr/local/lib/
89-
echo "REPAIR_LIBRARY_PATH=/usr/local/lib/" >> $GITHUB_ENV # https://github.com/pypa/cibuildwheel/issues/816#issuecomment-916197079
9068
- name: Build wheels
9169
uses: pypa/cibuildwheel@v2.16
9270
env:

0 commit comments

Comments
 (0)