From 863868b2fc2cf6f9be1e7e03f5819088639b3ac5 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 14 Jun 2026 10:24:46 -0500 Subject: [PATCH] fix(ci): use SODIUM_LIB_DIR to bypass pkg-config detection Directly specify libsodium library paths via SODIUM_LIB_DIR environment variable instead of relying on pkg-config detection. This is the highest priority method in libsodium-sys-stable's build.rs and bypasses all pkg-config/vcpkg logic. Platform-specific paths: - Linux x86_64: /usr/lib/x86_64-linux-gnu - Linux aarch64: /usr/lib/aarch64-linux-gnu - Windows MinGW: /usr/x86_64-w64-mingw32/lib Changes: - test.yml: Add SODIUM_LIB_DIR to all cargo commands - auto-tag.yml: Add SODIUM_LIB_DIR to all build jobs This resolves "libsodium not found via pkg-config or vcpkg" by telling the build script exactly where libsodium is installed. Co-Authored-By: Claude Sonnet 4.5 --- .gitea/workflows/auto-tag.yml | 5 +++-- .gitea/workflows/test.yml | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/auto-tag.yml b/.gitea/workflows/auto-tag.yml index 9890bad5..f4bf0f89 100644 --- a/.gitea/workflows/auto-tag.yml +++ b/.gitea/workflows/auto-tag.yml @@ -344,6 +344,7 @@ jobs: - name: Build env: APPIMAGE_EXTRACT_AND_RUN: "1" + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu run: | npm ci --legacy-peer-deps CI=true npx tauri build --target x86_64-unknown-linux-gnu @@ -444,8 +445,7 @@ jobs: CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc OPENSSL_NO_VENDOR: "0" OPENSSL_STATIC: "1" - PKG_CONFIG_x86_64_pc_windows_gnu: x86_64-w64-mingw32-pkg-config - PKG_CONFIG_ALLOW_CROSS: "1" + SODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib run: | npm ci --legacy-peer-deps CI=true npx tauri build --target x86_64-pc-windows-gnu @@ -634,6 +634,7 @@ jobs: OPENSSL_NO_VENDOR: "0" OPENSSL_STATIC: "1" APPIMAGE_EXTRACT_AND_RUN: "1" + SODIUM_LIB_DIR: /usr/lib/aarch64-linux-gnu run: | npm ci --legacy-peer-deps CI=true npx tauri build --target aarch64-unknown-linux-gnu --bundles deb,rpm diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 6f38a423..9b911008 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -63,7 +63,11 @@ jobs: - name: Update version from Git run: node scripts/update-version.mjs - run: cargo generate-lockfile --manifest-path src-tauri/Cargo.toml + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu - run: cargo fmt --manifest-path src-tauri/Cargo.toml --check + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu rust-clippy: runs-on: ubuntu-latest @@ -102,6 +106,8 @@ jobs: - name: Install clippy run: rustup component add clippy - run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu rust-tests: runs-on: ubuntu-latest @@ -138,9 +144,13 @@ jobs: libsodium-dev \ pkg-config - run: cargo test --manifest-path src-tauri/Cargo.toml -- --test-threads=1 + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu - name: Run shell module tests run: 'cargo test --manifest-path src-tauri/Cargo.toml "shell::" -- --test-threads=1' + env: + SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu frontend-typecheck: runs-on: ubuntu-latest