Skip to content

Change macos integration tests to use precompiled binaries instead #561

Change macos integration tests to use precompiled binaries instead

Change macos integration tests to use precompiled binaries instead #561

name: Integration test
env:
version: 9.1.0
# runs on branches and pull requests; doesn't run on tags.
on:
push:
branches:
- '**'
jobs:
Integration-test:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Install dependencies (SCIPOptSuite)
run: |
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-linux.zip -O scip.zip
unzip scip.zip
mv scip_install scip
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Prepare python environment
run: |
python -m pip install --upgrade pip
python -m pip install networkx pytest-cov
- name: Install PySCIPOpt
run: |
export SCIPOPTDIR=$(pwd)/scip
python -m pip install .
- name: Run pyscipopt tests
run: |
py.test
Windows-test:
env:
SCIPOPTDIR: C:\scipoptdir
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Download dependencies (SCIPOptSuite)
shell: powershell
run: wget https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-win64-VS15.exe -outfile scipopt-installer.exe
- name: Install dependencies (SCIPOptSuite)
shell: cmd
run: scipopt-installer.exe /S /D=${{ env.SCIPOPTDIR }}
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Prepare python environment
shell: powershell
run: |
python -m pip install --upgrade pip
python -m pip install networkx pytest-cov
- name: Install PySCIPOpt
shell: powershell
run: |
$Env:SCIPOPTDIR = "${{ env.SCIPOPTDIR }}"
python -m pip install .
- name: Run pyscipopt tests
shell: powershell
run: |
py.test
MacOS-test:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Install dependencies (SCIPOptSuite)
run: |
brew install wget zlib gcc
wget https://github.com/scipopt/scipoptsuite-deploy/releases/download/v0.4.0/libscip-macos.zip -O scip.zip
unzip scip.zip
mv scip_install scip
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Prepare python environment
run: |
python -m pip install --upgrade pip
python -m pip install networkx pytest-cov pytest
- name: Install PySCIPOpt
run: |
export SCIPOPTDIR=${{ runner.workspace }}/scip/
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${{ runner.workspace }}/scip/lib
python -m pip install .
- name: Run pyscipopt tests
run: |
export SCIPOPTDIR=${{ runner.workspace }}/scip/
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${{ runner.workspace }}/scip/lib
py.test
### if you need valgrind on mac, you can install it via
# brew tap LouisBrunner/valgrind
# brew install --HEAD LouisBrunner/valgrind/valgrind