Skip to content

Commit e653a4a

Browse files
authored
♻️CI: Upgraded setup-uv to v6, try fix ARM build, modularization of CI file (#7604)
1 parent 2f98a0b commit e653a4a

File tree

5 files changed

+194
-156
lines changed

5 files changed

+194
-156
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Reusable Build Images
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
build-backend:
7+
required: true
8+
type: boolean
9+
description: "Whether backend images should be built"
10+
build-frontend:
11+
required: true
12+
type: boolean
13+
description: "Whether frontend images should be built"
14+
python-version:
15+
required: true
16+
type: string
17+
description: "Python version to use"
18+
os:
19+
required: true
20+
type: string
21+
description: "Runner OS to use"
22+
outputs:
23+
backend-artifact-name:
24+
description: "Name of the backend artifact"
25+
value: ${{ jobs.build-test-images.outputs.artifact-name }}
26+
frontend-artifact-name:
27+
description: "Name of the frontend artifact"
28+
value: ${{ jobs.build-test-images-frontend.outputs.artifact-name }}
29+
30+
jobs:
31+
build-test-images:
32+
if: ${{ inputs.build-backend }}
33+
timeout-minutes: 30
34+
runs-on: ${{ inputs.os }}
35+
outputs:
36+
artifact-name: docker-buildx-images-${{ runner.os }}-${{ github.sha }}-backend
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: setup docker buildx
40+
id: buildx
41+
uses: docker/setup-buildx-action@v3
42+
with:
43+
driver: docker-container
44+
- name: expose github runtime for buildx
45+
uses: crazy-max/ghaction-github-runtime@v3
46+
- name: show system environs
47+
run: ./ci/helpers/show_system_versions.bash
48+
- name: build images
49+
run: |
50+
export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
51+
mkdir --parents /${{ runner.temp }}/build
52+
make build local-dest=/${{ runner.temp }}/build exclude=static-webserver
53+
- name: upload build artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: docker-buildx-images-${{ runner.os }}-${{ github.sha }}-backend
57+
path: /${{ runner.temp }}/build
58+
59+
build-test-images-frontend:
60+
if: ${{ inputs.build-frontend }}
61+
timeout-minutes: 30
62+
runs-on: ${{ inputs.os }}
63+
outputs:
64+
artifact-name: docker-buildx-images-${{ runner.os }}-${{ github.sha }}-frontend
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: setup docker buildx
68+
id: buildx
69+
uses: docker/setup-buildx-action@v3
70+
with:
71+
driver: docker-container
72+
- name: expose github runtime for buildx
73+
uses: crazy-max/ghaction-github-runtime@v3
74+
- name: show system environs
75+
run: ./ci/helpers/show_system_versions.bash
76+
- name: build images
77+
run: |
78+
export DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
79+
mkdir --parents /${{ runner.temp }}/build
80+
make build local-dest=/${{ runner.temp }}/build target=static-webserver
81+
- name: upload build artifacts
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: docker-buildx-images-${{ runner.os }}-${{ github.sha }}-frontend
85+
path: /${{ runner.temp }}/build

.github/workflows/ci-arm-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ jobs:
5555
run: |
5656
export DOCKER_IMAGE_TAG="$TAG_PREFIX-latest-arm64"
5757
export DOCKER_TARGET_PLATFORMS=linux/arm64
58+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
59+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
60+
export UV_COMPILE_BYTECODE=1
61+
export UV_CONCURRENT_INSTALLS=1
5862
make build push=true

.github/workflows/ci-pact-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
python-version: "3.11"
2828
- name: install uv
29-
uses: astral-sh/setup-uv@v5
29+
uses: astral-sh/setup-uv@v6
3030
with:
3131
version: "0.6.x"
3232
enable-cache: false

0 commit comments

Comments
 (0)