Skip to content

Commit

Permalink
Switch to using github's beta arm64 runners
Browse files Browse the repository at this point in the history
Until they become generally available, the image used for the runners
is missing _many_ tools (like make?!). This adds a step to install
docker and build-essential (that includes make).
  • Loading branch information
graveland committed Apr 17, 2024
1 parent 3ad2151 commit 15417a2
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 10 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/build_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,41 @@ env:
jobs:
build-branch:
name: Build and push branch
runs-on: [ "self-hosted", "ephemeral", "${{ matrix.runner_type }}" ]
runs-on: ${{ matrix.runs_on }}

strategy:
fail-fast: false
matrix:
platform: [ amd64, arm64 ]
include:
- platform: amd64
runner_type: x64
runs_on: ubuntu-22.04
- platform: arm64
runner_type: arm64
runs_on: cloud-image-runner-arm64

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install docker (arm64 beta)
if: matrix.platform == 'arm64'
run: |
sudo apt-get update
sudo apt-get install -y ca-certificates curl acl build-essential
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -69,10 +88,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.ORG_DOCKER_HUB_USERNAME }}
password: ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }}
Expand Down
30 changes: 25 additions & 5 deletions .github/workflows/publish_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- master
- main
paths-ignore:
- "*.md"

Expand Down Expand Up @@ -38,16 +39,35 @@ jobs:
- all_versions: "true"
all: "-all"
- platform: amd64
runner_type: x64
runs_on: ubuntu-22.04
- platform: arm64
runner_type: arm64
runs_on: cloud-image-runner-arm64

runs-on: [ "self-hosted", "ephemeral", "${{ matrix.runner_type }}" ]
runs-on: "${{ matrix.runs_on }}"

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install docker (arm64 beta)
if: matrix.platform == 'arm64'
run: |
sudo apt-get update
sudo apt-get install -y ca-certificates curl acl build-essential
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
sudo setfacl --modify user:$USER:rw /var/run/docker.sock
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -93,7 +113,7 @@ jobs:

# QEMU for multiplatform, which should be quick enough for pulling version information out of the images
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Publish combined manifest for pg${{ matrix.pg_major }}${{ matrix.docker_tag_postfix }}
env:
Expand Down Expand Up @@ -124,7 +144,7 @@ jobs:

# QEMU for multiplatform, which should be quick enough for just the checks
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Check pg${{ matrix.pg_major }}${{ matrix.docker_tag_postfix }}
env:
Expand Down

0 comments on commit 15417a2

Please sign in to comment.