Update windows.yml #246
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: Ubuntu | |
on: | |
push: | |
branches: [ "master", "dev_actions" ] | |
tags: [ '**' ] | |
jobs: | |
build-ubuntu: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
strategy: | |
matrix: | |
os : [ubuntu-22.04] | |
arch: [x86_64] | |
python-version: ["3.11"] | |
#python-version: ["3.12", "3.11", "3.10", "3.9"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
cache: 'pip' | |
cache-dependency-path: '**/requirements*.txt' | |
- name: Install setuptools (needed from Python 3.12) | |
run: pip install setuptools | |
- name: Install Swig | |
run: sudo apt-get install swig | |
- name: Build choco-solver-capi | |
uses: ./.github/actions/build-choco-solver-capi | |
with: | |
os: ${{ runner.os }} | |
arch: ${{ matrix.arch }} | |
- name: Build pychoco | |
run: | | |
sh build.sh nocapibuild nowheel | |
pip install pychoco -f dist/ | |
- name: Test | |
run: | | |
pip install pytest | |
pip install -r requirements_tests.txt | |
pytest | |
- name: Generate Report | |
run: | | |
pip install coverage | |
coverage run -m unittest | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_SKIP: "*-musllinux*" | |
CIBW_BUILD_FRONTEND: build | |
CIBW_ARCHS: ${{ matrix.arch }} | |
with: | |
output-dir: dist | |
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
name: Upload to PyPi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true | |
skip-existing: true |