diff --git a/.forgejo/workflows/build-fedora.yml b/.forgejo/workflows/build-fedora.yml index 2d417155..1cb8a024 100644 --- a/.forgejo/workflows/build-fedora.yml +++ b/.forgejo/workflows/build-fedora.yml @@ -51,6 +51,18 @@ jobs: restore-keys: | cargo-fedora${{ steps.fedora.outputs.version }}- + - name: Cache Rust build dependencies + uses: https://code.forgejo.org/actions/cache@v4 + with: + path: | + ~/rpmbuild/BUILD/*/target/release/deps + ~/rpmbuild/BUILD/*/target/release/build + ~/rpmbuild/BUILD/*/target/release/.fingerprint + ~/rpmbuild/BUILD/*/target/release/incremental + key: rust-deps-fedora${{ steps.fedora.outputs.version }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + rust-deps-fedora${{ steps.fedora.outputs.version }}- + - name: Setup sccache uses: https://github.com/mozilla-actions/sccache-action@v0.0.9 with: @@ -62,12 +74,15 @@ jobs: echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV + # Aggressive GC since cache restores don't increment counter + echo "CARGO_INCREMENTAL_GC_TRIGGER=5" >> $GITHUB_ENV - name: Install build dependencies run: | dnf install -y --setopt=keepcache=1 \ wget \ rpm-build \ + rpm-sign \ rpmdevtools \ rpkg \ cargo-rpm-macros \ @@ -186,12 +201,19 @@ jobs: - name: Verify RPM signatures run: | - # Skip if no signing key is configured + # Skip if no signing key is configured or no RPMs were signed if [ -z "${{ secrets.RPM_SIGNING_KEY }}" ]; then echo "No RPM signing key configured - skipping signature verification" exit 0 fi + # Check if rpmsign was successful (at least one signed RPM exists) + SIGNED_COUNT=$(find "$HOME/rpmbuild" -name "*.rpm" -type f -exec rpm -K {} \; 2>/dev/null | grep -c "signatures OK" || true) + if [ "$SIGNED_COUNT" -eq 0 ]; then + echo "No successfully signed RPMs found - skipping signature verification" + exit 0 + fi + # Import our public key for verification curl -s https://forgejo.ellis.link/continuwuation/continuwuity/raw/branch/main/fedora/RPM-GPG-KEY-continuwuity.asc | rpm --import diff --git a/src/api/client/sync/v3.rs b/src/api/client/sync/v3.rs index 01428c08..298a6e4b 100644 --- a/src/api/client/sync/v3.rs +++ b/src/api/client/sync/v3.rs @@ -430,7 +430,7 @@ async fn handle_left_room( .ok(); // Left before last sync - if Some(since) >= left_count { + if (Some(since) >= left_count && !include_leave) || Some(next_batch) < left_count { return Ok(None); }