diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml new file mode 100644 index 0000000..e91ca65 --- /dev/null +++ b/.github/workflows/build_wheels.yml @@ -0,0 +1,33 @@ +name: Build + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-20.04 + arch: x86_64 + # - os: macos-14 + # arch: arm64 + # - os: macos-latest + # arch: x86_64 + # - os: windows-latest + # arch: AMD64 + + + + steps: + - uses: actions/checkout@v4 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.16.5 + env: + CIBW_ARCHS: ${{ matrix.arch }} + CIBW_TEST_REQUIRES: pytest + CIBW_TEST_COMMAND: "pytest {project}/tests" + + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c0b8a62 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[build-system] +requires = ['setuptools', 'cython >=0.21', 'pyscipopt >=5.0.0'] +build-backend = "setuptools.build_meta" + +[tool.cibuildwheel.linux] +skip="pp* cp36* cp37* *musllinux*" +before-all = [ + "(apt-get update && apt-get install --yes wget) || yum install -y wget zlib libgfortran || brew install wget", + "wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.1.0/libscip-linux.zip -O scip.zip", + "unzip scip.zip", + "mv scip_install scip", + "rm -r scip/lib scip/bin", + + "wget http://www.tcs.hut.fi/Software/bliss/bliss-0.73.zip -O bliss.zip", + "unzip bliss.zip", + "mkdir bliss_build", + "mkdir bliss_build/lib", + "mkdir bliss_build/include", + "cd bliss-* && ./make && mv *.hh ../bliss_build/include && mv libbliss.a ../bliss_build/lib && cd ..", + + "wget https://github.com/scipopt/gcg/archive/refs/tags/v360.zip -O gcg.zip", + "unzip gcg.zip", + "mkdir gcg_build", + "cd gcg_build && cmake ../gcg-* -DSCIPOPTDIR=../scip -DBLISS_DIR=../bliss_build && make", + ] +environment = { SCIPOPTDIR="$(pwd)/scip", GCGOPTDIR="$(pwd)/gcg_build",` LD_LIBRARY_PATH="$(pwd)/scip/lib:$LD_LIBRARY_PATH", DYLD_LIBRARY_PATH="$(pwd)/scip/lib:$DYLD_LIBRARY_PATH", PATH="$(pwd)/scip/bin:$PATH", PKG_CONFIG_PATH="$(pwd)/scip/lib/pkgconfig:$PKG_CONFIG_PATH"}