Skip to content

Release build fixes#3004

Merged
jamiepine merged 57 commits intomainfrom
release-build-fixes
Feb 7, 2026
Merged

Release build fixes#3004
jamiepine merged 57 commits intomainfrom
release-build-fixes

Conversation

@jamiepine
Copy link
Member

No description provided.

- Commented out pull request trigger in core_tests.yml to simplify workflow.
- Enhanced release.yml for ARM cross-compilation by adding APT configuration steps and removing redundant setup steps for Rust target installation.
- Updated tauri commands in package.json to use the latest syntax for improved compatibility.
- Replaced existing APT source modifications with a new configuration file for ARM architecture, ensuring proper package sources for Ubuntu ports.
- This change enhances the setup process for ARM cross-compilation in the release workflow.
- Added target specifications for multiple architectures in rust-toolchain.toml to support cross-compilation.
- Updated GitHub Actions setup to include a verification step for Rust installation, ensuring the environment is correctly configured before proceeding with builds.
- Added a check to determine if Rust is already installed before proceeding with the installation step, improving the efficiency of the setup process. This ensures that Rust is only installed when necessary, reducing redundant installations.
- Mark existing sources as amd64-only to prevent apt from searching for arm64 packages.
- Add new APT sources for arm64 architecture pointing to ports.ubuntu.com, enhancing the setup for ARM cross-compilation.
- Added a step to ensure that rustup binaries are prioritized in the PATH, improving the reliability of Rust toolchain usage.
- Included checks to verify the installation paths of rustc and cargo, enhancing the verification process for Rust installation.
- Removed unnecessary target specifications from rust-toolchain.toml to streamline the configuration.
- Added a new step in the GitHub Actions workflow to conditionally add build targets for self-hosted runners, enhancing flexibility in target management.
- Added conditional steps to build server binaries for both x86_64 and aarch64 architectures, improving cross-compilation support.
- Updated environment variables for aarch64 builds to ensure proper linking and package configuration.
- Added g++-aarch64-linux-gnu to the installation step for aarch64 architecture, ensuring C++ support during the build process.
- Updated environment variables for aarch64 builds to specify the C++ compiler, enhancing the cross-compilation setup.
…ons workflow

- Included a new step to install FFmpeg libraries specifically for the aarch64 architecture, enhancing multimedia processing capabilities during the build process.
- This addition ensures that all necessary dependencies for FFmpeg are available for ARM builds, improving cross-compilation support.
- Improved the verification step for native dependencies by checking the existence of the apps/.deps/lib directory and ensuring that .so files are present.
- Added detailed output for the contents of the directory and the count of .so files, providing better feedback during the build process.
…from TARGET_TRIPLE

- Enhanced the system detection logic to utilize the TARGET_TRIPLE environment variable for cross-compilation scenarios.
- Added a new method to parse the target triple and determine the operating system, architecture, and libc type, improving flexibility for different build environments.
- Added CARGO_BUILD_TARGET environment variable to the GitHub Actions workflow for better target management during builds.
- Updated package.json scripts to conditionally include the target option for the daemon build commands, improving flexibility for different architectures.
- Refactored the setup function in main.rs to utilize a dynamic target triple for building the release daemon, ensuring compatibility across various systems.
- Added environment variables for aarch64 architecture to configure the linker and compiler settings dynamically based on the target triple.
- Improved the setup process for native dependencies, ensuring proper configuration for aarch64 builds, which enhances cross-compilation capabilities.
The x86_64 build was getting empty env vars that broke openssl-sys, and the aarch64 build needed cross-compiler env vars during xtask setup. Split into separate conditional steps to fix both.
- Integrated the tauri-plugin-updater to enable automatic updates for the application.
- Updated tauri configuration to include updater artifacts and defined permissions for the updater in the capabilities schema.
- Refactored the main.rs file to initialize the updater plugin during application startup.
- Improved the handling of file sources in the mobile explorer, simplifying the logic for fetching files.
- Cleaned up unused search functionality in the mobile search screen, ensuring a more streamlined user experience.
@cursor
Copy link

cursor bot commented Jan 29, 2026

PR Summary

Medium Risk
Touches release/CI pipelines and cross-compilation setup (ARM deps/linking) plus introduces Tauri updater packaging, which can break builds or update delivery if misconfigured; runtime app logic changes are minimal and localized to mobile search behavior.

Overview
Improves GitHub Actions reliability for Rust and release builds: the setup-rust composite action now detects preinstalled Rust, ensures rustup toolchain binaries are first on PATH, conditionally adds targets, and prints verification info.

Release workflow is reworked to better support Linux aarch64 cross-compilation (APT multi-arch sources, arm64 OpenSSL/FFmpeg deps, explicit gcc/g++ linkers and pkg-config env) and to use tauri-apps/tauri-action for desktop builds with stricter native-deps verification and publishing *.json updater manifests.

