Skip to content

Commit

Permalink
Test different runner sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
edmorley committed Jul 2, 2024
1 parent 5263022 commit 5b00b40
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/build_python_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ on:
- heroku-24
default: auto
required: false
runner_size:
description: "Runner size"
type: choice
options:
- large
- xlarge
- 2xlarge
required: true
dry_run:
description: "Skip uploading to S3 (dry run)"
type: boolean
default: false
default: true
required: false

permissions:
Expand All @@ -38,7 +46,7 @@ env:
jobs:
heroku-20:
if: inputs.stack == 'heroku-20' || inputs.stack == 'auto'
runs-on: pub-hk-ubuntu-22.04-xlarge
runs-on: pub-hk-ubuntu-22.04-${{ inputs.runner_size }}
env:
STACK_VERSION: "20"
steps:
Expand All @@ -53,14 +61,11 @@ jobs:
RUN_IMAGE='heroku/heroku:${{ env.STACK_VERSION }}'
ARCHIVE_FILENAME='python-${{ inputs.python_version }}-ubuntu-${{ env.STACK_VERSION }}.04-amd64.tar.zst'
docker run --rm --volume="${PWD}/upload:/upload:ro" --volume="${PWD}/builds:/builds:ro" "${RUN_IMAGE}" /builds/test_python_runtime.sh "/upload/${ARCHIVE_FILENAME}"
- name: Upload Python runtime archive to S3
if: (!inputs.dry_run)
run: aws s3 sync ./upload "s3://${S3_BUCKET}"
heroku-22:
# On Heroku-22 we only support Python 3.9+.
if: inputs.stack == 'heroku-22' || (inputs.stack == 'auto' && !startsWith(inputs.python_version,'3.8.'))
runs-on: pub-hk-ubuntu-22.04-xlarge
runs-on: pub-hk-ubuntu-22.04-${{ inputs.runner_size }}
env:
STACK_VERSION: "22"
steps:
Expand All @@ -75,9 +80,6 @@ jobs:
RUN_IMAGE='heroku/heroku:${{ env.STACK_VERSION }}'
ARCHIVE_FILENAME='python-${{ inputs.python_version }}-ubuntu-${{ env.STACK_VERSION }}.04-amd64.tar.zst'
docker run --rm --volume="${PWD}/upload:/upload:ro" --volume="${PWD}/builds:/builds:ro" "${RUN_IMAGE}" /builds/test_python_runtime.sh "/upload/${ARCHIVE_FILENAME}"
- name: Upload Python runtime archive to S3
if: (!inputs.dry_run)
run: aws s3 sync ./upload "s3://${S3_BUCKET}"
heroku-24:
# On Heroku-24 we only support Python 3.10+.
Expand All @@ -86,7 +88,7 @@ jobs:
fail-fast: false
matrix:
arch: ["amd64", "arm64"]
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm-xlarge' || 'pub-hk-ubuntu-22.04-xlarge' }}
runs-on: ${{ matrix.arch == 'arm64' && 'pub-hk-ubuntu-22.04-arm' || 'pub-hk-ubuntu-22.04' }}-${{ inputs.runner_size }}
env:
STACK_VERSION: "24"
steps:
Expand All @@ -101,6 +103,3 @@ jobs:
RUN_IMAGE='heroku/heroku:${{ env.STACK_VERSION }}'
ARCHIVE_FILENAME='python-${{ inputs.python_version }}-ubuntu-${{ env.STACK_VERSION }}.04-${{ matrix.arch }}.tar.zst'
docker run --rm --volume="${PWD}/upload:/upload:ro" --volume="${PWD}/builds:/builds:ro" "${RUN_IMAGE}" /builds/test_python_runtime.sh "/upload/${ARCHIVE_FILENAME}"
- name: Upload Python runtime archive to S3
if: (!inputs.dry_run)
run: aws s3 sync ./upload "s3://${S3_BUCKET}"

0 comments on commit 5b00b40

Please sign in to comment.