From 248ffb6a0104db629e6940803818e7857f45ea24 Mon Sep 17 00:00:00 2001 From: metab0t Date: Thu, 25 Jan 2024 13:41:43 +0800 Subject: [PATCH] Test GHA --- .github/workflows/build.yml | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..46d06ff --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,52 @@ +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/gurobi11.0.0_win64.msi + msiexec /i gurobi.msi /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 + 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))"