Desktop app adds Tauri v2 autoupdater support by including tauri-plugin-updater, enabling the updater:default capability, and documenting key generation/setup (AUTOUPDATER.md). Mobile tweaks simplify search state cleanup (always exit search mode on leaving the search screen) and remove search handling from useExplorerFiles so explorer listings are only virtual or directory sources.

Written by Cursor Bugbot for commit 991956b. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

pull_request:
branches: ["main"]
# pull_request:
# branches: ["main"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR test trigger disabled in core tests workflow

Medium Severity

The pull_request trigger in core_tests.yml has been commented out, meaning core Rust tests no longer run on pull requests. Given the PR title "Release build fixes" and no description, this may have been temporarily disabled during debugging and inadvertently left in. This removes an important CI safeguard that catches bugs before they reach the main branch.

Fix in Cursor Fix in Web

shell: bash
run: |
if command -v rustc &> /dev/null && command -v rustup &> /dev/null; then
echo "installed=true" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small shell robustness: quote $GITHUB_OUTPUT (and similarly $GITHUB_PATH) in redirects.

Suggested change
echo "installed=true" >> $GITHUB_OUTPUT
echo "installed=true" >> "$GITHUB_OUTPUT"

branches: ["main"]
pull_request:
branches: ["main"]
# pull_request:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like PR runs got disabled here. If this was only for troubleshooting, I'd re-enable pull_request so PRs still get CI status (the job already avoids forks via the if:).

Suggested change
# pull_request:
pull_request:
branches: ["main"]

echo "✓ Native dependencies verified"

- name: Build with tauri-action
uses: tauri-apps/tauri-action@v0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor supply-chain hardening: consider pinning tauri-apps/tauri-action to a specific tag or commit SHA instead of floating @v0.

unsubscribe?.();
};
}, [client, refetch]);
}, [client]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This effect still uses refetch in the handler, but it was removed from deps. If refetch isn't stable, this can go stale. Also, the added console.logs will run in production builds unless gated.

Suggested change
}, [client]);
}, [client, refetch]);

