Skip to content

Commit f9850a0

Browse files
committed
fix(ci): use bundled-sqlcipher-vendored-openssl for portable cross-compile
Avoids needing system OpenSSL headers for aarch64-linux cross-compilation. The vendored OpenSSL is compiled from source alongside SQLCipher.
1 parent 90749bf commit f9850a0

3 files changed

Lines changed: 25 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,15 @@ jobs:
4444
- name: Install cross-compilation tools (aarch64-linux)
4545
if: matrix.cross
4646
run: |
47-
sudo dpkg --add-architecture arm64
48-
# Add arm64 package sources alongside the existing amd64 ones
49-
sudo sed -i 's/^deb /deb [arch=amd64] /' /etc/apt/sources.list.d/*.list || true
50-
echo "deb [arch=arm64] http://ports.ubuntu.com/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/arm64.list
51-
echo "deb [arch=arm64] http://ports.ubuntu.com/ $(lsb_release -cs)-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/arm64.list
5247
sudo apt-get update
53-
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64
48+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
5449
5550
- name: Set cross-compile env (aarch64-linux)
5651
if: matrix.cross
5752
run: |
5853
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
5954
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
6055
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> "$GITHUB_ENV"
61-
echo "OPENSSL_DIR=/usr" >> "$GITHUB_ENV"
62-
echo "OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu" >> "$GITHUB_ENV"
63-
echo "OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu" >> "$GITHUB_ENV"
6456
6557
- name: Build release binary
6658
run: cargo build --release --target ${{ matrix.target }} -p beankeeper-cli

Cargo.lock

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

beankeeper-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ clap = { version = "4.6.0", features = ["derive", "env"] }
2121
comfy-table = "7.2.2"
2222
csv = "1.4.0"
2323
rpassword = "7.4.0"
24-
rusqlite = { version = "0.39.0", features = ["bundled-sqlcipher"] }
24+
rusqlite = { version = "0.39.0", features = ["bundled-sqlcipher-vendored-openssl"] }
2525
secrecy = { version = "0.10.3", features = ["serde"] }
2626
serde = { version = "1.0.228", features = ["derive"] }
2727
serde_json = "1.0.149"

0 commit comments

Comments
 (0)