Skip to content

Commit 648a27f

Browse files
authored
Merge pull request #53 from fabinsch/wheels-arm64
release: wheels for macos arm64
2 parents 4209993 + 49f1d38 commit 648a27f

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ jobs:
1313
strategy:
1414
matrix:
1515
python-version: ["3.7", "3.8", "3.9", "3.10"]
16-
os: [ubuntu-latest, macos-latest]
17-
16+
os: [ubuntu-latest, macos-latest, self-hosted-arm64]
17+
exclude:
18+
- os: self-hosted-arm64
19+
python-version: 3.7
1820
steps:
1921
- name: Set docker for linux
2022
if: contains(matrix.os, 'ubuntu')
@@ -31,7 +33,9 @@ jobs:
3133
chown -R $(id -u):$(id -g) $PWD
3234
git submodule update
3335
34-
- uses: conda-incubator/setup-miniconda@v2
36+
- name: Setup conda
37+
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
38+
uses: conda-incubator/setup-miniconda@v2
3539
with:
3640
miniforge-variant: Mambaforge
3741
miniforge-version: latest
@@ -40,22 +44,51 @@ jobs:
4044
activate-environment: proxsuite
4145

4246
- name: Install dependencies [Conda]
47+
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
4348
shell: bash -l {0}
4449
run: |
4550
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
4651
conda config --remove channels defaults
4752
mamba install doxygen graphviz eigen simde cmake compilers
4853
4954
- name: Print environment [Conda]
55+
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
5056
shell: bash -l {0}
5157
run: |
5258
conda info
5359
mamba list
5460
env
5561
5662
- name: Build wheel
63+
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
64+
shell: bash -l {0}
65+
run: |
66+
pip wheel . -w dist
67+
68+
- name: Turn off vectorization in pyproject.toml [arm64]
69+
if: contains(matrix.os, 'self-hosted')
70+
uses: jannekem/run-python-script-action@v1
71+
with:
72+
script: |
73+
import os
74+
print("Directory contents:")
75+
for f in os.listdir():
76+
print(f)
77+
import tomlkit
78+
with open("pyproject.toml") as f:
79+
doc = tomlkit.load(f)
80+
doc["build-system"]["configure-args"] = "-DBUILD_TESTING:BOOL=OFF","-DBUILD_PYTHON_INTERFACE:BOOL=ON","-DBUILD_WITH_VECTORIZATION_SUPPORT:BOOL=OFF","-DINSTALL_DOCUMENTATION:BOOL=OFF"
81+
with open("pyproject.toml", "w") as f:
82+
tomlkit.dump(doc, f)
83+
84+
- name: Build wheel on self-hosted
85+
if: contains(matrix.os, 'self-hosted')
5786
shell: bash -l {0}
5887
run: |
88+
conda activate proxarm-py${{ matrix.python-version }}
89+
conda info
90+
mamba list
91+
env
5992
pip wheel . -w dist
6093
6194
- name: Move proxsuite to specific dist folder

0 commit comments

Comments
 (0)