// Check if subscription already exists
let entry = this.subscriptions.get(key);
if (entry) {
console.log(`[SubscriptionManager] Reusing existing subscription for key: ${key}, refCount: ${entry.refCount} -> ${entry.refCount + 1}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These console.log calls in the TS client can get very noisy (and key may contain filter details). Maybe gate behind an explicit debug flag / dev-only check, or switch to console.debug behind a flag.

Comment on lines +31 to +37
const isWindows = () => {
return navigator.userAgent.includes('Windows');
};

const isTauri = () => {
return '__TAURI_INTERNALS__' in window;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this hook ever gets imported in SSR/tests, the direct window/navigator access will throw. A small typeof window/navigator !== 'undefined' guard keeps it safe.

Suggested change
const isWindows = () => {
return navigator.userAgent.includes('Windows');
};
const isTauri = () => {
return '__TAURI_INTERNALS__' in window;
};
const isWindows = () => {
return typeof navigator !== 'undefined' && navigator.userAgent.includes('Windows');
};
const isTauri = () => {
return typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window;
};

installing: false,
readyToInstall: false
});
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor state consistency: when check() returns no update (or throws), it might be worth setUpdate(null) so the UI can't act on a stale update from a previous successful check.

- Commented out the pull_request trigger to simplify the workflow.
- Re-enabled Windows build steps for x86_64 architecture, ensuring proper configuration for Windows builds in the release process.
- Re-enabled the pull_request trigger for specific paths to enhance workflow automation.
- Updated macOS build hosts to use specific versions (macos-15-arm64 and macos-15-intel) for improved compatibility and performance during the release process.
- Updated the handling of file IDs for Windows to use `None::<u64>` for clarity.
- Adjusted the inode assignment in the processing phase to reflect the need for unstable features, falling back to `None` for compatibility.
- Improved the backend identifier logic for network volumes by using a temporary variable for the mount path string, enhancing readability and maintainability.
…c configurations

- Changed build hosts for various platforms to utilize self-hosted runners and specific configurations for improved performance and consistency.
- Updated Linux and Windows build hosts to reflect new self-hosted environments, enhancing the release process.
- Updated the release workflow to improve ARM64 cross-compilation support by modifying host configurations and installation steps.
- Changed the host for ARM builds to `blacksmith-4vcpu-ubuntu-2204-arm` and streamlined the installation of OpenSSL and FFmpeg libraries for ARM64.
- Removed unnecessary APT configuration steps for ARM and adjusted the installation commands for clarity and efficiency.
- Updated the installation step for FFmpeg libraries in the ARM64 section of the release workflow to include additional VA-API libraries, improving multimedia support.
- Renamed the installation step for clarity, reflecting the inclusion of both FFmpeg and VA-API libraries.
…ependencies

- Added the installation of the `libgnutls28-dev` package to the x86_64 native dependencies setup in the release workflow, enhancing security and compatibility for multimedia processing.
- Replaced the Rust toolchain setup action with a custom action for improved maintainability.
- Consolidated the native dependencies setup step, removing platform-specific conditions for a more streamlined process.
- Simplified the build step for the server binary by removing platform-specific conditions, enhancing clarity and reducing redundancy.
- Updated the inode mapping in the LocationManager to simplify the conversion process, enhancing code clarity and maintainability.
- Added a step to install VA-API libraries in the release workflow specifically for the ARM64 target, enhancing multimedia processing capabilities.
- Adjusted the file path in the Tauri configuration to ensure correct library linking, improving deployment consistency.
- Removed commented-out sections for CLI builds to clean up the workflow file, enhancing readability and maintainability.
- Updated the server build configuration to change the bundle type from MSI to NSIS for Windows builds, aligning with deployment requirements.
- Adjusted artifact paths to include .exe and .nsis.zip files, ensuring proper artifact management during the release process.
… workflow

- Changed versioning from "2.0.0-pre.1" to "2.0.0-alpha.1" in various Cargo.toml files and package.json to reflect a new alpha release.
- Added support for ARM64 builds in the GitHub Actions workflow, including a new host configuration and installation of VA-API libraries for the ARM target.
- Introduced a new `bump` command in the xtask to facilitate version updates across all relevant files, improving version management.
…ld space maximization step

- Modified the condition for maximizing build space to exclude ARM64 architecture, ensuring compatibility and optimizing resource usage during the build process.
- Updated Cargo.lock to reflect changes in dependencies.
- Added a new GitHub Actions workflow (`mobile.yml`) for manual dispatch to build and release the React Native app for iOS and Android.
- Updated the publish artifacts action to change Windows bundle type from MSI to NSIS and adjusted related paths.
- Modified the front-end bundle path to reflect the new structure in the mobile app.
- Enhanced documentation to include details about the new mobile release process and required secrets.
…ler variables for Windows builds

- Added `fail-fast: false` to the desktop build strategy to allow all jobs to run even if one fails.
- Introduced `CC` and `CXX` environment variables for Windows builds to specify the compiler, improving build configuration.
…ke compiler variables

- Introduced `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` environment variables for Windows builds to specify the CMake compilers, improving build setup.
…mpatibility

- Added steps to set `LIBCLANG_PATH`, `CC`, and `CXX` environment variables for Windows builds.
- Updated PATH to exclude LLVM binaries, ensuring CMake uses MSVC's cl.exe instead of Clang.
…e workflow

- Changed the shell for LLVM configuration from bash to PowerShell to align with Windows environment.
- Updated environment variable settings for `LIBCLANG_PATH` and modified PATH handling to ensure compatibility with MSVC's cl.exe.
- Removed unnecessary CMake compiler variables from the release workflow, streamlining the configuration process.
- Updated the step to hide Clang compilers by renaming executables instead of modifying environment variables.
- Ensured `libclang.dll` remains accessible for bindgen while preventing CMake from using Clang over MSVC's cl.exe.
…e management and add verification step for Clang in setup-system action
…e management and enhance Clang removal process in setup-system action to ensure no Clang executables are discoverable, setting MSVC's cl.exe as the CMake compiler.
…e management and enhance compiler detection in setup-system action by forcing MSVC's cl.exe for both detection and compilation, ensuring compatibility and preventing linker errors.
…e management and modify setup-system action to restore and install libclang for Windows, ensuring compatibility with bindgen while preventing Clang from interfering with MSVC's compiler detection.
- Introduced steps to set CFLAGS and CXXFLAGS for ARM architecture, enhancing build configuration for ARM-based systems.
- Updated the setup function to copy DLLs to additional target-triple directories for CI cross-compilation, improving build flexibility.
- Modified the logging to reflect the target directory label during the copy process.
- Changed the host for Linux builds from `blacksmith-8vcpu-ubuntu-2204` to `blacksmith-16vcpu-ubuntu-2404`, enhancing build capacity.
- Updated the ARM host from `blacksmith-8vcpu-ubuntu-2204-arm` to `blacksmith-8vcpu-ubuntu-2404-arm` for consistency in the environment.
…gement

- Updated the release workflow to conditionally include a Windows-specific configuration file for Tauri builds.
- Simplified the resource management in the Tauri configuration by removing unnecessary DLL paths from the main config and adding them to a new Windows-specific config file.
@jamiepine jamiepine merged commit 9a0d181 into main Feb 7, 2026
1 of 4 checks passed
@jamiepine jamiepine deleted the release-build-fixes branch February 7, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant