diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index c8f5cab79..d1d8ca994 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -12,13 +12,6 @@ jobs: steps: - uses: actions/checkout@v4 - - - name: Download SCIP - if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'ubuntu-20.04') - run: | - wget https://github.com/mmghannam/scip/releases/download/v8.0.3/libscip-ubuntu.zip -O scip.zip - unzip scip.zip - echo SCIPOPTDIR=$PWD/scip_install >> $GITHUB_ENV - name: Build wheels uses: pypa/cibuildwheel@v2.16.2 diff --git a/pyproject.toml b/pyproject.toml index 428fef521..bf3031190 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,14 @@ [build-system] requires = ['setuptools', 'cython <3, >=0.21'] build-backend = "setuptools.build_meta" + +[tool.cibuildwheel.linux] +before-all = [ + "(apt-get update && apt-get install --yes wget) || yum install -y wget || brew install wget", + "wget https://github.com/mmghannam/scip/releases/download/v8.0.3/libscip-ubuntu.zip -O scip.zip", + "unzip scip.zip", + "unzip upload.zip", + "mv home/runner/work/scip/scip/ipopt/ scip" + ] + +environment = { SCIPOPTDIR="$(pwd)/scip", 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"} \ No newline at end of file