Skip to content

Test GHA

Test GHA #1

Workflow file for this run

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:
RUNNER_OS: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Install Gurobi
run: |
if [[ $RUNNER_OS == 'windows-2022' ]]; then
# get gurobi.msi and install
curl -L -o gurobi.msi https://packages.gurobi.com/11.0/gurobi11.0.0_win64.msi
msiexec /i gurobi.msi /quiet /qn /norestart
# set environment variables
echo "GUROBI_HOME=C:\gurobi1100\win64" >> $GITHUB_ENV
echo "PATH=$PATH;C:\gurobi1100\win64\bin" >> $GITHUB_ENV
# echo "GRB_LICENSE_FILE=C:\gurobi1100\win64\gurobi.lic" >> $GITHUB_ENV
fi
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,anaconda
- name: Install
run: |
conda install build pytest scikit-build-core nanobind
- name: Test
run: |
python -m pip list
python -m pip install -v .
python -c "import pyoptinterface as poi; print(dir(poi))"