Skip to content

Commit 383f352

Browse files
committed
feat: add ARM64 (linux/arm64) support for multi-arch Docker builds
Add QEMU emulation and multi-platform support to both CI workflows: - test.yml: add platform matrix dimension (amd64 + arm64) for full cross-arch testing - publish.yml: build and push multi-arch manifests (linux/amd64,linux/arm64)
1 parent 5193c58 commit 383f352

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
username: ${{ github.actor }}
4747
password: ${{ secrets.GITHUB_TOKEN }}
4848

49+
- name: Set up QEMU
50+
uses: docker/setup-qemu-action@v4
51+
4952
- name: Set up Docker Buildx
5053
uses: docker/setup-buildx-action@v4
5154

@@ -64,6 +67,7 @@ jobs:
6467
with:
6568
context: .
6669
push: true
70+
platforms: linux/amd64,linux/arm64
6771
tags: ${{ steps.meta.outputs.tags }}
6872
labels: ${{ steps.meta.outputs.labels }}
6973
build-args: |

.github/workflows/test.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,19 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
include:
16-
- pg_version: "17.9"
17-
postgis_version: "3.6.2"
18-
pgvector_version: "0.8.2"
19-
- pg_version: "16.13"
20-
postgis_version: "3.6.2"
21-
pgvector_version: "0.8.2"
22-
- pg_version: "15.17"
23-
postgis_version: "3.6.2"
24-
pgvector_version: "0.8.2"
25-
- pg_version: "14.22"
26-
postgis_version: "3.6.2"
27-
pgvector_version: "0.8.2"
15+
platform:
16+
- linux/amd64
17+
- linux/arm64
18+
pg_version: ["17.9", "16.13", "15.17", "14.22"]
19+
postgis_version: ["3.6.2"]
20+
pgvector_version: ["0.8.2"]
2821

2922
steps:
3023
- uses: actions/checkout@v6
3124

25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v4
27+
3228
- name: Set up Docker Buildx
3329
uses: docker/setup-buildx-action@v4
3430

@@ -37,6 +33,7 @@ jobs:
3733
with:
3834
context: .
3935
load: true
36+
platforms: ${{ matrix.platform }}
4037
tags: postgres-test:pg${{ matrix.pg_version }}
4138
build-args: |
4239
PG_VERSION=${{ matrix.pg_version }}
@@ -46,9 +43,10 @@ jobs:
4643
- name: Start PostgreSQL container and test extensions
4744
run: |
4845
IMAGE_TAG="postgres-test:pg${{ matrix.pg_version }}"
49-
echo "Testing image: $IMAGE_TAG"
46+
echo "Testing image: $IMAGE_TAG (platform: ${{ matrix.platform }})"
5047
5148
docker run -d --name test-db \
49+
--platform ${{ matrix.platform }} \
5250
-e POSTGRES_PASSWORD=test \
5351
-e POSTGRES_USER=test \
5452
-e POSTGRES_DB=test \

0 commit comments

Comments
 (0)