forked from Tulip-Dev/tulip
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gha/macos-wheels: Build wheels for arm64 architecture
- Loading branch information
Showing
2 changed files
with
45 additions
and
9 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 |
---|---|---|
|
@@ -2,14 +2,23 @@ name: macos-macports-wheels-build | |
on: [push, pull_request] | ||
jobs: | ||
macos: | ||
name: Talipot Python wheels build on macOS | ||
runs-on: macos-12 | ||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- name: Talipot wheels build on macOS x86_64 | ||
os: macos-12 | ||
- name: Talipot wheels build on macOS arm64 | ||
os: macos-14 | ||
env: | ||
CLANG_VERSION: 16 | ||
MACOSX_DEPLOYMENT_TARGET: "12.0" | ||
TWINE_REPOSITORY: https://test.pypi.org/legacy/ | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
@@ -77,9 +86,12 @@ jobs: | |
graphviz | ||
- name: Install Python versions to build wheels against | ||
run: | | ||
curl -LO https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg | ||
sudo installer -pkg python-3.9.0-macosx10.9.pkg -target / | ||
sudo /Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install wheel | ||
os_ver=$(sw_vers -productVersion | cut -c1-2) | ||
if [[ $os_ver -lt 13 ]]; then | ||
curl -LO https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg | ||
sudo installer -pkg python-3.9.0-macosx10.9.pkg -target / | ||
sudo /Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install wheel | ||
fi | ||
curl -LO https://www.python.org/ftp/python/3.10.0/python-3.10.0post2-macos11.pkg | ||
sudo installer -pkg python-3.10.0post2-macos11.pkg -target / | ||
sudo /Library/Frameworks/Python.framework/Versions/3.10/bin/pip3 install wheel | ||
|
@@ -97,7 +109,13 @@ jobs: | |
- name: Build Talipot Python wheels | ||
working-directory: ./build | ||
run: | | ||
for py3Version in 3.9 3.10 3.11 3.12 3.13 | ||
os_ver=$(sw_vers -productVersion | cut -c1-2) | ||
if [[ $os_ver -lt 13 ]]; then | ||
py3Versions="3.9 3.10 3.11 3.12 3.13" | ||
else | ||
py3Versions="3.10 3.11 3.12 3.13" | ||
fi | ||
for py3Version in $py3Versions | ||
do | ||
rm -f CMakeCache.txt || true | ||
sudo /Library/Frameworks/Python.framework/Versions/$py3Version/bin/pip3 install sip | ||
|
@@ -120,6 +138,7 @@ jobs: | |
- name: Test uploaded wheels in clean environment | ||
if: github.ref == 'refs/tags/dev-latest' | ||
run: | | ||
os_ver=$(sw_vers -productVersion | cut -c1-2) | ||
sudo port -N -f uninstall \ | ||
cmake \ | ||
clang-${CLANG_VERSION} \ | ||
|
@@ -140,9 +159,11 @@ jobs: | |
python313 \ | ||
py313-pip | ||
sudo pip-3.9 install --index-url https://test.pypi.org/simple/ talipot | ||
python3.9 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" | ||
python3.9 -c "from talipot import tlp; print(tlp.getImportPluginsList())" | ||
if [[ $os_ver -lt 13 ]]; then | ||
sudo pip-3.9 install --index-url https://test.pypi.org/simple/ talipot | ||
python3.9 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" | ||
python3.9 -c "from talipot import tlp; print(tlp.getImportPluginsList())" | ||
fi | ||
sudo pip-3.10 install --index-url https://test.pypi.org/simple/ talipot | ||
python3.10 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" | ||
|
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