Skip to content

improve: build tooling, CI, and documentation#5

Merged
tanRdev merged 2 commits intomasterfrom
improve/build-tooling-ci
Mar 6, 2026
Merged

improve: build tooling, CI, and documentation#5
tanRdev merged 2 commits intomasterfrom
improve/build-tooling-ci

Conversation

@tanRdev
Copy link
Copy Markdown
Owner

@tanRdev tanRdev commented Mar 6, 2026

Summary

This PR improves build tooling, adds continuous integration, and updates documentation. It consolidates duplicate scripts, fixes a bug in ProcessMonitor, and modernizes the build system to be architecture-agnostic.

Changes

🆕 Continuous Integration

  • .github/workflows/ci.yml — New GitHub Actions workflow that runs on macOS 14 for every push to master/main and every pull request:
    • Runs swift test for unit tests
    • Verifies app bundle creation with ./build-app.sh debug

🐛 Bug Fix

  • ProcessMonitor.swift — Fixed isRefreshing guard using defer pattern, ensuring the flag is always reset even on early returns (prevents potential deadlocks)

⚡ Performance & UX

  • ProcessMonitor.swift — Reduced poll interval from 3.0s to 2.0s for more responsive UI updates

🔧 Build System Improvements

  • Makefile — Architecture-agnostic builds using swift build --show-bin-path (supports both Intel and Apple Silicon)
  • Makefile — Added make test target
  • Makefile — Fixed double-build issue in run and install targets
  • Package.swift — Excluded Info.plist and Lucid.entitlements from SPM resources

🧹 Cleanup

  • build-app.sh — Consolidated and refactored (153 lines reduced)
  • create-app-bundle.sh — Now delegates to build-app.sh (single source of truth)
  • run-lucid.shDeleted (was redundant with make run)

📚 Documentation

  • README.md — Added CI section, build instructions, and development branch info

File Changes

File Change
.github/workflows/ci.yml ✨ New
Lucid/Lucid/Services/ProcessMonitor.swift 🐛 Fix + ⚡ Perf
Lucid/Makefile 🔧 Improved
Lucid/Package.swift 🔧 Improved
Lucid/build-app.sh 🧹 Refactored
Lucid/create-app-bundle.sh 🧹 Simplified
Lucid/run-lucid.sh 🗑️ Deleted
README.md 📚 Updated

Testing

cd Lucid
make app      # Build app bundle
make test     # Run unit tests (requires Xcode)
make run      # Build and launch app

CI

GitHub Actions will automatically run tests and verify the app bundle builds correctly.

tanRdev and others added 2 commits March 6, 2026 14:45
- Add GitHub Actions CI workflow for macOS (tests + app bundle verification)
- Use architecture-agnostic build paths via swift build --show-bin-path
- Consolidate bundle scripts: create-app-bundle.sh delegates to build-app.sh
- Remove redundant run-lucid.sh (use 'make run' instead)
- Improve ProcessMonitor: defer pattern for isRefreshing, 2s poll interval
- Exclude Info.plist and entitlements from SPM resources
- Update README with build/CI improvements (remove 'abandoned' language)
- Fix CI: only target existing branches (main, master)

Co-authored-by: Agent <agent@example.com>
The count(where:) method was introduced in Swift 6.0, but CI runners
on macOS-14 use Swift 5.10. Replace with filter { }.count pattern
which works on both Swift 5.10 and Swift 6.x.
@tanRdev tanRdev merged commit 54401e0 into master Mar 6, 2026
1 check passed
tanRdev added a commit that referenced this pull request Mar 7, 2026
- Add GitHub Actions CI workflow for macOS (tests + app bundle verification)
- Use architecture-agnostic build paths via swift build --show-bin-path
- Consolidate bundle scripts: create-app-bundle.sh delegates to build-app.sh
- Remove redundant run-lucid.sh (use 'make run' instead)
- Improve ProcessMonitor: defer pattern for isRefreshing, 2s poll interval
- Exclude Info.plist and entitlements from SPM resources
- Update README with build/CI improvements (remove 'abandoned' language)
- Fix CI: only target existing branches (main, master)
- fix: replace count(where:) with filter for Swift 5.10 compatibility
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