Test GHA #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-2022 ] | |
python-version: ["3.11"] | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Gurobi | |
run: | | |
if [[ $RUNNER_OS == 'Windows' ]]; then | |
curl -L -o gurobi.msi https://packages.gurobi.com/11.0/Gurobi-11.0.0-win64.msi | |
choco install lessmsi | |
lessmsi x gurobi.msi "D:\" | |
ls D:\SourceDir | |
# set environment variables | |
$env:GUROBI_HOME="D:\SourceDir\gurobi1100\win64" | |
$env:PATH="$env:PATH;D:\SourceDir\gurobi1100\win64\bin" | |
# echo "GRB_LICENSE_FILE=C:\gurobi1100\win64\gurobi.lic" >> $env:GITHUB_ENV | |
echo $env:GUROBI_HOME | |
else | |
echo "$RUNNER_OS is not supported" | |
echo "No Gurobi installation" | |
exit | |
fi | |
- name: Install | |
run: | | |
python -m pip install build pytest | |
- name: Test | |
run: | | |
python -m pip list | |
python -m pip install -v . | |
python -c "import pyoptinterface as poi; print(dir(poi))" |