ci(linux): migrate PR builds to build-citron-linux.sh, remove Arch container, and clean up obsolete scripts

build-linux.yml:
- Replace per-workflow build/package shell scripts (build-citron.sh,
  get-dependencies.sh, package-citron.sh) with a unified call to
  build-citron-linux.sh from the emulator repo, which handles dependency
  setup, CPM build, and AppImage/tar.zst packaging in one script
- Remove Arch Linux container (ghcr.io/pkgforge-dev/archlinux:latest)
  from the linux build job; the job now runs directly on the Ubuntu
  GitHub-hosted runner, eliminating the nested container layer
- Remove the 'Install Git' step (pacman -Syu git) that was only needed
  inside the Arch container
- Remove the 'Install Packaging Dependencies' step (pacman gamemode)
  that was only needed inside the Arch container; gamemode handling is
  now delegated to build-citron-linux.sh

Deleted files:
- build-citron.sh: Arch-based build script replaced by build-citron-linux.sh
- get-dependencies.sh: Arch pacman dependency installer, superseded
- package-citron.sh: Arch-based AppImage/tar.zst packager, superseded
- PKGBUILD: unused Arch Linux package build descriptor

README.md:
- Rewrite to reflect this repo's purpose as a PR test-artifact builder,
  not a nightly/stable release repo; redirect users to citron-neo/CI
  for releases
- Describe the per-platform workflow_dispatch model: takes branch, PR
  number, and head repo as inputs; posts/updates a results comment on
  the PR with per-platform status and nightly.link download links
- Document build-deduplication: skips re-building a commit already
  successfully built for that platform
- Update title and badge references from 'Citron' to 'Citron Neo'
- Mention tar.zst portable archive produced alongside the AppImage
- Update AppImage section with uruntime fuse3/no-fuse compatibility notes
- Replace bullet lists with dash lists; remove star history block,
  raison d'etre image, and Pkgforge attribution section
