Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
workspaces: ". -> target"

- name: Install Linux dependencies
run: |
Expand All @@ -59,12 +59,10 @@ jobs:
run: bun run bundle:plugins

- name: Cargo fmt
working-directory: src-tauri
run: cargo fmt --all -- --check

- name: Cargo test
working-directory: src-tauri
run: cargo test --locked
run: cargo test --workspace --locked

linux-package:
name: Linux Tauri package build
Expand All @@ -80,7 +78,7 @@ jobs:
targets: x86_64-unknown-linux-gnu
- uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
workspaces: ". -> target"

- name: Install Linux dependencies
run: |
Expand All @@ -102,21 +100,25 @@ jobs:
- run: bun install --frozen-lockfile

- name: Build Linux packages
env:
# linuxdeploy's bundled strip can fail on newer distro libraries with
# `.relr.dyn` sections. Packaging does not require stripping here.
NO_STRIP: "true"
run: |
bun tauri build --ci --no-sign --bundles deb,rpm,appimage \
--config '{"bundle":{"createUpdaterArtifacts":false}}'

- name: Verify Linux package artifacts
run: |
test -n "$(find src-tauri/target/release/bundle/deb -maxdepth 1 -name '*.deb' -print -quit)"
test -n "$(find src-tauri/target/release/bundle/rpm -maxdepth 1 -name '*.rpm' -print -quit)"
test -n "$(find src-tauri/target/release/bundle/appimage -maxdepth 1 -name '*.AppImage' -print -quit)"
test -n "$(find target/release/bundle/deb -maxdepth 1 -name '*.deb' -print -quit)"
test -n "$(find target/release/bundle/rpm -maxdepth 1 -name '*.rpm' -print -quit)"
test -n "$(find target/release/bundle/appimage -maxdepth 1 -name '*.AppImage' -print -quit)"

- name: Inspect Linux packages
run: |
DEB=$(find src-tauri/target/release/bundle/deb -maxdepth 1 -name '*.deb' -print -quit)
RPM=$(find src-tauri/target/release/bundle/rpm -maxdepth 1 -name '*.rpm' -print -quit)
APPIMAGE=$(find src-tauri/target/release/bundle/appimage -maxdepth 1 -name '*.AppImage' -print -quit)
DEB=$(find target/release/bundle/deb -maxdepth 1 -name '*.deb' -print -quit)
RPM=$(find target/release/bundle/rpm -maxdepth 1 -name '*.rpm' -print -quit)
APPIMAGE=$(find target/release/bundle/appimage -maxdepth 1 -name '*.AppImage' -print -quit)

dpkg-deb --info "$DEB"
dpkg-deb --contents "$DEB" | grep -E 'OpenUsage|openusage|\.desktop'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
- name: Verify macOS app bundle
if: runner.os == 'macOS'
run: |
APP=$(find src-tauri/target -path '*/release/bundle/macos/OpenUsage.app' -print -quit)
APP=$(find target -path '*/release/bundle/macos/OpenUsage.app' -print -quit)
if [[ -z "$APP" ]]; then
echo "Missing macOS app bundle."
exit 1
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/windows-gui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Windows support adapted from barramee27/crossusage (MIT): https://github.com/barramee27/crossusage
# Build the Windows Tauri GUI (NSIS installer + openusage.exe) and upload artifacts.
# Use this to get fresh .exe builds without tagging a release.
#
# After push: GitHub → Actions → "Windows GUI (Tauri)" → Run workflow.
# Download the artifact zip from the completed run and copy into your VM.
name: Windows GUI (Tauri)

on:
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: windows-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- uses: swatinem/rust-cache@v2
with:
shared-key: openusage-windows-gui

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install JS deps
run: bun install

- name: Build Tauri (Windows GUI + NSIS)
shell: bash
run: |
bun run tauri build --ci --no-sign \
--config '{"bundle":{"createUpdaterArtifacts":false}}'

- name: Build portable Windows zip
shell: pwsh
run: ./scripts/build-gui-portable-windows.ps1

- name: Upload Windows GUI artifacts
uses: actions/upload-artifact@v4
with:
name: openusage-windows-gui-${{ github.sha }}
retention-days: 21
path: |
target/release/bundle/nsis/*.exe
target/release/openusage.exe
target/release/openusage-cli.exe
target/release/WebView2Loader.dll
target/*/release/openusage.exe
target/*/release/openusage-cli.exe
target/*/release/WebView2Loader.dll
src-tauri/binaries/openusage-cli-*.exe
openusage_*_windows_*.zip
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@ plans/*
package-lock.json

# Build artifacts (contents generated by CI, keep folder for Tauri)
target/
release-artifacts/
openusage_*.zip
openusage_*.exe
openusage-cli_*.zip
openusage-cli_*.tar.gz
src-tauri/binaries/
src-tauri/resources/bundled_plugins/*
!src-tauri/resources/bundled_plugins/.gitkeep
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

## Before Creating Pull Request
- Before creating a PR or pushing to main, ensure that `README.md` is updated with what plugins are supported.
- On any plugin change/new plugin, audit plugin-exposed request/response fields against `src-tauri/src/plugin_engine/host_api.rs` redaction lists and add/update tests for gaps. Compare with existing plugins for patterns.
- On any plugin change/new plugin, audit plugin-exposed request/response fields against `crates/openusage-core/src/plugin_engine/host_api.rs` redaction lists and add/update tests for gaps. Compare with existing plugins for patterns.
- In `plugin.json`, set `brandColor` to the provider's real brand color.
- Plugin SVG logos must use `currentColor` so icon theming works correctly.
- If the PR includes visual changes, refuse to create it without providing before/after screenshots.
Expand Down
Loading
Loading