tauri-plugin-stronghold pulls in libsodium-sys-stable which panics at build time if libsodium is not found via pkg-config — it does not compile from source. All builder images and the test job inline apt installs were missing libsodium-dev, breaking every Rust compilation step. - Add libsodium-dev to Dockerfile.linux-amd64 - Add libsodium-dev (host) + libsodium-dev:arm64 (cross target) to Dockerfile.linux-arm64 - Add libsodium-dev to all three Rust jobs in test.yml - Add inline apt-get install to linux-amd64 and linux-arm64 Build steps in auto-tag.yml and release-beta.yml (bridges the timing race between build-images and auto-tag triggering on the same push) - Add SODIUM_LIB_DIR + SODIUM_STATIC to Windows Build env (Dockerfile already pre-builds libsodium; this tells the crate where to find it)
2.7 KiB
fix(ci): add libsodium to all build environments
Description
All CI builds started failing with:
libsodium not found via pkg-config or vcpkg
tauri-plugin-stronghold depends on libsodium-sys-stable v1.24.0, which does not compile libsodium from source — it requires a pre-installed system library. None of the builder Docker images or the inline test job apt installs included libsodium-dev, so every build involving Rust compilation has been broken since tauri-plugin-stronghold was added.
The Windows cross-compile Dockerfile already pre-built libsodium from source (into /usr/x86_64-w64-mingw32), but the workflow never set SODIUM_LIB_DIR to tell the crate where to look, so it also failed via the same code path.
There is a secondary timing constraint: build-images.yml and auto-tag.yml both trigger on push to master. Even after Dockerfiles are fixed, the rebuilt images won't be ready in time for the concurrent release builds. Inline apt-get install is added to the workflow build steps to bridge that window; once images are rebuilt, the inline install becomes a harmless no-op.
Acceptance Criteria
rust-fmt-check,rust-clippy, andrust-testsCI jobs passbuild-linux-amd64produces.deb/.rpmartifactsbuild-linux-arm64produces.deb/.rpmartifactsbuild-windows-amd64produces installer artifactsbuild-macos-arm64produces.dmgartifact (macOS runner assumed to havelibsodiumvia Homebrew; if not, addbrew install libsodium || trueto the Build step)
Work Implemented
| File | Change |
|---|---|
.docker/Dockerfile.linux-amd64 |
Added libsodium-dev to apt packages baked into the image |
.docker/Dockerfile.linux-arm64 |
Added libsodium-dev (amd64 host) in Step 1 and libsodium-dev:arm64 (cross target) in Step 2 |
.gitea/workflows/test.yml |
Added libsodium-dev to the system deps apt install in rust-fmt-check, rust-clippy, and rust-tests |
.gitea/workflows/auto-tag.yml |
Inline apt-get install libsodium-dev before build (linux-amd64 and linux-arm64 jobs); SODIUM_LIB_DIR/SODIUM_STATIC env vars for Windows job |
.gitea/workflows/release-beta.yml |
Same three changes as auto-tag.yml |
Testing Needed
- Merge this PR to
master— verifyAuto Tagworkflow succeeds across all four platform jobs - Push to
beta— verifyRelease Betaworkflow succeeds - After
Build CI Docker Imagesworkflow finishes rebuilding images, trigger a manual release run to confirm inline apt installs are redundant (both paths should work) - macOS: if
build-macos-arm64still fails with a libsodium error, addbrew install libsodium || trueto the Build step in bothauto-tag.ymlandrelease-beta.yml