This commit is contained in:
cheezwiz7899
2026-07-02 10:22:10 +10:00
parent 023f8001a4
commit 12a7a81a8f
6 changed files with 78 additions and 392 deletions
+48 -48
View File
@@ -179,6 +179,9 @@ jobs:
if: always() && needs.check-version.outputs.should_build == 'true'
runs-on: ${{ matrix.os }}
timeout-minutes: 120
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpm-cache
strategy:
fail-fast: false
matrix:
@@ -187,28 +190,23 @@ jobs:
os: ubuntu-latest
artifact_name: "Artifacts_x86_64"
script_suffix: ""
build_arg: ""
arch_arg: ""
- name: "Citron Build (Optimized x86_64)"
os: ubuntu-latest
artifact_name: "Artifacts_v3"
script_suffix: "_v3"
build_arg: "v3"
arch_arg: "--arch v3"
- name: "Citron Build (aarch64)"
os: ubuntu-24.04-arm
artifact_name: "Artifacts_aarch64"
script_suffix: ""
build_arg: ""
container: ghcr.io/pkgforge-dev/archlinux:latest
arch_arg: ""
steps:
- name: Install Git
run: pacman -Syu --noconfirm --needed git
- name: Checkout Workflow Scripts
- name: Checkout CI Scripts
uses: actions/checkout@v4
- name: Clone Citron Source Code
- name: Clone Citron Source
shell: bash
run: |
CLONE_REPO="${{ needs.check-version.outputs.head_repo }}"
@@ -216,10 +214,9 @@ jobs:
EXPECTED_HASH="${{ needs.check-version.outputs.new_hash_full }}"
if [ -z "$CLONE_REPO" ] || [[ "$CLONE_REPO" != *"/"* ]]; then CLONE_REPO="${{ env.UPSTREAM_REPO }}"; fi
if [ -z "$BRANCH_NAME" ]; then BRANCH_NAME="main"; fi
echo "Cloning from $CLONE_REPO (branch: $BRANCH_NAME)..."
git clone --recurse-submodules --shallow-submodules --depth 1 -b "$BRANCH_NAME" "https://github.com/${CLONE_REPO}.git" emulator
cd emulator
git clone --depth 1 -b "$BRANCH_NAME" "https://github.com/${CLONE_REPO}.git" citron
cd citron
ACTUAL_HASH=$(git rev-parse HEAD)
echo "Checked out ${CLONE_REPO}@${BRANCH_NAME}: ${ACTUAL_HASH}"
if [ -n "$EXPECTED_HASH" ] && [ "$ACTUAL_HASH" != "$EXPECTED_HASH" ]; then
@@ -227,51 +224,54 @@ jobs:
exit 1
fi
- name: Prepare Build Environment
run: |
mv get-dependencies.sh emulator/
mv build-citron.sh emulator/
mv package-citron.sh emulator/
- name: Add Git Safe Directory
working-directory: ./emulator
- name: Set Git Safe Directory
working-directory: ./citron
run: git config --global --add safe.directory "$PWD"
- name: Install dependencies
working-directory: ./emulator
run: chmod +x ./get-dependencies.sh && ./get-dependencies.sh
- name: Cache CPM Sources
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.cpm-cache
key: cpm-linux-${{ runner.os }}-${{ matrix.os }}-${{ hashFiles('citron/CMakeModules/dependencies.cmake') }}
restore-keys: |
cpm-linux-${{ runner.os }}-${{ matrix.os }}-
- name: Build Citron from source
working-directory: ./emulator
- name: Setup Build Environment
working-directory: ./citron
run: |
chmod +x ./build-citron-linux.sh
./build-citron-linux.sh setup
- name: Compute Version
id: version
working-directory: ./citron
run: |
GIT_SHA="$(git rev-parse --short HEAD)"
PR_NUMBER="${{ needs.check-version.outputs.pr_number }}"
if [ -n "$PR_NUMBER" ]; then
echo "app_version=PR-${PR_NUMBER}-${GIT_SHA}" >> $GITHUB_OUTPUT
else
echo "app_version=${GIT_SHA}" >> $GITHUB_OUTPUT
fi
echo "sha=${GIT_SHA}" >> $GITHUB_OUTPUT
- name: Build Citron
working-directory: ./citron
env:
APP_VERSION: ${{ steps.version.outputs.app_version }}
ARCH_SUFFIX: ${{ matrix.script_suffix }}
DEVEL: "true"
run: |
NPROC_VAL=$(nproc --all)
JOBS_VAL=$((NPROC_VAL > 4 ? 4 : NPROC_VAL))
chmod +x ./build-citron.sh
JOBS=${JOBS_VAL} DEVEL=true ./build-citron.sh ${{ matrix.build_arg }}
- name: Package AppImage with Correct Name
working-directory: ./emulator
run: |
GIT_SHA=$(git rev-parse --short HEAD)
PR_NUMBER="${{ needs.check-version.outputs.pr_number }}"
BRANCH_NAME="${{ needs.check-version.outputs.branch_name }}"
SAFE_BRANCH=$(printf '%s' "$BRANCH_NAME" | tr '/ ' '--' | tr -cd 'A-Za-z0-9._-')
if [ -n "$PR_NUMBER" ]; then
export APP_VERSION="PR-${PR_NUMBER}-${GIT_SHA}"
else
export APP_VERSION="${SAFE_BRANCH:-main}-${GIT_SHA}"
fi
export VERSION="${APP_VERSION}"
export ARCH_SUFFIX="${{ matrix.script_suffix }}"
export DEVEL="true"
chmod +x ./package-citron.sh
./package-citron.sh
JOBS=${JOBS_VAL} ./build-citron-linux.sh use --pgo none --lto full ${{ matrix.arch_arg }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: emulator/dist/
path: citron/build/use-nopgo/AppImage/
comment-end:
name: Comment End
@@ -301,7 +301,7 @@ jobs:
gh api -X DELETE "repos/${UPSTREAM}/issues/comments/${DUPLICATE_ID}" >/dev/null 2>&1 || true
fi
done
if [ -n "$COMMENT_ID" ]; then
LOG_URL="https://github.com/${REPO}/actions/runs/${RUN_ID}"
COMMIT_LINK="[\`${HASH_SHORT}\`](https://github.com/${HEAD_REPO}/commit/${HASH_FULL})"