Skip to content

Commit

Permalink
Aggregating artifacts separately
Browse files Browse the repository at this point in the history
  • Loading branch information
djpugh committed May 1, 2023
1 parent 8829778 commit a21a073
Showing 1 changed file with 38 additions and 21 deletions.
59 changes: 38 additions & 21 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
needs:
- changes
if: >
(needs.changes.outputs.config == 'true' || needs.changes.outputs.workflows == 'true') ||
(needs.changes.outputs.src || needs.changes.outputs.tests || needs.changes.outputs.config || needs.changes.outputs.workflows) ||
(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')
Expand Down Expand Up @@ -177,13 +177,41 @@ jobs:
name: wheels-${{matrix.os}}-${{matrix.py}}
path: |
./wheels/*
aggregate:
name: Aggregate
runs-on: ubuntu-latest
needs:
- changes
- collate-packages
if: >
(needs.changes.outputs.src || needs.changes.outputs.tests || needs.changes.outputs.config || needs.changes.outputs.workflows) ||
(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')
steps:
- name: Download collated wheels
uses: actions/download-artifact@v3
with:
path: artifacts
- shell: bash
run: |
mkdir wheels
cp artifacts/*/*.whl wheels/
ls -l wheels/
- name: Store collated wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: |
./wheels/*
test:
name: Test Python ${{ matrix.py }} - ${{ matrix.os }} - ${{matrix.tox_version}}
runs-on: ${{ matrix.os }}-latest
needs:
- changes
- collate-packages
- aggregate
if: >
(needs.changes.outputs.src || needs.changes.outputs.tests || needs.changes.outputs.config || needs.changes.outputs.workflows) ||
(github.event_name == 'pull_request' ) ||
Expand Down Expand Up @@ -220,11 +248,8 @@ jobs:
- name: Download collated wheels
uses: actions/download-artifact@v3
with:
path: wheels
- shell: bash
run: |
cp wheels/*/*.whl src/azure_devops_artifacts_helpers/wheels/
ls -l src/azure_devops_artifacts_helpers/wheels/
name: wheels
path: 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 @@ -332,7 +357,7 @@ jobs:
name: Build Package
runs-on: windows-latest
needs:
- collate-packages
- aggregate
- changes
if: >
(needs.changes.outputs.src || needs.changes.outputs.config || needs.changes.outputs.workflows) ||
Expand All @@ -357,12 +382,8 @@ jobs:
- name: Download collated wheels
uses: actions/download-artifact@v3
with:
path: wheels

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

Expand All @@ -376,7 +397,7 @@ jobs:
docs:
name: Build docs
needs:
- collate-packages
- aggregate
- changes
if: >
(needs.changes.outputs.src || needs.changes.outputs.config || needs.changes.outputs.docs || needs.changes.outputs.workflows) ||
Expand All @@ -392,16 +413,12 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install tox
- name: Download collated wheels
uses: actions/download-artifact@v3
with:
path: wheels
name: wheels
path: src/azure_devops_artifacts_helpers/wheels/

- shell: bash
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

0 comments on commit a21a073

Please sign in to comment.