Commit Graph

17 Commits

Author SHA1 Message Date
Shaun Arman
1055841b6f fix: remove invalid --locked flag from cargo commands and fix format string
All checks were successful
Test / rust-fmt-check (pull_request) Successful in 1m3s
PR Review Automation / review (pull_request) Successful in 2m54s
Test / frontend-typecheck (pull_request) Successful in 1m14s
Test / frontend-tests (pull_request) Successful in 1m25s
Test / rust-clippy (pull_request) Successful in 8m1s
Test / rust-tests (pull_request) Successful in 10m11s
- Remove --locked flag from cargo fmt, clippy, and test commands in CI
- Update build.rs to use Rust 2021 direct variable interpolation in format strings
2026-04-14 20:50:47 -05:00
Shaun Arman
9248811076 fix: add --locked to cargo commands and improve version update script
Some checks failed
Test / rust-fmt-check (pull_request) Failing after 1m11s
Test / frontend-typecheck (pull_request) Successful in 1m18s
Test / frontend-tests (pull_request) Successful in 1m21s
Test / rust-clippy (pull_request) Failing after 3m25s
PR Review Automation / review (pull_request) Successful in 3m37s
Test / rust-tests (pull_request) Successful in 5m9s
- Add --locked to fmt, clippy, and test commands in CI
- Remove updateCargoLock() and rely on cargo generate-lockfile
- Add .git directory existence check in update-version.mjs
- Use package.json as dynamic fallback instead of hardcoded 0.2.50
- Ensure execSync uses shell: false explicitly
2026-04-13 17:54:16 -05:00
Shaun Arman
007d0ee9d5 chore: fix version update implementation
All checks were successful
PR Review Automation / review (pull_request) Successful in 2m18s
- Replace npm ci with npm install in CI
- Remove --locked flag from cargo clippy/test
- Add cargo generate-lockfile after version update
- Update update-version.mjs with semver validation
- Add build.rs for Rust-level version injection
2026-04-13 16:34:48 -05:00
Shaun Arman
9e1a9b1d34 feat: implement dynamic versioning from Git tags
Some checks failed
Test / rust-clippy (pull_request) Failing after 15s
Test / rust-tests (pull_request) Failing after 19s
Test / rust-fmt-check (pull_request) Successful in 55s
Test / frontend-typecheck (pull_request) Successful in 1m22s
Test / frontend-tests (pull_request) Successful in 1m26s
PR Review Automation / review (pull_request) Successful in 2m57s
- Add build.rs to read version from git describe --tags
- Create update-version.mjs script to sync version across files
- Add get_app_version() command to Rust backend
- Update App.tsx to use custom version command
- Run version update in CI before Rust checks
2026-04-13 16:12:03 -05:00
Shaun Arman
a365cba30e fix(ci): address second AI review — || true, ca-certs, cache@v4, key suffixes
All checks were successful
Test / rust-fmt-check (pull_request) Successful in 13s
Test / frontend-typecheck (pull_request) Successful in 1m17s
Test / frontend-tests (pull_request) Successful in 1m20s
PR Review Automation / review (pull_request) Successful in 3m47s
Test / rust-clippy (pull_request) Successful in 4m4s
Test / rust-tests (pull_request) Successful in 5m21s
Dockerfiles:
- Remove || true from rustup component add in all three Linux images;
  rust:1.88-slim default profile already includes both components so the
  command is a clean no-op, not a failure risk — silencing errors served
  no purpose and only hid potential toolchain issues
- Add ca-certificates explicitly to Dockerfile.linux-amd64 and
  Dockerfile.windows-cross (rust:1.88-slim includes it, but being
  explicit is consistent with the arm64 fix and future-proofs against
  base image changes)

Workflows:
- Upgrade actions/cache@v3 → @v4 across test.yml and auto-tag.yml
  (v3 deprecated; v4 has parallel uploads and better large-cache support)
- Add linux-amd64 suffix to cargo cache keys in test.yml Rust jobs and
  auto-tag.yml build-linux-amd64 job; all four jobs target the same
  architecture and now share a cache, benefiting from cross-job hits
  (registry cache is source tarballs, not compiled artifacts — no
  pollution risk between targets)

Not changed:
- alpine:latest + docker-cli in build-images.yml is correct; the reviewer
  confused DinD with socket passthrough — docker:24-cli also has no daemon,
  both use the host socket; the builds already proved alpine works
- curl|bash for rustup is the official install method; rustup.rs publishes
  no checksums for the installer script itself
