Retag wheels automatically when fusing #188
Workflow file for this run
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
# Builds wheels and libraries used to run tests, uploads them, then runs the standard tests. | |
name: Python Package | |
on: | |
push: | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- uses: pre-commit/action@v3.0.0 | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install MyPy | |
run: | | |
pip install mypy | |
- name: Install Delocate dependencies. | |
run: | | |
pip install --requirement test-requirements.txt | |
pip install --editable . | |
- name: MyPy | |
uses: liskin/gh-problem-matcher-wrap@v2 | |
with: | |
linters: mypy | |
run: mypy --show-column-numbers delocate/ | |
tests: | |
needs: [pre-commit, mypy] | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: "12.4" | |
- name: Workaround ARM64 issues | |
# https://github.com/actions/virtual-environments/issues/2557 | |
run: | | |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Build libs and wheels | |
# Use a venv from multibuild for this step. | |
run: | | |
source multibuild/osx_utils.sh | |
get_macpython_environment $MB_PYTHON_VERSION venv | |
make | |
env: | |
MB_PYTHON_VERSION: "3.9" | |
MB_PYTHON_OSX_VER: "10.9" | |
- name: Upload test data | |
uses: actions/upload-artifact@v3 | |
with: | |
name: delocate-tests-data | |
path: | | |
delocate/tests/data/ | |
retention-days: 3 | |
if-no-files-found: error | |
- name: Install test dependencies | |
run: | | |
pip install -r test-requirements.txt build | |
- name: Build delocate | |
run: | | |
python -m build | |
- name: Install delocate | |
run: | | |
pip install -e . | |
- name: Upload wheel | |
uses: actions/upload-artifact@v3 | |
with: | |
name: delocate-wheel | |
path: | | |
dist/delocate-*.whl | |
retention-days: 3 | |
if-no-files-found: error | |
- name: Upload requirements | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-requirements | |
path: | | |
test-requirements.txt | |
retention-days: 3 | |
if-no-files-found: error | |
- name: Run tests | |
run: | | |
pytest | |
- name: Collect code coverage data | |
run: | | |
coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
token: "624762bf-aaf0-4a75-b450-16f5ebece0b1" | |
isolated_tests: | |
needs: tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- os: "macos-11" | |
xcode: "12.4" | |
python: "3.x" | |
- os: "macos-11" | |
xcode: "13.0" | |
python: "3.x" | |
- os: "macos-12" | |
xcode: "14.0" | |
python: "3.x" | |
- os: "macos-13" | |
xcode: "14.2" | |
python: "3.x" | |
- os: "ubuntu-latest" | |
python: "3.7" | |
- os: "ubuntu-latest" | |
python: "3.8" | |
- os: "ubuntu-latest" | |
python: "3.9" | |
- os: "ubuntu-latest" | |
python: "3.10" | |
- os: "ubuntu-latest" | |
python: "3.11" | |
- os: "windows-latest" | |
python: "3.x" | |
steps: | |
- if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: ${{ matrix.xcode }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- if: runner.os == 'macOS' | |
name: Check otool version | |
run: otool --version | |
- name: Download wheel | |
uses: actions/download-artifact@v3 | |
with: | |
name: delocate-wheel | |
- name: Install delocate | |
run: | | |
pip install delocate-*.whl | |
- name: Download requirements | |
uses: actions/download-artifact@v3 | |
with: | |
name: test-requirements | |
- name: Install test dependencies | |
run: | | |
pip install -r test-requirements.txt | |
- name: Run isolated tests | |
run: | | |
pytest --pyargs delocate --log-level DEBUG --doctest-modules |