Skip to content

Commit 6444514

Browse files
update Cargo.toml, remove creating cargo.toml in build
1 parent b0ecba0 commit 6444514

File tree

2 files changed

+20
-30
lines changed

2 files changed

+20
-30
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ jobs:
9494
steps:
9595
- uses: actions/checkout@v4
9696

97+
- name: Set up Docker Buildx
98+
if: matrix.use_cross
99+
uses: docker/setup-buildx-action@v3
100+
97101
- name: Set up QEMU for cross-arch builds
98102
if: matrix.use_cross
99103
uses: docker/setup-qemu-action@v3
@@ -139,36 +143,6 @@ jobs:
139143
if: matrix.use_cross
140144
run: cargo install cross --git https://github.com/cross-rs/cross
141145

142-
- name: Create Cross.toml for aarch64 Kafka build
143-
if: matrix.use_cross && matrix.target == 'aarch64-unknown-linux-gnu'
144-
run: |
145-
cat > Cross.toml << 'EOF'
146-
[target.aarch64-unknown-linux-gnu]
147-
pre-build = [
148-
"dpkg --add-architecture arm64",
149-
"sed -i 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list",
150-
"echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse' >> /etc/apt/sources.list",
151-
"echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse' >> /etc/apt/sources.list",
152-
"apt-get update || true",
153-
"apt-get install -y pkg-config:arm64 || true",
154-
"apt-get install -y zlib1g-dev:arm64 || true",
155-
"apt-get install -y libssl-dev:arm64 || true",
156-
"apt-get install -y libsasl2-dev:arm64 || true",
157-
"apt-get install -y libzstd-dev:arm64 || true",
158-
"apt-get install -y liblz4-dev:arm64 || true",
159-
]
160-
161-
[build.env]
162-
passthrough = [
163-
"LIBRDKAFKA_SSL_VENDORED",
164-
"PKG_CONFIG_ALLOW_CROSS",
165-
]
166-
volumes = [
167-
"/usr/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu",
168-
]
169-
EOF
170-
cat Cross.toml
171-
172146
- name: Cache dependencies
173147
uses: actions/cache@v4
174148
with:

Cross.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
[target.aarch64-unknown-linux-gnu]
22
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu@sha256:1e2a0291f92a4372cbc22d8994e735473045383f1ce7fa44a16c234ba00187f4"
3+
pre-build = [
4+
"dpkg --add-architecture arm64",
5+
"apt-get update || true",
6+
"apt-get install -y pkg-config:arm64 || true",
7+
"apt-get install -y zlib1g-dev:arm64 || true",
8+
"apt-get install -y libssl-dev:arm64 || true",
9+
"apt-get install -y libsasl2-dev:arm64 || true",
10+
"apt-get install -y libzstd-dev:arm64 || true",
11+
"apt-get install -y liblz4-dev:arm64 || true",
12+
]
13+
14+
[target.aarch64-unknown-linux-gnu.env]
15+
passthrough = [
16+
"LIBRDKAFKA_SSL_VENDORED",
17+
"PKG_CONFIG_ALLOW_CROSS",
18+
]
319

420
[target.x86_64-unknown-linux-gnu]
521
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu@sha256:bf05360bb9d6d4947eed60532ac7a0d7e8fae8f214e9abb801d5941c8fe4918d"

0 commit comments

Comments
 (0)