Use cygwin shell in windows. #41
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: Build | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
tox: [lint, py39, py310, py311, py312] | ||
include: | ||
- tox: lint | ||
python-version: "3.9" | ||
- tox: py39 | ||
python-version: "3.9" | ||
- tox: py310 | ||
python-version: "3.10" | ||
- tox: py311 | ||
python-version: "3.11" | ||
- tox: py312 | ||
python-version: "3.12" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Cygwin | ||
uses: egor-tensin/setup-cygwin@v4 | ||
if: runner.os == 'Windows' | ||
with: | ||
packages: gcc-core gcc-g++ python3${{ matrix.python-version }}-devel ninja pkgconf | ||
- name: Display Python version | ||
run: | | ||
python -c "import sys; print(sys.version)" | ||
pip --version | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install tox | ||
- name: Run Tox | ||
shell: ${{ runner.os == 'Windows' && C:\tools\cygwin\bin\bash.exe || sh }} | ||
Check failure on line 45 in .github/workflows/CI.yml
|
||
run: | | ||
tox -- --hypothesis-profile=ci --durations=20 | ||
env: | ||
TOXENV: ${{ matrix.tox }} | ||
release: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Build | ||
run: | | ||
pip install setuptools | ||
python setup.py sdist | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 |