Skip to content

Commit

Permalink
Upload artifacts to GH last
Browse files Browse the repository at this point in the history
  • Loading branch information
huydhn committed Feb 20, 2024
1 parent f39d09a commit 57383fc
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 36 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build_conda_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ jobs:
with:
repository: ${{ inputs.repository }}
script: ${{ inputs.post-script }}
- name: Upload artifact to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/distr/
- name: Smoke Test
env:
PACKAGE_NAME: ${{ inputs.package-name }}
Expand Down Expand Up @@ -217,10 +211,18 @@ jobs:
${CONDA_RUN_SMOKE} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
conda env remove -p "${CONDA_ENV_SMOKE}"
# NB: Only upload to GitHub after passing smoke tests
- name: Upload artifact to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/distr/

upload:
needs: build
uses: ./.github/workflows/_binary_conda_upload.yml
if: always()
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/build_conda_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,6 @@ jobs:
with:
repository: ${{ inputs.repository }}
script: ${{ inputs.post-script }}
- name: Upload artifact to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/distr/
- name: Smoke Test
shell: bash -l {0}
env:
Expand Down Expand Up @@ -221,6 +215,13 @@ jobs:
export PATH=${OLD_PATH}
conda env remove -p "${CONDA_ENV_SMOKE}"
# NB: Only upload to GitHub after passing smoke tests
- name: Upload artifact to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/distr/
- name: Clean up disk space
if: always()
continue-on-error: true
Expand All @@ -229,6 +230,7 @@ jobs:
upload:
needs: build
uses: ./.github/workflows/_binary_conda_upload.yml
if: always()
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/build_conda_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ jobs:
repository: ${{ inputs.repository }}
script: ${{ inputs.post-script }}
is_windows: 'enabled'
- name: Upload artifact to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/distr/
- name: Smoke Test
env:
PACKAGE_NAME: ${{ inputs.package-name }}
Expand Down Expand Up @@ -248,10 +242,18 @@ jobs:
${CONDA_RUN_SMOKE} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
conda env remove -p "${CONDA_ENV_SMOKE}"
# NB: Only upload to GitHub after passing smoke tests
- name: Upload artifact to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/distr/

upload:
needs: build
uses: ./.github/workflows/_binary_conda_upload.yml
if: always()
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,6 @@ jobs:
with:
repository: ${{ inputs.repository }}
script: ${{ inputs.post-script }}
- name: Upload wheel to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/dist/
- name: Smoke Test
shell: bash -l {0}
env:
Expand Down Expand Up @@ -228,6 +222,13 @@ jobs:
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
# NB: Only upload to GitHub after passing smoke tests
- name: Upload wheel to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/dist/

upload:
needs: build
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,6 @@ jobs:
with:
repository: ${{ inputs.repository }}
script: ${{ inputs.post-script }}
- name: Upload wheel to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/dist/
- name: Smoke Test
shell: bash -l {0}
env:
Expand Down Expand Up @@ -203,6 +197,13 @@ jobs:
${CONDA_RUN} python3 "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
export PATH=${OLD_PATH}
# NB: Only upload to GitHub after passing smoke tests
- name: Upload wheel to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/dist/
- name: Clean up disk space
if: always()
continue-on-error: true
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/build_wheels_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ jobs:
set -euxo pipefail
source "${BUILD_ENV_FILE}"
${CONDA_RUN} ${ENV_SCRIPT} ${POST_SCRIPT}
- name: Upload wheel to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/dist/
- name: Smoke Test
env:
PACKAGE_NAME: ${{ inputs.package-name }}
Expand All @@ -192,6 +186,13 @@ jobs:
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found"
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}"
fi
# NB: Only upload to GitHub after passing smoke tests
- name: Upload wheel to GitHub
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.repository }}/dist/
- uses: ./test-infra/.github/actions/teardown-windows
if: always()
name: Teardown Windows
Expand Down

0 comments on commit 57383fc

Please sign in to comment.