From 8f7488a48048c7579db81b00386dd6646c421d79 Mon Sep 17 00:00:00 2001 From: Charles Beauville Date: Thu, 12 Oct 2023 09:59:26 +0200 Subject: [PATCH] Reorganize artifact folders (#2503) --- .github/workflows/e2e.yml | 9 ++++++--- .github/workflows/framework-release.yml | 10 +++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ab3b123d1042..b868dc615399 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -41,10 +41,13 @@ jobs: echo "WHL_PATH=$(ls *.whl)" >> "$GITHUB_OUTPUT" sha_short=$(git rev-parse --short HEAD) echo "SHORT_SHA=$sha_short" >> "$GITHUB_OUTPUT" - aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./ s3://artifact.flower.dev/py/${{ github.head_ref || github.ref_name }}/$sha_short --recursive + [ -z "${{ github.head_ref }}" ] && dir="${{ github.ref_name }}" || dir="pr/${{ github.head_ref }}" + echo "DIR=$dir" >> "$GITHUB_OUTPUT" + aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./ s3://artifact.flower.dev/py/$dir/$sha_short --recursive outputs: whl_path: ${{ steps.upload.outputs.WHL_PATH }} short_sha: ${{ steps.upload.outputs.SHORT_SHA }} + dir: ${{ steps.upload.outputs.DIR }} frameworks: runs-on: ubuntu-22.04 @@ -123,7 +126,7 @@ jobs: - name: Install Flower wheel from artifact store if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork }} run: | - python -m pip install https://artifact.flower.dev/py/${{ github.head_ref || github.ref_name }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} + python -m pip install https://artifact.flower.dev/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} - name: Download dataset if: ${{ matrix.dataset }} run: python -c "${{ matrix.dataset }}" @@ -158,7 +161,7 @@ jobs: - name: Install Flower wheel from artifact store if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork }} run: | - python -m pip install https://artifact.flower.dev/py/${{ github.head_ref || github.ref_name }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} + python -m pip install https://artifact.flower.dev/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} - name: Cache Datasets uses: actions/cache@v3 with: diff --git a/.github/workflows/framework-release.yml b/.github/workflows/framework-release.yml index 81f1ecf4263f..2d2b7d8a4c4f 100644 --- a/.github/workflows/framework-release.yml +++ b/.github/workflows/framework-release.yml @@ -38,7 +38,15 @@ jobs: curl $wheel_url --output $wheel_name curl $tar_url --output $tar_name - + - name: Upload wheel + env: + AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }} + run: | + aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.WHEEL_NAME }} s3://artifact.flower.dev/py/release/v${{ env.TAG_NAME }}/${{ env.WHEEL_NAME }} + aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.TAR_NAME }} s3://artifact.flower.dev/py/release/v${{ env.TAG_NAME }}/${{ env.TAR_NAME }} + - name: Generate body run: | ./dev/get-latest-changelog.sh > body.md