From b356eef44fbd5f0fbd0a5caa951f4806d3f275bc Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Fri, 3 Apr 2026 08:10:29 -0500 Subject: [PATCH] fix: remove Woodpecker CI and fix Gitea Actions ARM64 build - Remove .woodpecker/ directory entirely (not in use) - Fix ARM64 build in .gitea/workflows/release.yml: - Remove --platform flag (Docker version too old) - Use cross-compilation instead (dpkg multiarch + gcc-aarch64-linux-gnu) - Set PKG_CONFIG environment variables for ARM64 libraries - Set CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER This matches the working cross-compilation approach from commit d489338b. Co-Authored-By: Claude Sonnet 4.5 --- .gitea/workflows/release.yml | 16 ++-- .woodpecker/README_CI.md | 1 - .woodpecker/release.yml | 140 ----------------------------------- .woodpecker/test.yml | 39 ---------- 4 files changed, 10 insertions(+), 186 deletions(-) delete mode 100644 .woodpecker/README_CI.md delete mode 100644 .woodpecker/release.yml delete mode 100644 .woodpecker/test.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 50aa8c59..5e52e0dd 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -147,10 +147,7 @@ jobs: build-linux-arm64: runs-on: linux-arm64 container: - # Force the ARM64 image variant — QEMU binfmt on the runner handles execution. - # This avoids multiarch cross-compilation package conflicts entirely. image: rust:1.88-slim - options: --platform linux/arm64 steps: - name: Checkout run: | @@ -161,14 +158,21 @@ jobs: git checkout FETCH_HEAD - name: Install dependencies run: | - # Native ARM64 container — install packages without multiarch conflicts + # Use cross-compilation (Docker too old for --platform flag) + dpkg --add-architecture arm64 apt-get update -qq && apt-get install -y -qq \ - libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev \ - libayatana-appindicator3-dev librsvg2-dev patchelf \ + gcc-aarch64-linux-gnu \ + libwebkit2gtk-4.1-dev:arm64 libssl-dev:arm64 libgtk-3-dev:arm64 \ + libayatana-appindicator3-dev:arm64 librsvg2-dev:arm64 patchelf \ pkg-config curl perl curl -fsSL https://deb.nodesource.com/setup_22.x | bash - apt-get install -y nodejs - name: Build + env: + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + PKG_CONFIG_SYSROOT_DIR: / + PKG_CONFIG_LIBDIR: /usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig + PKG_CONFIG_ALLOW_CROSS: "1" run: | npm ci --legacy-peer-deps rustup target add aarch64-unknown-linux-gnu diff --git a/.woodpecker/README_CI.md b/.woodpecker/README_CI.md deleted file mode 100644 index 8f79e33d..00000000 --- a/.woodpecker/README_CI.md +++ /dev/null @@ -1 +0,0 @@ -Sun Mar 15 04:35:24 PM CDT 2026 diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml deleted file mode 100644 index 08ce6d5d..00000000 --- a/.woodpecker/release.yml +++ /dev/null @@ -1,140 +0,0 @@ ---- -# Release pipeline — triggered on v* tags -# Agents: -# linux/amd64 → woodpecker_agent (native x86_64 on 172.0.0.29, gogs_default network) -# linux/arm64 → woodpecker-agent.service on sarman's local arm64 machine (direct IP access) -# -# Note: amd64 steps share a workspace (same agent). The arm64 step runs on a separate -# agent with its own workspace and clones the repo directly via host IP. - -clone: - git: - image: alpine/git - network_mode: gogs_default - commands: - - git init -b master - - git remote add origin http://gitea_app:3000/sarman/tftsr-devops_investigation.git - - git fetch --depth=1 origin +refs/tags/${CI_COMMIT_TAG}:refs/tags/${CI_COMMIT_TAG} - - git checkout ${CI_COMMIT_TAG} - -steps: - - name: build-linux-amd64 - image: rust:1.88-slim - labels: - platform: linux/amd64 - environment: - TARGET: x86_64-unknown-linux-gnu - when: - - event: tag - commands: - - apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config curl perl - - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - - - apt-get install -y nodejs - - npm ci --legacy-peer-deps - - rustup target add $TARGET - - cargo install tauri-cli --version "^2" --locked - - CI=true cargo tauri build --target $TARGET - - mkdir -p artifacts/linux-amd64 - - find src-tauri/target/$TARGET/release/bundle -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" | xargs -I{} cp {} artifacts/linux-amd64/ - - - name: build-windows-amd64 - image: rust:1.88-slim - labels: - platform: linux/amd64 - environment: - TARGET: x86_64-pc-windows-gnu - CC_x86_64_pc_windows_gnu: x86_64-w64-mingw32-gcc - CXX_x86_64_pc_windows_gnu: x86_64-w64-mingw32-g++ - AR_x86_64_pc_windows_gnu: x86_64-w64-mingw32-ar - CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc - when: - - event: tag - commands: - - apt-get update -qq && apt-get install -y -qq mingw-w64 curl nsis perl make - - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - - - apt-get install -y nodejs - - npm ci --legacy-peer-deps - - rustup target add $TARGET - - cargo install tauri-cli --version "^2" --locked - - CI=true cargo tauri build --target $TARGET - - mkdir -p artifacts/windows-amd64 - - find src-tauri/target/$TARGET/release/bundle -name "*.exe" -o -name "*.msi" | xargs -I{} cp {} artifacts/windows-amd64/ 2>/dev/null || true - - - name: build-linux-arm64 - image: rust:1.88-slim - environment: - TARGET: aarch64-unknown-linux-gnu - when: - - event: tag - secrets: [GOGS_TOKEN] - commands: - - apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config curl perl git - - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - - - apt-get install -y nodejs - # Clone repo directly (arm64 agent is on local machine, not on gogs_default network) - - git init -b master - - git remote add origin http://172.0.0.29:3000/sarman/tftsr-devops_investigation.git - - git fetch --depth=1 origin +refs/tags/${CI_COMMIT_TAG}:refs/tags/${CI_COMMIT_TAG} - - git checkout ${CI_COMMIT_TAG} - - npm ci --legacy-peer-deps - - rustup target add $TARGET - - cargo install tauri-cli --version "^2" --locked - - CI=true cargo tauri build --target $TARGET - - mkdir -p artifacts/linux-arm64 - - find src-tauri/target/$TARGET/release/bundle -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" | xargs -I{} cp {} artifacts/linux-arm64/ - # Upload arm64 artifacts inline (uses host IP, accessible from local arm64 machine) - - | - TAG=${CI_COMMIT_TAG} - REPO=${CI_REPO} - API="http://172.0.0.29:3000/api/v1" - curl -sf -X POST "$API/repos/$REPO/releases" \ - -H "Authorization: token $GOGS_TOKEN" \ - -H "Content-Type: application/json" \ - -d "{\"tag_name\":\"$TAG\",\"name\":\"TFTSR $TAG\",\"body\":\"Release $TAG\",\"draft\":false}" || true - RELEASE_ID=$(curl -sf "$API/repos/$REPO/releases/tags/$TAG" \ - -H "Authorization: token $GOGS_TOKEN" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) - echo "Release ID: $RELEASE_ID" - for f in artifacts/linux-arm64/*; do - [ -f "$f" ] || continue - echo "Uploading $f..." - curl -sf -X POST "$API/repos/$REPO/releases/$RELEASE_ID/assets" \ - -H "Authorization: token $GOGS_TOKEN" \ - -F "attachment=@$f;filename=$(basename $f)" && echo "OK" || echo "Upload failed: $f" - done - - - name: upload-release - image: curlimages/curl:latest - labels: - platform: linux/amd64 - network_mode: gogs_default - when: - - event: tag - secrets: [GOGS_TOKEN] - commands: - - | - TAG=${CI_COMMIT_TAG} - REPO=${CI_REPO} - API="http://gitea_app:3000/api/v1" - - # Create release (idempotent — arm64 step may have already created it) - curl -sf -X POST "$API/repos/$REPO/releases" \ - -H "Authorization: token $GOGS_TOKEN" \ - -H "Content-Type: application/json" \ - -d "{\"tag_name\":\"$TAG\",\"name\":\"TFTSR $TAG\",\"body\":\"Release $TAG\",\"draft\":false}" || true - - # Get release ID - RELEASE_ID=$(curl -sf "$API/repos/$REPO/releases/tags/$TAG" \ - -H "Authorization: token $GOGS_TOKEN" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) - echo "Release ID: $RELEASE_ID" - - # Upload linux-amd64 and windows-amd64 artifacts - for dir in artifacts/linux-amd64 artifacts/windows-amd64; do - [ -d "$dir" ] || continue - for f in "$dir"/*; do - [ -f "$f" ] || continue - echo "Uploading $f..." - curl -sf -X POST "$API/repos/$REPO/releases/$RELEASE_ID/assets" \ - -H "Authorization: token $GOGS_TOKEN" \ - -F "attachment=@$f;filename=$(basename $f)" && echo "OK" || echo "Upload failed: $f" - done - done diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml deleted file mode 100644 index 3b9856a0..00000000 --- a/.woodpecker/test.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -clone: - git: - image: woodpeckerci/plugin-git - network_mode: gogs_default - environment: - - CI_REPO_CLONE_URL=http://gitea_app:3000/sarman/tftsr-devops_investigation.git - -steps: - - name: rust-fmt-check - image: rust:1.88-slim - commands: - - rustup component add rustfmt - - cargo fmt --manifest-path src-tauri/Cargo.toml --check - - - name: rust-clippy - image: rust:1.88-slim - commands: - - apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl - - rustup component add clippy - - cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings - - - name: rust-tests - image: rust:1.88-slim - commands: - - apt-get update -qq && apt-get install -y -qq libwebkit2gtk-4.1-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf pkg-config perl - - cargo test --manifest-path src-tauri/Cargo.toml - - - name: frontend-typecheck - image: node:22-alpine - commands: - - npm ci --legacy-peer-deps - - npx tsc --noEmit - - - name: frontend-tests - image: node:22-alpine - commands: - - npm ci --legacy-peer-deps - - npm run test:run