@@ -156,22 +156,41 @@ jobs:
156156 # Note: We skip Tauri CLI bundling (which creates AppImage/deb/rpm) because
157157 # AppImage bundling fails on modern Arch due to incompatible strip utility.
158158 # We only need the binary for our Arch package, so we build with cargo directly.
159+ echo "=== Starting cargo build ==="
159160 cd /workspace/apps/desktop/src-tauri
160- cargo build \
161- --release \
162- --target $RUST_TARGET \
163- --features $FEATURES \
164- --verbose
161+
162+ # Build with explicit output capture and error handling
163+ echo "Running: cargo build --release --target $RUST_TARGET --features $FEATURES"
164+ if cargo build --release --target $RUST_TARGET --features $FEATURES 2>&1 | tee /tmp/cargo-build.log; then
165+ BUILD_EXIT_CODE=${PIPESTATUS[0]}
166+ else
167+ BUILD_EXIT_CODE=$?
168+ fi
169+
170+ echo "=== Cargo build exit code: $BUILD_EXIT_CODE ==="
171+
172+ if [ $BUILD_EXIT_CODE -ne 0 ]; then
173+ echo "❌ Cargo build failed with exit code $BUILD_EXIT_CODE"
174+ echo "=== Last 100 lines of build log ==="
175+ tail -n 100 /tmp/cargo-build.log || true
176+ exit $BUILD_EXIT_CODE
177+ fi
165178
166179 echo "✅ Cargo build completed successfully"
167180
168181 # Verify binary was built
169182 BINARY_PATH="/workspace/apps/desktop/src-tauri/target/${RUST_TARGET}/release/hyprnote"
183+ echo "Checking for binary at: $BINARY_PATH"
170184 if [ ! -f "$BINARY_PATH" ]; then
171185 echo "❌ Error: Binary not found at $BINARY_PATH"
186+ echo "=== Contents of target directory ==="
187+ ls -la "/workspace/apps/desktop/src-tauri/target/${RUST_TARGET}/release/" || echo "Release directory does not exist"
188+ echo "=== Last 50 lines of build log ==="
189+ tail -n 50 /tmp/cargo-build.log || true
172190 exit 1
173191 fi
174192 echo "✅ Binary verified at: $BINARY_PATH"
193+ ls -lh "$BINARY_PATH"
175194
176195 # Create PKGBUILD directory
177196 mkdir -p /pkgbuild
0 commit comments