Skip to content

Commit

Permalink
Try new Arm Ltd images for GHA runners
Browse files Browse the repository at this point in the history
  • Loading branch information
dzuelke authored and robinwo committed Sep 13, 2024
1 parent 0c3796b commit 80f3f2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 54 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/platform-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,10 @@ 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-large' || 'ubuntu-22.04' }}
runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-limited-large' || 'ubuntu-22.04' }}
steps:
- name: Checkout
uses: actions/checkout@v4
# The beta ARM64 runners don't yet ship with the normal installed tools.
- name: Install Docker (ARM64 only)
if: endsWith(inputs.stack, '-arm64')
run: |
sudo apt-get update --error-on=any
sudo apt-get install -y --no-install-recommends acl docker.io docker-buildx
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Cache Docker build
id: cache-docker
uses: actions/cache@v4
Expand All @@ -95,7 +87,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-large' || 'pub-hk-ubuntu-22.04-large' }}
runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-limited-large' || 'pub-hk-ubuntu-22.04-large' }}
strategy:
max-parallel: ${{ fromJSON(inputs.concurrency) }}
matrix:
Expand All @@ -111,14 +103,6 @@ jobs:
with:
key: docker-cache-heroku-php-build-${{inputs.stack}}.${{github.sha}}
path: /tmp/docker-cache.tar.gz
# The beta ARM64 runners don't yet ship with the normal installed tools.
- name: Install Docker (ARM64 only)
if: endsWith(inputs.stack, '-arm64')
run: |
sudo apt-get update --error-on=any
sudo apt-get install -y --no-install-recommends acl docker.io docker-buildx
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Load cached Docker image
run: docker load -i /tmp/docker-cache.tar.gz
- name: Build formula without deploying
Expand All @@ -133,7 +117,7 @@ jobs:
mkrepo:
needs: [deploys]
if: ${{ inputs.dry-run == false && inputs.publish == true }}
runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-large' || 'ubuntu-22.04' }}
runs-on: ${{ endsWith(inputs.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-limited-large' || 'ubuntu-22.04' }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -145,14 +129,6 @@ jobs:
with:
key: docker-cache-heroku-php-build-${{inputs.stack}}.${{github.sha}}
path: /tmp/docker-cache.tar.gz
# The beta ARM64 runners don't yet ship with the normal installed tools.
- name: Install Docker (ARM64 only)
if: endsWith(inputs.stack, '-arm64')
run: |
sudo apt-get update --error-on=any
sudo apt-get install -y --no-install-recommends acl docker.io docker-buildx
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Load cached Docker image
run: docker load -i /tmp/docker-cache.tar.gz
- name: Re-generate platform package repository
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/platform-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ permissions:

jobs:
remove:
runs-on: ${{ endsWith(inputs.stack, 'arm64') && 'pub-hk-ubuntu-22.04-arm-large' || 'ubuntu-22.04' }}
runs-on: ${{ endsWith(inputs.stack, 'arm64') && 'pub-hk-ubuntu-22.04-arm-limited-large' || 'ubuntu-22.04' }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -46,14 +46,6 @@ jobs:
with:
key: docker-cache-heroku-php-build-${{inputs.stack}}.${{github.sha}}
path: /tmp/docker-cache.tar.gz
# The beta ARM64 runners don't yet ship with the normal installed tools.
- name: Install Docker (ARM64 only)
if: endsWith(inputs.stack, '-arm64')
run: |
sudo apt-get update --error-on=any
sudo apt-get install -y --no-install-recommends acl docker.io docker-buildx
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Load cached Docker image
if: steps.restore-docker.outputs.cache-hit == 'true'
run: docker load -i /tmp/docker-cache.tar.gz
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/platform-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,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-large' || 'ubuntu-22.04' }}
runs-on: ${{ endsWith(matrix.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-limited-large' || 'ubuntu-22.04' }}
strategy:
matrix:
stack: ${{ fromJSON(needs.stack-list.outputs.stacks) }}
Expand All @@ -67,14 +67,6 @@ jobs:
with:
key: docker-cache-heroku-php-build-${{matrix.stack}}.${{github.sha}}
path: /tmp/docker-cache.tar.gz
# The beta ARM64 runners don't yet ship with the normal installed tools.
- name: Install Docker (ARM64 only)
if: endsWith(matrix.stack, '-arm64')
run: |
sudo apt-get update --error-on=any
sudo apt-get install -y --no-install-recommends acl docker.io docker-buildx
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Load cached Docker image
if: steps.restore-docker.outputs.cache-hit == 'true'
run: docker load -i /tmp/docker-cache.tar.gz
Expand All @@ -99,7 +91,7 @@ jobs:
strategy:
matrix:
stack: ${{ fromJSON(needs.stack-list.outputs.stacks) }}
runs-on: ${{ endsWith(matrix.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-large' || 'ubuntu-22.04' }}
runs-on: ${{ endsWith(matrix.stack, '-arm64') && 'pub-hk-ubuntu-22.04-arm-limited-large' || 'ubuntu-22.04' }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -111,14 +103,6 @@ jobs:
with:
key: docker-cache-heroku-php-build-${{matrix.stack}}.${{github.sha}}
path: /tmp/docker-cache.tar.gz
# The beta ARM64 runners don't yet ship with the normal installed tools.
- name: Install Docker (ARM64 only)
if: endsWith(matrix.stack, '-arm64')
run: |
sudo apt-get update --error-on=any
sudo apt-get install -y --no-install-recommends acl docker.io docker-buildx
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Load cached Docker image
run: docker load -i /tmp/docker-cache.tar.gz
- name: ${{ inputs.dry-run == true && 'Dry-run sync of' || 'Sync' }} changed packages to production bucket
Expand Down

0 comments on commit 80f3f2c

Please sign in to comment.