2026-04-12 20:16:32 -05:00
Shaun Arman
16930dca70 fix(ci): address AI review — rustup idempotency and cargo --locked
Dockerfiles:
- Merge rustup target add and component add into one chained RUN with
  || true guard, making it safe if rustfmt/clippy are already present
  in the base image's default toolchain profile (rust:1.88-slim default
  profile includes both; the guard is belt-and-suspenders)

test.yml:
- Add --locked to cargo clippy and cargo test to enforce Cargo.lock
  during CI, preventing silent dependency upgrades

Not addressed (accepted/out of scope):
- git in images: already installed in all three Dockerfiles (lines 19,
  13, 15 respectively) — reviewer finding was incorrect
- HTTP registry: accepted risk for air-gapped self-hosted infrastructure
- Image signing (Cosign): no infrastructure in place yet
- Hardcoded registry IP: consistent with project-wide pattern
2026-04-12 20:16:32 -05:00
Shaun Arman
bb0f3eceab perf(ci): use pre-baked images and add cargo/npm caching
Switch all test and release build jobs from raw base images to the
pre-baked images already defined in .docker/ and pushed to the local
Gitea registry. Add actions/cache@v3 for Cargo registry and npm to
eliminate redundant downloads on subsequent runs.

Changes:
- Dockerfile.linux-amd64/arm64: bake in rustfmt and clippy components
- test.yml: rust jobs → trcaa-linux-amd64:rust1.88-node22; drop inline
  apt-get and rustup component-add steps; add cargo cache
- test.yml: frontend jobs → add npm cache
- auto-tag.yml: build-linux-amd64 → trcaa-linux-amd64; drop Install
  dependencies step and rustup target add
- auto-tag.yml: build-windows-amd64 → trcaa-windows-cross; drop Install
  dependencies step and rustup target add
- auto-tag.yml: build-linux-arm64 → trcaa-linux-arm64 (ubuntu:22.04-based);
  drop ~40-line Install dependencies step, . "$HOME/.cargo/env", and
  rustup target add (all pre-baked in image ENV PATH)
- All build jobs: add cargo and npm cache steps
- docs/wiki/CICD-Pipeline.md: document pre-baked images, cache keys,
  and insecure-registries daemon prerequisite

Expected savings: ~70% faster PR test suite (~1.5 min vs ~5 min),
~72% faster release builds (~7 min vs ~25 min) after cache warms up.

NOTE: Trigger build-images.yml via workflow_dispatch before merging
to ensure images contain rustfmt/clippy before workflow changes land.
2026-04-12 20:16:32 -05:00
Shaun Arman
c49b8ebfc0 fix: force single test thread for Rust tests to eliminate race conditions
All checks were successful
Test / frontend-typecheck (pull_request) Successful in 1m9s
Test / frontend-tests (pull_request) Successful in 1m8s
Test / rust-fmt-check (pull_request) Successful in 2m49s
Test / rust-clippy (pull_request) Successful in 19m2s
Test / rust-tests (pull_request) Successful in 20m25s
- Add --test-threads=1 flag to all Rust test commands
- Update .gitea/workflows/test.yml to use serial test execution
- Update AGENTS.md to reflect the serial test requirement

Environment variable modifications in Rust tests cause race conditions
when tests run in parallel because std::env is shared global state.
2026-04-09 10:43:45 -05:00
Shaun Arman
cde4a85cc7 fix(ci): fix arm64 cross-compile, drop cargo install tauri-cli, move wiki-sync
build-linux-arm64: switch from QEMU-emulated linux-arm64 runner to cross-compile
on linux-amd64 using aarch64-linux-gnu toolchain. Removes the uname -m arch guard
that was causing the job to exit immediately (QEMU reports x86_64 as kernel arch),
and fixes the artifact path to the explicit target directory.

All build jobs: replace `cargo install tauri-cli --locked` with `npx tauri build`,
using the pre-compiled @tauri-apps/cli binary from devDependencies. Eliminates the
20-30 min Tauri CLI recompilation on every run.

wiki-sync: move from test.yml to auto-tag.yml. test.yml only fires on pull_request
events so the `if: github.ref == 'refs/heads/master'` guard was never true and the
wiki was never updated. auto-tag.yml triggers on push to master, so wiki sync now
runs on every merge.

Update releaseWorkflowCrossPlatformArtifacts.test.ts to match the new workflow.
2026-04-05 10:33:53 -05:00
Shaun Arman
4e7a5b64ba ci: run test workflow only on pull requests
Avoid duplicate Test workflow executions by removing push triggers and keeping pull_request validation as the single gate. Also fix remaining clippy format string violations in integration modules to keep rust-clippy passing.

