Skip to content

Commit 0c47bf9

Browse files
committed
Add ARM64 builds back
1 parent a0a07d3 commit 0c47bf9

4 files changed

Lines changed: 23 additions & 23 deletions

File tree

.github/workflows/bump_libraries.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
- 'uv.lock'
1010
- 'pyproject.toml'
1111

12-
env:
13-
PYTHON_VERSION: "3.12"
14-
1512
jobs:
1613
bump-changelog:
1714
runs-on: ubuntu-latest
@@ -20,6 +17,8 @@ jobs:
2017
contents: write
2118
steps:
2219
- uses: actions/checkout@v5
20+
- name: Read Python version from .python-version
21+
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
2322
- name: Install uv
2423
uses: astral-sh/setup-uv@v5
2524
- name: Set up Python ${{ env.PYTHON_VERSION }}

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ on:
77
branches: [ main ]
88

99
env:
10-
PYTHON_VERSION: "3.12"
1110
PIPELINE_FAMILY: "general"
1211

1312
jobs:
1413
lint:
1514
runs-on: ubuntu-latest
1615
steps:
1716
- uses: actions/checkout@v5
17+
- name: Read Python version from .python-version
18+
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
1819
- name: Install uv
1920
uses: astral-sh/setup-uv@v5
2021
with:
@@ -39,6 +40,8 @@ jobs:
3940
needs: lint
4041
steps:
4142
- uses: actions/checkout@v5
43+
- name: Read Python version from .python-version
44+
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
4245
- name: Install uv
4346
uses: astral-sh/setup-uv@v5
4447
with:
@@ -79,6 +82,8 @@ jobs:
7982
needs: lint
8083
steps:
8184
- uses: actions/checkout@v5
85+
- name: Read Python version from .python-version
86+
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
8287
- name: Install uv
8388
uses: astral-sh/setup-uv@v5
8489
with:

.github/workflows/docker-publish.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ env:
1010
DOCKER_BUILD_REPOSITORY: quay.io/unstructured-io/build-unstructured-api
1111
PACKAGE: "unstructured-api"
1212
PIPELINE_FAMILY: "general"
13-
PYTHON_VERSION: "3.12"
1413

1514
jobs:
1615
set-short-sha:
@@ -24,10 +23,8 @@ jobs:
2423
build-images:
2524
strategy:
2625
matrix:
27-
#arch: ["arm64", "amd64"]
28-
# NOTE(luke): temporary disable arm64 since its failing the smoke test
29-
arch: ["amd64"]
30-
runs-on: ubuntu-latest
26+
arch: ["arm64", "amd64"]
27+
runs-on: ${{ matrix.arch == 'arm64' && 'opensource-linux-arm64-4core' || 'ubuntu-latest' }}
3128
needs: set-short-sha
3229
env:
3330
SHORT_SHA: ${{ needs.set-short-sha.outputs.short_sha }}
@@ -36,9 +33,11 @@ jobs:
3633
- name: Set up Docker Buildx
3734
uses: docker/setup-buildx-action@v3
3835
with:
39-
driver: ${{ matrix.arch == 'amd64' && 'docker' || 'docker-container' }}
36+
driver: docker
4037
- name: Checkout code
4138
uses: actions/checkout@v5
39+
- name: Read Python version from .python-version
40+
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
4241
- name: Login to Quay.io
4342
uses: docker/login-action@v3
4443
with:
@@ -84,8 +83,6 @@ jobs:
8483
run: uv python install ${{ env.PYTHON_VERSION }}
8584
- name: Install test dependencies
8685
run: uv sync --extra test --frozen
87-
- name: Set up QEMU
88-
uses: docker/setup-qemu-action@v3
8986
- name: Test image
9087
run: |
9188
export DOCKER_IMAGE="$DOCKER_BUILD_REPOSITORY:${{ matrix.arch }}-$SHORT_SHA"
@@ -117,25 +114,22 @@ jobs:
117114
- name: Pull AMD image
118115
run: |
119116
docker pull $DOCKER_BUILD_REPOSITORY:amd64-$SHORT_SHA
120-
# - name: Pull ARM image
121-
# run: |
122-
# docker pull $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA
117+
- name: Pull ARM image
118+
run: |
119+
docker pull $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA
123120
- name: Push AMD and ARM tags
124121
run: |
125122
# these are used to construct the final manifest but also cache-from in subsequent runs
126123
docker tag $DOCKER_BUILD_REPOSITORY:amd64-$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64
127124
docker push $DOCKER_BUILD_REPOSITORY:amd64
128-
#docker tag $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA $DOCKER_BUILD_REPOSITORY:arm64
129-
#docker push $DOCKER_BUILD_REPOSITORY:arm64
125+
docker tag $DOCKER_BUILD_REPOSITORY:arm64-$SHORT_SHA $DOCKER_BUILD_REPOSITORY:arm64
126+
docker push $DOCKER_BUILD_REPOSITORY:arm64
130127
- name: Push multiarch manifest
131128
run: |
132-
#docker manifest create ${DOCKER_REPOSITORY}:latest $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
133-
docker manifest create ${DOCKER_REPOSITORY}:latest $DOCKER_BUILD_REPOSITORY:amd64
129+
docker manifest create ${DOCKER_REPOSITORY}:latest $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
134130
docker manifest push $DOCKER_REPOSITORY:latest
135-
#docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
136-
docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64
131+
docker manifest create ${DOCKER_REPOSITORY}:$SHORT_SHA $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
137132
docker manifest push $DOCKER_REPOSITORY:$SHORT_SHA
138133
VERSION=$(grep -oP '(?<=__version__ = ")[^"]+' prepline_general/api/__version__.py)
139-
#docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
140-
docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64
134+
docker manifest create ${DOCKER_REPOSITORY}:$VERSION $DOCKER_BUILD_REPOSITORY:amd64 $DOCKER_BUILD_REPOSITORY:arm64
141135
docker manifest push ${DOCKER_REPOSITORY}:$VERSION

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Update Dockerfile, CI workflows, and Makefile to use uv throughout
66
* Add type stubs (types-requests) as explicit test dependencies
77
* Fix flaky Korean OCR test assertions for tesseract compatibility
8+
* Use `.python-version` file as single source of truth for Python version across all CI workflows
9+
* Re-enable arm64 Docker image builds using a dedicated ARM runner (`opensource-linux-arm64-4core`), restoring multiarch support for both amd64 and arm64
810

911
## 0.0.93
1012
* Refactored the Dockerfile to use the chainguard/wolfi-base image instead of the unstructured/base-image. This is to align with the recent change in the unstructured repo where the same change was made.

0 commit comments

Comments
 (0)