Include all of the tests folder in the source tarball #428
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: Python (CPython) | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- master | |
jobs: | |
build-clang: | |
runs-on: macos-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install pip setuptools --upgrade | |
- name: Install package | |
run: | | |
CC=clang python -m pip install . --no-deps -vv | |
- name: Import package | |
run: | | |
python -c "import iteration_utilities" | |
- name: Install test dependencies | |
run: | | |
python -m pip install pytest | |
- name: Run tests | |
run: | | |
python -m pytest tests/ | |
build-python-with-debug: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Download Python 3.12 | |
run: | | |
wget https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz -q | |
python3 ci/verify_checksum.py Python-3.12.2.tgz 4e64a004f8ad9af1a75607cfd0d5a8c8 | |
- name: Install Python 3.12 | |
run: | | |
tar xzf Python-3.12.2.tgz | |
cd Python-3.12.2 | |
./configure --with-pydebug | |
sudo make altinstall -s -j2 | |
- name: Remove download | |
run: | | |
sudo python3.12 -c "import os; os.remove('./Python-3.12.2.tgz'); import shutil; shutil.rmtree('./Python-3.12.2/')" | |
- name: Install dependencies | |
run: | | |
python3.12 -m pip install pip setuptools wheel --upgrade --user --no-warn-script-location | |
- name: Create wheel | |
run: | | |
python3.12 -m pip wheel . --no-deps --wheel-dir=./wheelhouse/ -vv | |
- name: Install package | |
run: | | |
python3.12 -m pip install iteration_utilities --no-index --find-links=./wheelhouse/ --user -vv | |
- name: Import package | |
run: | | |
python3.12 -c "import iteration_utilities" | |
- name: Install test dependencies | |
run: | | |
python3.12 -m pip install pytest --user --no-warn-script-location | |
- name: Run tests | |
run: | | |
python3.12 -m pytest tests/ | |
build-sdist: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install pip setuptools wheel build --upgrade | |
- name: Create source distribution | |
run: | | |
python -m build | |
- name: Delete wheel | |
run: | | |
rm ./dist/*.whl | |
- name: Install package | |
run: | | |
python -m pip install ./dist/iteration_utilities-0.12.1.tar.gz -vv | |
- name: Import package | |
run: | | |
python -c "import iteration_utilities" | |
- name: Install test dependencies | |
run: | | |
python -m pip install pytest | |
- name: Run tests | |
run: | | |
python -m pytest tests/ | |
- name: Upload dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: py_sdist | |
path: ./dist/ | |
build-wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.16.5 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
CIBW_TEST_COMMAND: > | |
python -c "import iteration_utilities" && | |
pytest {package}/tests | |
CIBW_TEST_REQUIRES: pytest | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }} | |
path: ./wheelhouse/*.whl | |
build-docs: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install pip setuptools --upgrade | |
- name: Install package | |
run: | | |
python -m pip install . --no-deps -vv | |
- name: Install doc dependencies | |
run: | | |
python -m pip install sphinx numpydoc | |
- name: Build doc | |
run: | | |
sphinx-build -b html -W -a -n docs/ build/sphinx/html/ | |
- name: Upload documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: ./build/sphinx/html/ |