Skip to content

Commit 98b7ba9

Browse files
committed
fix: update cross-compilation setup to use vendored OpenSSL and streamline armv7 toolchain installation
1 parent 747ccd8 commit 98b7ba9

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,6 @@ jobs:
7070
- name: Install Linux armv7 cross toolchain
7171
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
7272
run: |
73-
# Restrict default sources to amd64 so apt does not query non-existent armhf indices on security.ubuntu.com
74-
sudo tee /etc/apt/sources.list >/dev/null <<'EOF'
75-
deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse
76-
deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse
77-
deb [arch=amd64] http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse
78-
deb [arch=amd64] http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse
79-
EOF
80-
sudo dpkg --add-architecture armhf
81-
# Point armhf sources to ubuntu-ports; security.ubuntu.com lacks 32-bit indexes on 24.04
82-
sudo tee /etc/apt/sources.list.d/ubuntu-armhf.list >/dev/null <<'EOF'
83-
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports noble main restricted universe multiverse
84-
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports noble-updates main restricted universe multiverse
85-
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports noble-security main restricted universe multiverse
86-
EOF
8773
sudo apt-get update
8874
# Provide armv7 toolchain and OpenSSL dev headers/libs for the cross build
8975
sudo apt-get install -y gcc-arm-linux-gnueabihf pkg-config libssl-dev:armhf
@@ -98,17 +84,17 @@ jobs:
9884
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
9985
export PKG_CONFIG_ALLOW_CROSS=1
10086
export PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH:-}"
101-
export OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu
102-
export OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu
87+
export OPENSSL_NO_PKG_CONFIG=1
88+
export OPENSSL_STATIC=1
10389
fi
10490
if [[ "${{ matrix.target }}" == "armv7-unknown-linux-gnueabihf" ]]; then
10591
export CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc
10692
export AR_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-ar
10793
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
10894
export PKG_CONFIG_ALLOW_CROSS=1
10995
export PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig:${PKG_CONFIG_PATH:-}"
110-
export OPENSSL_LIB_DIR=/usr/lib/arm-linux-gnueabihf
111-
export OPENSSL_INCLUDE_DIR=/usr/include/arm-linux-gnueabihf
96+
export OPENSSL_NO_PKG_CONFIG=1
97+
export OPENSSL_STATIC=1
11298
fi
11399
cargo build --release --target ${{ matrix.target }}
114100
shell: bash

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ rspotify = { version = "0.15.1", default-features = false, features = [
3737
"client-reqwest",
3838
"reqwest-rustls-tls",
3939
] }
40+
# Force vendored OpenSSL for any transitive native-tls users to avoid system OpenSSL requirements on CI
41+
native-tls = { version = "0.2", features = ["vendored"] }
4042
dotenvy = "0.15"
4143
base64 = "0.22"
4244
uuid = { version = "1.18.1", features = ["v4"] }

0 commit comments

Comments
 (0)