Try ubuntu-latest #197
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: linux-build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
linux_build: | |
runs-on: ubuntu-latest | |
# Only allow one build at a time otherwise we can run out of licenses | |
concurrency: | |
group: linux_build | |
strategy: | |
fail-fast: true | |
matrix: | |
# python-version: ["3.9", "3.10", "3.11", "3.12"] | |
python-version: ["3.8", "3.11"] | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- uses: ./.github/actions/setup_optimizers_linux | |
with: | |
GUROBI_WLS: ${{ secrets.GUROBI_WLS }} | |
COPT_CLIENT_INI: ${{ secrets.COPT_CLIENT_INI }} | |
MOSEK_LICENSE: ${{ secrets.MOSEK_LICENSE }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CHECK_LICENSE: true | |
- name: Install python deps | |
run: | | |
python -m pip install pytest numpy highsbox llvmlite tccbox | |
- name: Build | |
# We need to use gcc-10 to support c++ concepts | |
env: | |
CC: gcc-10 | |
CXX: g++-10 | |
run: | | |
python -m pip list | |
python -m pip install nanobind scikit-build-core[pyproject] | |
python -m pip install --no-build-isolation -v . | |
python -c "import pyoptinterface as poi; print(dir(poi))" | |
python -m pip wheel -w dist --no-build-isolation . | |
- name: Test | |
run: | | |
python -m pytest tests -v | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pyoptinterface-wheel-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }} | |
path: dist/ |