Merge pull request #343 from MSeifert04/new_version #423
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 | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- 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.0/Python-3.12.0.tgz -q | |
python3 ci/verify_checksum.py Python-3.12.0.tgz d6eda3e1399cef5dfde7c4f319b0596c | |
- name: Install Python 3.12 | |
run: | | |
tar xzf Python-3.12.0.tgz | |
cd Python-3.12.0 | |
./configure --with-pydebug | |
sudo make altinstall -s -j2 | |
- name: Remove download | |
run: | | |
sudo python3.12 -c "import os; os.remove('./Python-3.12.0.tgz'); import shutil; shutil.rmtree('./Python-3.12.0/')" | |
- 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 | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- 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.0.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@v3 | |
with: | |
name: py_sdist | |
path: ./dist/ | |
build-wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-11] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.16.2 | |
- 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@v3 | |
with: | |
name: wheels | |
path: ./wheelhouse/*.whl | |
build-docs: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Check out source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- 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@v3 | |
with: | |
name: docs | |
path: ./build/sphinx/html/ |