Skip to content

Commit

Permalink
Fixing artifacts download - back to matrix due to pypa/pip#11664
Browse files Browse the repository at this point in the history
  • Loading branch information
djpugh committed May 1, 2023
1 parent 18d9b60 commit 05b4f83
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
43 changes: 31 additions & 12 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,33 +132,49 @@ jobs:

collate-packages:
name: Collate Wheels
runs-on: windows-latest
runs-on: ${{ matrix.os}}-latest
needs:
- changes
if: >
(needs.changes.outputs.config == 'true' || needs.changes.outputs.workflows == 'true') ||
(github.event_name == 'pull_request' && contains(github.base_ref, 'main')) ||
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || contains(github.ref, 'main'))) ||
(github.event_name == 'release')
strategy:
fail-fast: true
# needs to run as matricx due to https://github.com/pypa/pip/issues/11664
# dependencies aren't evaluated by the requested platform
matrix:
os:
- ubuntu
- windows
- macos
py:
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.py }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Populate platform wheels
run: tox -e populate -- --target-dir ./wheels
run: tox -e populate -- --target-dir ./wheels --py ${{matrix.py}} --platform ${{matrix.os}}

- name: Store collated wheels
uses: actions/upload-artifact@v3
with:
name: wheels
name: wheels-${{matrix.os}}-${{matrix.py}}
path: |
./wheels/*
Expand Down Expand Up @@ -204,10 +220,11 @@ jobs:
- name: Download collated wheels
uses: actions/download-artifact@v3
with:
name: wheels
path: src/azure_devops_artifacts_helpers/wheels/
# - shell: bash
# run: cp -u wheels/*.whl src/azure_devops_artifacts_helpers/wheels/
path: wheels
- shell: bash
run: |
cp -u wheels/*/*.whl src/azure_devops_artifacts_helpers/wheels/
ls -l src/azure_devops_artifacts_helpers/wheels/
- name: Setup Test Suite
run: tox -e test-${{ matrix.tox_version }} -vv --notest
- name: Run Test Suite
Expand Down Expand Up @@ -343,8 +360,9 @@ jobs:
path: wheels

- shell: bash
run: cp -u wheels/*.whl src/azure_devops_artifacts_helpers/wheels/

run: |
cp -u wheels/*/*.whl src/azure_devops_artifacts_helpers/wheels/
ls -l src/azure_devops_artifacts_helpers/wheels/
- name: Build azure_devops_artifacts_helpers
run: tox -e build -vvv

Expand Down Expand Up @@ -381,8 +399,9 @@ jobs:
path: wheels

- shell: bash
run: cp -u wheels/*.whl src/azure_devops_artifacts_helpers/wheels/

run: |
cp -u wheels/*/*.whl src/azure_devops_artifacts_helpers/wheels/
ls -l src/azure_devops_artifacts_helpers/wheels/
- name: Build docs
run: tox -e docs
env:
Expand Down
11 changes: 10 additions & 1 deletion tools/populate-wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,20 @@ def populate_wheels(index_url: str = DOWNLOAD_INDEX_URL, python_versions: List[s
python_versions = [f'{min_version.major}.{minor}' for minor in range(min_version.minor, max_version.minor+1)]
print(f'Using versions: {python_versions} from {_min_version}:{_max_version}')
if not platforms:
platforms = ['win32', 'darwin', 'linux']
platforms = ['win32', 'darwin', 'linux',
'linux_x86_64', 'any',
'manylinux1_x86_64', 'win_amd64',
'manylinux_2_28_x86_64',
'manylinux_2_17_x86_64',
'macosx_11_0_x86_64',
'macosx_11_0_arm64',
'macosx_11_0_universal2'
]
processed_platforms = []
for plat in platforms:
if 'ubuntu' in plat:
plat = 'linux'
linux_x86_64
elif 'windows' in plat:
plat = 'win32'
elif 'macos' in plat:
Expand Down

0 comments on commit 05b4f83

Please sign in to comment.