From a382718726183199fb69ed5d8fe96ecff08484a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Z=C3=BClke?= Date: Mon, 15 Jul 2024 16:34:40 +0200 Subject: [PATCH] Update CI/workflow runners to Ubuntu 24.04 (#745) * Update CI/workflow runners to Ubuntu 24.04 See also: https://github.com/actions/runner-images/issues/9848 https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md https://salesforce.quip.com/bu6UA0KImOxJ#temp:C:GZRd13d2ce2d455470495cbd34cf * pip install in a venv for Ubuntu 24.04 * use pub-hk-ubuntu-24.04-arm-small instead of pub-hk-ubuntu-24.04-arm-ip --- .github/workflows/ci-cleanup.yml | 2 +- .github/workflows/ci.yml | 7 +++++-- .github/workflows/platform-build.yml | 8 ++++---- .github/workflows/platform-remove.yml | 2 +- .github/workflows/platform-sync.yml | 12 ++++++------ 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-cleanup.yml b/.github/workflows/ci-cleanup.yml index 24de9b98c6..1c95e28e93 100644 --- a/.github/workflows/ci-cleanup.yml +++ b/.github/workflows/ci-cleanup.yml @@ -12,7 +12,7 @@ permissions: jobs: hatchet-app-cleaner: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: HATCHET_APP_PREFIX: "htcht-" HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70e2458488..50afa371cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ env: jobs: integration-test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: stack: ["heroku-20", "heroku-22", "heroku-24"] @@ -52,11 +52,14 @@ jobs: tools: "composer:2.7" - name: Install packages from requirements.txt, plus s5cmd (for some tests) run: | + export VIRTUAL_ENV=$HOME/.venv + python3 -m venv "$VIRTUAL_ENV" + export PATH=$VIRTUAL_ENV/bin:$PATH pip install -r requirements.txt curl -sSLO https://github.com/peak/s5cmd/releases/download/v${S5CMD_VERSION}/s5cmd_${S5CMD_VERSION}_linux_amd64.deb echo "$S5CMD_HASH" | shasum -c - dpkg -x "s5cmd_${S5CMD_VERSION}_linux_amd64.deb" . - echo "$HOME/usr/bin" >> "$GITHUB_PATH" + echo "$HOME/usr/bin:$VIRTUAL_ENV/bin" >> "$GITHUB_PATH" - name: Hatchet setup run: bundle exec hatchet ci:setup - name: Export HEROKU_PHP_PLATFORM_REPOSITORIES to …${{env.src_path_suffix}} (since we are not building main or a tag) diff --git a/.github/workflows/platform-build.yml b/.github/workflows/platform-build.yml index 67c8ee138e..aa47ac1e69 100644 --- a/.github/workflows/platform-build.yml +++ b/.github/workflows/platform-build.yml @@ -41,7 +41,7 @@ permissions: jobs: formulae-list: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: formulae: ${{ steps.expand-formulae.outputs.matrix }} steps: @@ -62,7 +62,7 @@ jobs: ls -f ${{inputs.formulae}} | xargs -n 1 echo - >> "$GITHUB_STEP_SUMMARY" ls -f ${{inputs.formulae}} | jq -jcRn '[inputs|select(length>0)]' >> "$GITHUB_OUTPUT" docker-build: - runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-small' || 'ubuntu-22.04' }} + runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-24.04-arm-small' || 'ubuntu-24.04' }} steps: - name: Checkout uses: actions/checkout@v4 @@ -85,7 +85,7 @@ jobs: deploys: needs: [formulae-list, docker-build] if: ${{ needs.formulae-list.outputs.formulae != '[]' && needs.formulae-list.outputs.formulae != '' }} - runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-xlarge' || 'pub-hk-ubuntu-22.04-xlarge' }} + runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-24.04-arm-xlarge' || 'pub-hk-ubuntu-24.04-xlarge' }} strategy: max-parallel: ${{ fromJSON(inputs.concurrency) }} matrix: @@ -115,7 +115,7 @@ jobs: mkrepo: needs: [deploys] if: ${{ inputs.dry-run == false }} - runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-small' || 'ubuntu-22.04' }} + runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-24.04-arm-small' || 'ubuntu-24.04' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/platform-remove.yml b/.github/workflows/platform-remove.yml index 5efb0e669f..89e83a5d93 100644 --- a/.github/workflows/platform-remove.yml +++ b/.github/workflows/platform-remove.yml @@ -28,7 +28,7 @@ permissions: jobs: remove: - runs-on: ${{ endsWith(inputs.stack, 'arm64') && 'pub-hk-ubuntu-22.04-arm-small' || 'ubuntu-22.04' }} + runs-on: ${{ endsWith(inputs.stack, 'arm64') && 'pub-hk-ubuntu-24.04-arm-small' || 'ubuntu-24.04' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/platform-sync.yml b/.github/workflows/platform-sync.yml index c4e1d39d2d..bfbb9cba4b 100644 --- a/.github/workflows/platform-sync.yml +++ b/.github/workflows/platform-sync.yml @@ -45,7 +45,7 @@ permissions: jobs: stack-list: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: stacks: ${{ steps.list-stacks.outputs.matrix }} steps: @@ -61,7 +61,7 @@ jobs: docker-build: needs: stack-list if: ${{ needs.stack-list.outputs.stacks != '[]' && needs.stack-list.outputs.stacks != '' }} - runs-on: ${{ endsWith(matrix.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-small' || 'ubuntu-22.04' }} + runs-on: ${{ endsWith(matrix.stack, '-arm64') && 'pub-hk-ubuntu-24.04-arm-small' || 'ubuntu-24.04' }} strategy: matrix: stack: ${{ fromJSON(needs.stack-list.outputs.stacks) }} @@ -89,7 +89,7 @@ jobs: strategy: matrix: stack: ${{ fromJSON(needs.stack-list.outputs.stacks) }} - runs-on: ${{ endsWith(matrix.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-small' || 'ubuntu-22.04' }} + runs-on: ${{ endsWith(matrix.stack, '-arm64') && 'pub-hk-ubuntu-24.04-arm-small' || 'ubuntu-24.04' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -135,7 +135,7 @@ jobs: echo '```' >> "$GITHUB_STEP_SUMMARY" devcenter-generate: needs: sync - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: diff_result: ${{ steps.diff.outputs.diff_result }} steps: @@ -264,7 +264,7 @@ jobs: devcenter-update: needs: devcenter-generate if: ${{ needs.devcenter-generate.outputs.diff_result == 1 }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: HEROKU_DEVCENTER_API_TOKEN: ${{ secrets.HEROKU_DEVCENTER_API_TOKEN }} steps: @@ -326,7 +326,7 @@ jobs: echo 'Successfully updated ["PHP Support" Dev Center article](https://devcenter.heroku.com/articles/php-support) with synced packages.' >> "$GITHUB_STEP_SUMMARY" changelog-generate: needs: sync - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4