Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/_legacy-checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ on:
default: ''
required: false
type: string
upload_local:
description: 'When releasing, it installs local but need to upload with the actual version tag.'
default: false
required: false
type: boolean
create_pr:
description: 'Create a PR to enable testing PL with a new checkpoint.'
default: false
Expand Down Expand Up @@ -92,8 +97,12 @@ jobs:
- name: Generate checkpoints
working-directory: ${{ env.legacy_dir }}
run: bash generate_checkpoints.sh ${{ inputs.pl_version }}
- name: Rename local to actual version
if: inputs.upload_local
working-directory: ${{ env.legacy_dir }}
run: mv checkpoints/local checkpoints/${{ steps.decide-version.outputs.pl-version }}

- name: Keep artifact & DryRun
- name: "Determine: Keep artifact & DryRun"
run: |
python -c "print('KEEP_DAYS=' + str(30 if '${{ github.event_name }}'.startswith('pull_request') else 0))" >> $GITHUB_ENV
python -c "print('AWS_RUN=' + str('' if '${{inputs.push_to_s3}}' == 'true' else '--dryrun'))" >> $GITHUB_ENV
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyPI
name: Releasing

# https://help.github.com/en/actions/reference/events-that-trigger-workflows
on:
Expand Down Expand Up @@ -188,5 +188,6 @@ jobs:
uses: ./.github/workflows/_legacy-checkpoints.yml
with:
push_to_s3: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' }}
upload_local: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' }}
create_pr: ${{ startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' }}
secrets: inherit
4 changes: 2 additions & 2 deletions tests/legacy/generate_checkpoints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function create_and_save_checkpoint {
# iterate over all arguments assuming that each argument is version
for pl_ver in "$@"
do
printf "processing version: $pl_ver"
printf "\n\n processing version: $pl_ver\n"

# Don't install/update anything before activating venv to avoid breaking any existing environment.
python -m venv $ENV_PATH
Expand All @@ -46,7 +46,7 @@ done

# use the PL installed in the environment if no PL version is specified
if [[ -z "$@" ]]; then
printf "processing local version"
printf "\n\n processing local version\n"

python -m pip install -r $LEGACY_PATH/requirements.txt
pl_ver="local"
Expand Down