Skip to content

Commit 09f0fa6

Browse files
authored
chore(ci): Use native AMR64 runner for Cube Store builds (#10227)
1 parent 5633951 commit 09f0fa6

File tree

5 files changed

+46
-20
lines changed

5 files changed

+46
-20
lines changed

.github/workflows/publish.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -590,27 +590,31 @@ jobs:
590590
- x86_64-unknown-linux-musl
591591
- aarch64-unknown-linux-gnu
592592
include:
593-
- target: x86_64-unknown-linux-gnu
594-
os: ubuntu-24.04
593+
# Please use minimal possible version of ubuntu, because it produces constraint on glibc
594+
- os: ubuntu-22.04
595+
target: x86_64-unknown-linux-gnu
596+
image: cubejs/rust-cross:x86_64-unknown-linux-gnu-15082024
595597
executable_name: cubestored
596598
strip: true
597599
compress: false
598-
- target: x86_64-unknown-linux-musl
599-
os: ubuntu-24.04
600+
- os: ubuntu-22.04
601+
target: x86_64-unknown-linux-musl
602+
image: cubejs/rust-cross:x86_64-unknown-linux-musl-15082024
600603
executable_name: cubestored
601604
strip: true
602605
# cubestored: CantPackException: bad DT_HASH nbucket=0x344 len=0x1890
603606
compress: false
604-
- target: aarch64-unknown-linux-gnu
605-
os: ubuntu-24.04
607+
- os: ubuntu-24.04-arm
608+
image: cubejs/rust-builder:bullseye-llvm-18
609+
target: aarch64-unknown-linux-gnu
606610
executable_name: cubestored
607611
# Unable to recognise the format of the input file `rust/cubestore/target/aarch64-unknown-linux-gnu/release/cubestored'
608612
strip: false
609613
# UPX is broken, issue https://github.com/cube-js/cube/issues/4474
610614
compress: false
611615
fail-fast: false
612616
container:
613-
image: cubejs/rust-cross:${{ matrix.target }}-15082024
617+
image: ${{ matrix.image }}
614618
permissions:
615619
contents: write
616620
steps:
@@ -626,7 +630,7 @@ jobs:
626630
- uses: Swatinem/rust-cache@v2
627631
with:
628632
workspaces: ./rust/cubestore -> target
629-
prefix-key: v0-rust-cubestore-cross
633+
prefix-key: v1-rust-cubestore-cross
630634
key: target-${{ matrix.target }}
631635
- name: Build with Cargo
632636
run: |

.github/workflows/rust-cubestore-master.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,19 @@ jobs:
264264
# Please use minimal possible version of ubuntu, because it produces constraint on glibc
265265
- os: ubuntu-22.04
266266
target: x86_64-unknown-linux-gnu
267+
image: cubejs/rust-cross:x86_64-unknown-linux-gnu-15082024
267268
executable_name: cubestored
268269
strip: true
269270
compress: false
270271
- os: ubuntu-22.04
271272
target: x86_64-unknown-linux-musl
273+
image: cubejs/rust-cross:x86_64-unknown-linux-musl-15082024
272274
executable_name: cubestored
273275
strip: true
274276
# cubestored: CantPackException: bad DT_HASH nbucket=0x344 len=0x1890
275277
compress: false
276-
- os: ubuntu-22.04
278+
- os: ubuntu-24.04-arm
279+
image: cubejs/rust-builder:bullseye-llvm-18
277280
target: aarch64-unknown-linux-gnu
278281
executable_name: cubestored
279282
# Unable to recognise the format of the input file `rust/cubestore/target/aarch64-unknown-linux-gnu/release/cubestored'
@@ -282,7 +285,7 @@ jobs:
282285
compress: false
283286
fail-fast: false
284287
container:
285-
image: cubejs/rust-cross:${{ matrix.target }}-15082024
288+
image: ${{ matrix.image }}
286289
steps:
287290
- uses: actions/checkout@v4
288291
- name: Setup Rust toolchain
@@ -296,7 +299,7 @@ jobs:
296299
- uses: Swatinem/rust-cache@v2
297300
with:
298301
workspaces: ./rust/cubestore -> target
299-
prefix-key: v0-rust-cubestore-cross
302+
prefix-key: v1-rust-cubestore-cross
300303
key: target-${{ matrix.target }}
301304
- name: Build with Cargo
302305
run: |

.github/workflows/rust-cubestore.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,19 @@ jobs:
203203
# Please use minimal possible version of ubuntu, because it produces constraint on glibc
204204
- os: ubuntu-22.04
205205
target: x86_64-unknown-linux-gnu
206+
image: cubejs/rust-cross:x86_64-unknown-linux-gnu-15082024
206207
executable_name: cubestored
207208
strip: true
208209
compress: false
209210
- os: ubuntu-22.04
210211
target: x86_64-unknown-linux-musl
212+
image: cubejs/rust-cross:x86_64-unknown-linux-musl-15082024
211213
executable_name: cubestored
212214
strip: true
213215
# cubestored: CantPackException: bad DT_HASH nbucket=0x344 len=0x1890
214216
compress: false
215-
- os: ubuntu-22.04
217+
- os: ubuntu-24.04-arm
218+
image: cubejs/rust-builder:bullseye-llvm-18
216219
target: aarch64-unknown-linux-gnu
217220
executable_name: cubestored
218221
# Unable to recognise the format of the input file `rust/cubestore/target/aarch64-unknown-linux-gnu/release/cubestored'
@@ -221,7 +224,7 @@ jobs:
221224
compress: false
222225
fail-fast: false
223226
container:
224-
image: cubejs/rust-cross:${{ matrix.target }}-15082024
227+
image: ${{ matrix.image }}
225228
steps:
226229
- uses: actions/checkout@v4
227230
- name: Setup Rust toolchain
@@ -235,7 +238,7 @@ jobs:
235238
- uses: Swatinem/rust-cache@v2
236239
with:
237240
workspaces: ./rust/cubestore -> target
238-
prefix-key: v0-rust-cubestore-cross
241+
prefix-key: v1-rust-cubestore-cross
239242
key: target-${{ matrix.target }}
240243
- name: Build with Cargo
241244
run: |

rust/cubestore/builder.Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
ARG OS_NAME=bookworm-slim
1+
ARG RUST_TAG=bookworm-slim
2+
ARG OS_NAME=bookworm
23

3-
FROM rust:$OS_NAME
4+
FROM rust:$RUST_TAG
45

6+
ARG OS_NAME=bookworm
57
ARG LLVM_VERSION=18
68

79
RUN rustup update && \
@@ -13,9 +15,8 @@ RUN apt update \
1315
&& DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common libssl-dev pkg-config wget gnupg git apt-transport-https ca-certificates \
1416
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
1517
# https://github.com/llvm/llvm-project/issues/62475 \
16-
# add it twice to workaround:
17-
&& add-apt-repository --yes "deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" \
18-
&& add-apt-repository --yes "deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-$LLVM_VERSION main" \
18+
&& add-apt-repository --yes "deb https://apt.llvm.org/$OS_NAME/ llvm-toolchain-$OS_NAME-$LLVM_VERSION main" \
19+
&& add-apt-repository --yes "deb https://apt.llvm.org/$OS_NAME/ llvm-toolchain-$OS_NAME-$LLVM_VERSION main" \
1920
&& apt update \
2021
&& apt install -y git llvm-$LLVM_VERSION clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev clang-$LLVM_VERSION lld-$LLVM_VERSION cmake \
2122
&& rm -rf /var/lib/apt/lists/*;

rust/cubestore/docker-bake.hcl

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1+
# EOL LTS 2028-06-30
12
target "rust-builder-bookworm" {
23
context = "."
34
dockerfile = "builder.Dockerfile"
45
args = {
5-
OS_NAME = "1-slim-bookworm"
6+
RUST_TAG = "1-slim-bookworm"
7+
OS_NAME = "bookworm"
68
LLVM_VERSION = "18"
79
}
810
tags = ["cubejs/rust-builder:bookworm-llvm-18"]
911
platforms = ["linux/amd64", "linux/arm64"]
1012
}
13+
14+
# EOL LTS 2026-08-31
15+
target "rust-builder-bullseye" {
16+
context = "."
17+
dockerfile = "builder.Dockerfile"
18+
args = {
19+
RUST_TAG = "1-slim-bullseye"
20+
OS_NAME = "bullseye"
21+
LLVM_VERSION = "18"
22+
}
23+
tags = ["cubejs/rust-builder:bullseye-llvm-18"]
24+
platforms = ["linux/amd64", "linux/arm64"]
25+
}

0 commit comments

Comments
 (0)