Skip to content

Commit

Permalink
Try out macos arm build wihtout line tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmghannam committed Jun 21, 2024
1 parent 9ac8f49 commit b766131
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-20.04
arch: x86_64
# - os: ubuntu-20.04
# arch: x86_64
- os: macos-14
arch: arm64
- os: macos-13
arch: x86_64
- os: windows-latest
arch: AMD64
# - os: macos-13
# arch: x86_64
# - os: windows-latest
# arch: AMD64



Expand Down Expand Up @@ -53,17 +53,17 @@ jobs:
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
# upload_pypi:
# needs: [build_wheels, build_sdist]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: artifact
# path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
# - uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# verbose: true
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ environment = { SCIPOPTDIR="$(pwd)/scip", LD_LIBRARY_PATH="$(pwd)/scip/lib:$LD_L


[tool.cibuildwheel.macos]
skip="pp* cp36* cp37*"
skip="pp* cp36* cp37* cp311* cp310* cp38*"
before-all = '''
#!/bin/bash
brew install wget zlib gcc
if [[ $CIBW_ARCHS == *"arm"* ]]; then
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.3.0/libscip-macos-arm.zip -O scip.zip
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-macos-arm.zip -O scip.zip
else
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.3.0/libscip-macos.zip -O scip.zip
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-macos.zip -O scip.zip
fi
unzip scip.zip
mv scip_install src/scip
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@

ext = ".pyx" if use_cython else ".c"

on_github_actions = os.getenv('GITHUB_ACTIONS') == 'true'

extensions = [
Extension(
"pyscipopt.scip",
Expand All @@ -94,12 +92,12 @@
libraries=[libname],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
define_macros= [("CYTHON_TRACE_NOGIL", 1), ("CYTHON_TRACE", 1)] if on_github_actions else []
define_macros= []
)
]

if use_cython:
extensions = cythonize(extensions, compiler_directives={"language_level": 3, "linetrace": on_github_actions})
extensions = cythonize(extensions, compiler_directives={"language_level": 3, "linetrace": False})

with open("README.md") as f:
long_description = f.read()
Expand Down
6 changes: 6 additions & 0 deletions something.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from pyscipopt import Model, quicksum




print("")

0 comments on commit b766131

Please sign in to comment.