Made-with: Cursor
2026-04-04 18:52:13 -05:00
Shaun Arman
8e7356e62d ci: skip test workflow pushes on master
Avoid rerunning the full test workflow on direct master pushes while keeping pull request validation intact. Update the CI/CD wiki page to reflect the new trigger behavior.

Made-with: Cursor
2026-04-04 16:45:55 -05:00
Shaun Arman
1d40dfb15b fix: use Wiki secret for authenticated wiki sync (v0.2.8)
Some checks failed
Release / build-macos-arm64 (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
- Updated wiki-sync job to use secrets.Wiki for authentication
- Simplified clone/push logic with token-based auth
- Wiki push will now succeed with proper credentials
- Bumped version to 0.2.8

The workflow now uses the 'Wiki' secret created in Gitea Actions
to authenticate wiki repository pushes. This fixes the authentication
issue that was preventing automatic wiki synchronization.
2026-04-03 16:47:32 -05:00
Shaun Arman
94b486b801 feat: add automatic wiki sync to CI workflow (v0.2.7)
- Added wiki-sync job to .gitea/workflows/test.yml
- Runs only on pushes to master branch
- Automatically copies docs/wiki/*.md to Gogs wiki repository
- Supports token-based authentication via secrets.GITHUB_TOKEN
- Handles wiki initialization if repository doesn't exist
- Bumped version to 0.2.7

Wiki sync will now automatically update the Gogs wiki at
https://gogs.tftsr.com/sarman/tftsr-devops_investigation/wiki
whenever docs/wiki/ files are modified on master.
2026-04-03 16:42:37 -05:00
Shaun Arman
73f9c3419d ci: restrict test.yml to branch pushes only (not tags)
Some checks failed
Test / rust-clippy (push) Successful in 7m32s
Test / rust-fmt-check (push) Failing after 13m17s
Test / rust-tests (push) Successful in 8m5s
Test / frontend-typecheck (push) Successful in 1m37s
Test / frontend-tests (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Release / build-windows-amd64 (push) Has been cancelled
2026-03-29 18:56:00 -05:00
Shaun Arman
02787361c8 ci: fix apt-get update missing before git install in checkout steps
Some checks failed
Test / rust-fmt-check (push) Successful in 33s
Test / rust-clippy (push) Failing after 2m35s
Test / rust-tests (push) Successful in 3m23s
Test / frontend-tests (push) Successful in 46s
Test / frontend-typecheck (push) Failing after 2m14s
rust:1.88-slim has an empty package cache. apt-get install git
was failing with 'Unable to locate package git'.
Add apt-get update -qq before every apt-get install in checkout steps.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:07:17 -05:00
Shaun Arman
29b6fb2170 ci: fix checkout — replace actions/checkout@v4 with direct git clone
Some checks failed
Test / rust-fmt-check (push) Failing after 2s
Test / rust-clippy (push) Failing after 2s
Test / frontend-typecheck (push) Has been cancelled
Test / rust-tests (push) Failing after 2s
Test / frontend-tests (push) Failing after 3s
actions/checkout@v4 requires Node.js which is not in rust:1.88-slim.
Replace with direct git init+fetch+checkout using the Gitea instance URL.
Also fix release.yml: each build job creates the release (idempotent)
and uploads its own artifacts inline via Gitea API.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 15:52:53 -05:00
Shaun Arman
9880afa117 ci: migrate from Woodpecker to Gitea Actions
Some checks are pending
Test / rust-fmt-check (push) Waiting to run
Test / rust-clippy (push) Waiting to run
Test / rust-tests (push) Waiting to run
Test / frontend-typecheck (push) Waiting to run
Test / frontend-tests (push) Waiting to run
Replaces .woodpecker/*.yml with Gitea Actions workflows:

- .gitea/workflows/test.yml: triggers on push/PR, runs 5 jobs
  (rust-fmt-check, rust-clippy, rust-tests, frontend-typecheck,
  frontend-tests) using rust:1.88-slim and node:22-alpine containers.

- .gitea/workflows/release.yml: triggers on v* tags, 4 jobs:
  - build-linux-amd64  (linux-amd64 runner, cross-compile x86_64)
  - build-windows-amd64 (linux-amd64 runner, mingw cross-compile)
  - build-linux-arm64  (linux-arm64 runner, native aarch64)
  - upload-release     (runs after all 3 build jobs, uses
    actions/download-artifact + Gitea release API)

Runners registered:
  - amd64-docker-runner (Docker, 172.0.0.29, labels: ubuntu-latest linux-amd64)
  - arm64-native-runner (systemd, local arm64 machine, label: linux-arm64)

Secrets: RELEASE_TOKEN set in repo Actions secrets.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 14:50:48 -05:00