Skip to content

Merge pull request #37 from tlorieul/master #237

Merge pull request #37 from tlorieul/master

Merge pull request #37 from tlorieul/master #237

Workflow file for this run

name: Windows
on:
push:
branches: [ "master", "dev_actions" ]
tags: [ '**' ]
jobs:
build-windows:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
os : [windows-2022]
arch: [x86_64]
python-version: ["3.11"]
steps:
- name: Print system info
run: echo $(uname -o) $(uname -r) $(uname -m)
- 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: choco 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 -U pytest
pip install -r requirements_tests.txt
pytest
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: AMD64
with:
output-dir: dist
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Upload wheel artifacts
uses: actions/upload-artifact@v3
with:
name: wheel-${{matrix.os}}-${{matrix.python-version}}-artifact
path: dist/
if-no-files-found: error
upload-pypi-windows:
needs: build-windows
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
strategy:
matrix:
os : [windows-2022]
python-version: ["3.11"]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: wheel-${{matrix.os}}-${{matrix.python-version}}-artifact
path: dist
- name: List files
run: ls -R
- 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