Skip to content

Commit

Permalink
Add cibuildwheel workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ju-manns committed May 3, 2024
1 parent 6e2e51a commit 68bd32a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build

on: [push]

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/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 && cd ..",
]
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"}

0 comments on commit 68bd32a

Please sign in to comment.