Author SHA1 Message Date
CollectingWandGitHub a22884897d Merge pull request #13 from cheezwiz7899/main
clangtron-windows-CI
2026-04-19 16:59:50 -04:00
cheezwiz7899andGitHub d2021e7306 Merge branch 'citron-neo:main' into main 2026-04-19 22:52:19 +12:00
cheezwiz7899 d301f31b68 ci: point clangtron jobs back to main citron-neo repository 2026-04-19 22:51:08 +12:00
github-actions[bot] 0de1505e84 Update LATEST_VERSION to 73993e5 [skip ci] 2026-04-19 08:02:28 +00:00
github-actions[bot] 17e24f428e Update LATEST_VERSION_MACOS to 73993e5f3 [skip ci] 2026-04-19 07:54:05 +00:00
cheezwiz7899 1e914abe8b ci: add qt caching for clangtron builds 2026-04-19 16:56:35 +12:00
cheezwiz7899 23cb3574ad ci: fix vcpkg caching and add ffmpeg caching for clangtron builds 2026-04-19 12:53:50 +12:00
cheezwiz7899 e99ae4cfa7 ci: trigger windows ci to fix llvm demangle 2026-04-19 11:35:21 +12:00
cheezwiz7899 f0c64e6001 help github remember where it put llvm during the setup step 2026-04-19 10:46:34 +12:00
cheezwiz7899andGitHub 9ac446b614 Update build-windows.yml
Temporarily clone from fork branch for testing
2026-04-19 08:36:46 +12:00
cheezwiz7899 e3de2d82a5 add clangtron-windows builds 2026-04-18 15:20:50 +10:00
github-actions[bot] b34a39a9dc Update LATEST_VERSION to 0db11ed [skip ci] 2026-04-17 10:46:53 +00:00
github-actions[bot] b28dca2488 Update LATEST_VERSION_MACOS to 0db11ed05 [skip ci] 2026-04-17 10:40:18 +00:00
github-actions[bot] 8e2af78a7e Update LATEST_VERSION_MACOS to 3866aa6b0 [skip ci] 2026-04-16 14:27:37 +00:00
github-actions[bot] 5a41338348 Update LATEST_VERSION to 3866aa6b0 [skip ci] 2026-04-16 14:10:57 +00:00
github-actions[bot] f3f829008e Update LATEST_VERSION to 739c11a [skip ci] 2026-04-16 07:11:59 +00:00
github-actions[bot] 551b1243ad Update LATEST_VERSION_MACOS to 739c11a3c [skip ci] 2026-04-16 07:04:35 +00:00
github-actions[bot] 0ed6bc4642 Update LATEST_VERSION_MACOS to 253938175 [skip ci] 2026-04-16 06:24:58 +00:00
github-actions[bot] dcc681efbf Update LATEST_VERSION_MACOS to e6e97fc97 [skip ci] 2026-04-15 14:09:18 +00:00
github-actions[bot] 454b18ed32 Update LATEST_VERSION to e6e97fc97 [skip ci] 2026-04-15 14:03:50 +00:00
github-actions[bot] 596d5fc9d5 Update LATEST_VERSION to b4263ae5c [skip ci] 2026-04-14 08:13:41 +00:00
github-actions[bot] c74265fc72 Update LATEST_VERSION_MACOS to b4263ae5c [skip ci] 2026-04-14 07:52:33 +00:00
github-actions[bot] e78b67ccea Update LATEST_VERSION_MACOS to ae4d00cb1 [skip ci] 2026-04-14 07:21:45 +00:00
github-actions[bot] 8d40e6cb07 Update LATEST_VERSION_MACOS to c5db02e14 [skip ci] 2026-04-13 14:18:32 +00:00
github-actions[bot] f1bf64e2ba Update LATEST_VERSION to c5db02e14 [skip ci] 2026-04-13 13:37:39 +00:00
github-actions[bot] cb2f5006f2 Update LATEST_VERSION to 8a1aaec [skip ci] 2026-04-13 09:29:05 +00:00
github-actions[bot] 45ca1ed808 Update LATEST_VERSION_MACOS to 8a1aaecb2 [skip ci] 2026-04-13 09:16:53 +00:00
github-actions[bot] 0de320e62f Update LATEST_VERSION to 2a96ecf [skip ci] 2026-04-13 08:48:26 +00:00
github-actions[bot] 3a36f50a1a Update LATEST_VERSION_MACOS to 2a96ecfa5 [skip ci] 2026-04-13 08:36:23 +00:00
github-actions[bot] ab388bfe33 Update LATEST_VERSION to 436db47 [skip ci] 2026-04-13 06:16:35 +00:00
github-actions[bot] b33b9beb58 Update LATEST_VERSION_MACOS to 436db471e [skip ci] 2026-04-13 06:12:08 +00:00
Mythrax-ZSandGitHub 6c80e374a9 Update version from '436db471e' to 'NULL436db47' 2026-04-13 15:51:29 +10:00
Mythrax-ZSandGitHub 38581df5c4 Update LATEST_VERSION to NULL436db47 2026-04-13 15:51:16 +10:00
Mythrax e9868f039c fix(ci): remove duplicate nightly-windows release that dropped MSVC zip
Signed-off-by: Mythrax <mythrax@mytrax-rs.org>
2026-04-13 15:47:53 +10:00
github-actions[bot] 3b52cc119d Update LATEST_VERSION to 436db47 [skip ci] 2026-04-12 13:38:24 +00:00
github-actions[bot] b8bd165dab Update LATEST_VERSION_MACOS to 436db471e [skip ci] 2026-04-12 13:30:44 +00:00
github-actions[bot] 82f1ce77e5 Update LATEST_VERSION to 436db471e [skip ci] 2026-04-11 23:26:52 +00:00
github-actions[bot] 8d9690451a Update LATEST_VERSION to dc4f560 [skip ci] 2026-04-11 13:39:13 +00:00
github-actions[bot] 3d1f689652 Update LATEST_VERSION_MACOS to dc4f56085 [skip ci] 2026-04-11 13:32:49 +00:00
github-actions[bot] 40759da244 Update LATEST_VERSION to dc4f56085 [skip ci] 2026-04-11 13:08:35 +00:00
github-actions[bot] 0aff1795fb Update LATEST_VERSION to 74e6e3392 [skip ci] 2026-04-11 05:11:50 +00:00
github-actions[bot] 00e580fc28 Update LATEST_VERSION to 40e1716 [skip ci] 2026-04-11 03:29:23 +00:00
github-actions[bot] e9024d95f2 Update LATEST_VERSION_MACOS to 40e17160b [skip ci] 2026-04-11 03:22:05 +00:00
github-actions[bot] 7095c50c30 Update LATEST_VERSION to 7c106d1 [skip ci] 2026-04-10 13:50:02 +00:00
github-actions[bot] 9255cb05f5 Update LATEST_VERSION to 7c106d126 [skip ci] 2026-04-10 04:16:03 +00:00
CollectingWandGitHub a6f7aa9564 Update LATEST_VERSION 2026-04-09 23:37:23 -04:00
github-actions[bot] 347e428e88 Update LATEST_VERSION to 7c106d1 [skip ci] 2026-04-09 06:45:08 +00:00
github-actions[bot] 5059c1cfda Update LATEST_VERSION_MACOS to 7c106d126 [skip ci] 2026-04-09 06:37:03 +00:00
github-actions[bot] af03253df4 Update LATEST_VERSION to dcb9937 [skip ci] 2026-04-09 05:16:41 +00:00
github-actions[bot] 4ddfdaa1ca Update LATEST_VERSION_MACOS to dcb99371b [skip ci] 2026-04-09 05:10:39 +00:00
github-actions[bot] e72bcabf50 Update LATEST_VERSION to f2ddf49 [skip ci] 2026-04-09 04:08:42 +00:00
github-actions[bot] e15e63ba7c Update LATEST_VERSION_MACOS to 996139fff [skip ci] 2026-04-09 03:30:59 +00:00
github-actions[bot] 79bb987046 Update LATEST_VERSION to bd78f8d [skip ci] 2026-04-07 01:37:19 +00:00
github-actions[bot] 518f8f0d21 Update LATEST_VERSION_MACOS to bd78f8dda [skip ci] 2026-04-07 01:24:07 +00:00
github-actions[bot] ce1f9e9f41 Update LATEST_VERSION to d54445a [skip ci] 2026-04-06 13:49:44 +00:00
github-actions[bot] a322bd15bd Update LATEST_VERSION_MACOS to d54445a81 [skip ci] 2026-04-06 13:43:30 +00:00
github-actions[bot] 6a7ef097a6 Update LATEST_VERSION to c030f0c [skip ci] 2026-04-05 23:49:28 +00:00
github-actions[bot] aeedbca292 Update LATEST_VERSION_MACOS to c030f0ce1 [skip ci] 2026-04-05 23:41:40 +00:00
github-actions[bot] 34c0116e3c Update LATEST_VERSION to f379d6cd6 [skip ci] 2026-04-05 21:37:43 +00:00
CollectingWandGitHub b76362b4b5 Update LATEST_VERSION 2026-04-05 16:59:10 -04:00
CollectingWandGitHub 8bdfbed52a Merge pull request #9 from cheezwiz7899/mingwfix2
ci(windows): fix mingw build round 2
2026-04-05 16:58:44 -04:00
cheezwiz7899 048fafd2c9 ci(windows): fix mingw build round 2
adds chill to the pruning step in the mingw workflow
Also mirrors the changes to the nightly workflow
2026-04-06 05:43:47 +10:00
github-actions[bot] 14611d241e Update LATEST_VERSION to f379d6c [skip ci] 2026-04-05 13:37:02 +00:00
github-actions[bot] f70de2061a Update LATEST_VERSION_MACOS to f379d6cd6 [skip ci] 2026-04-05 13:33:31 +00:00
github-actions[bot] 4712bfda7f Update LATEST_VERSION to f379d6cd6 [skip ci] 2026-04-05 07:49:40 +00:00
CollectingWandGitHub ba1b08d38e Update for Build 2026-04-05 02:40:25 -04:00
CollectingWandGitHub db86d502a6 Merge pull request #8 from cheezwiz7899/mingwfix
ci(windows): fix mingw dll deployment
2026-04-05 02:38:44 -04:00
cheezwiz7899 5210fe3474 ci(windows): fix mingw dll deployment 2026-04-05 16:28:25 +10:00
github-actions[bot] 167e857d2d Update LATEST_VERSION to f379d6c [skip ci] 2026-04-05 02:39:11 +00:00
github-actions[bot] 12c4a729b6 Update LATEST_VERSION to 5068853 [skip ci] 2026-04-05 01:54:43 +00:00
github-actions[bot] 8550f02355 Update LATEST_VERSION_MACOS to 506885391 [skip ci] 2026-04-05 01:42:44 +00:00
5 changed files with 272 additions and 275 deletions
Regular โ†’ Executable
+139 -62
View File
@@ -97,8 +97,8 @@ jobs:
mingw-w64-ucrt-x86_64-lz4
mingw-w64-ucrt-x86_64-ffmpeg
mingw-w64-ucrt-x86_64-opus
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-openal
mingw-w64-ucrt-x86_64-libusb
git
base-devel
@@ -131,7 +131,7 @@ jobs:
id: cache-build
with:
path: ./citron/build
key: mingw-build-${{ runner.os }}-${{ hashFiles('citron/CMakeLists.txt') }}
key: mingw-build-${{ runner.os }}-${{ hashFiles('citron/CMakeLists.txt') }}-${{ hashFiles('.github/workflows/build-windows.yml') }}
restore-keys: |
mingw-build-${{ runner.os }}-
@@ -143,6 +143,10 @@ jobs:
VERSION=$(git rev-parse --short HEAD)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Clear stale CMake cache (MinGW)
working-directory: ./citron
run: rm -f build/CMakeCache.txt
- name: Configure CMake (MinGW)
working-directory: ./citron
run: |
@@ -163,64 +167,29 @@ jobs:
-DENABLE_OPENSSL=ON \
-DENABLE_CUBEB=OFF \
-DENABLE_OPENAL=ON \
-DENABLE_LIBUSB=ON \
-DUSE_DISCORD_PRESENCE=OFF \
-DCITRON_USE_AUTO_UPDATER=OFF \
-DCITRON_USE_PRECOMPILED_HEADERS=ON
-DCITRON_USE_PRECOMPILED_HEADERS=ON \
-DENABLE_LIBUSB=OFF
- name: Build Citron (MinGW)
working-directory: ./citron
run: cmake --build build --config Release -j$(nproc)
- name: Collect runtime DLL dependencies (MinGW)
- name: Copy vcpkg runtime DLLs to bin (MinGW)
working-directory: ./citron
run: |
set -e
# vcpkg's DLL directory is not on the shell PATH, so CMake's deploy step
# and ldd both miss these DLLs entirely.
VCPKG_BIN="./build/vcpkg_installed/x64-mingw-dynamic/bin"
BIN_DIR="./build/bin"
if [ -d "$BIN_DIR/Release" ]; then
BIN_DIR="$BIN_DIR/Release"
if [ -d "$VCPKG_BIN" ]; then
find "$VCPKG_BIN" -maxdepth 1 -name "*.dll" -exec cp -v {} "$BIN_DIR/" \;
else
echo "Warning: vcpkg bin dir not found at $VCPKG_BIN"
fi
TARGET_EXE="$BIN_DIR/citron.exe"
if [ ! -f "$TARGET_EXE" ]; then
TARGET_EXE="$(find "$BIN_DIR" -maxdepth 1 -type f -name "*.exe" | head -n 1)"
fi
if [ -z "$TARGET_EXE" ] || [ ! -f "$TARGET_EXE" ]; then
echo "Could not find built executable in $BIN_DIR"
exit 1
fi
VCPKG_BIN="$PWD/build/vcpkg_installed/x64-mingw-dynamic/bin"
UCRT_BIN="/ucrt64/bin"
: > runtime_dlls_windows.txt
# Resolve imported DLLs explicitly from known runtime locations.
objdump -p "$TARGET_EXE" 2>/dev/null \
| awk '/DLL Name:/ {print $3}' \
| sort -u \
| while read -r dll_name; do
found=""
if [ -f "$VCPKG_BIN/$dll_name" ]; then
found="$VCPKG_BIN/$dll_name"
elif [ -f "$UCRT_BIN/$dll_name" ]; then
found="$UCRT_BIN/$dll_name"
fi
if [ -n "$found" ]; then
cygpath -w "$found" >> runtime_dlls_windows.txt
fi
done
# Include indirect/runtime-linked DLLs detected by ldd as a fallback.
ldd "$TARGET_EXE" 2>/dev/null \
| awk '{for (i=1; i<=NF; i++) if ($i ~ /^\/.*\.dll$/) print $i}' \
| sort -u \
| while read -r dll_path; do
cygpath -w "$dll_path" >> runtime_dlls_windows.txt
done
sort -u -o runtime_dlls_windows.txt runtime_dlls_windows.txt
- name: Package Windows Build (MinGW)
shell: pwsh
@@ -228,7 +197,6 @@ jobs:
mkdir dist
mkdir temp_package
# Copy the built binaries (MinGW outputs to bin/ directly, not bin/Release/)
$binDir = ".\citron\build\bin"
if (Test-Path "$binDir\Release") { $binDir = "$binDir\Release" }
@@ -242,17 +210,6 @@ jobs:
Copy-Item $_.FullName $destPath -Force
}
# Copy runtime DLLs resolved via ldd (MSYS2 + vcpkg dynamic dependencies)
$dllList = ".\citron\runtime_dlls_windows.txt"
if (Test-Path $dllList) {
Get-Content $dllList | ForEach-Object {
$dllPath = $_.Trim()
if ($dllPath -and (Test-Path $dllPath)) {
Copy-Item $dllPath ".\temp_package\" -Force
}
}
}
Compress-Archive -Path ".\temp_package\*" -DestinationPath ".\dist\Citron-windows-nightly-${{ steps.version.outputs.VERSION }}-x64-mingw.zip"
Remove-Item ".\temp_package" -Recurse -Force
@@ -371,10 +328,129 @@ jobs:
name: Citron-Windows-Nightly-MSVC-x64
path: "dist/*.zip"
build-clangtron:
name: "Citron Build (Windows Clangtron - x64)"
needs: [check-version]
if: needs.check-version.outputs.should_build == 'true'
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Clone Citron Source (Clangtron)
run: |
ATTEMPT=0
MAX_ATTEMPTS=999
while true; do
ATTEMPT=$((ATTEMPT + 1))
echo "Attempt $ATTEMPT of $MAX_ATTEMPTS: Cloning Citron..."
rm -rf citron
if git clone --recursive "https://github.com/citron-neo/emulator.git" citron; then
echo "Clone successful on attempt $ATTEMPT."
break
fi
if [ $ATTEMPT -ge $MAX_ATTEMPTS ]; then
echo "Failed after $MAX_ATTEMPTS attempts."
exit 1
fi
echo "Clone failed. Retrying in 15 seconds..."
sleep 15
done
- name: Cache llvm-mingw toolchain
uses: actions/cache@v4
id: cache-llvm-mingw
with:
path: ./citron/build/llvm-mingw
key: clangtron-llvm-mingw-${{ runner.os }}-20260224
- name: Cache vcpkg archives (Clangtron)
uses: actions/cache@v4
with:
path: |
~/.cache/vcpkg/archives
citron/externals/vcpkg/downloads
key: clangtron-vcpkg-${{ runner.os }}-${{ hashFiles('citron/vcpkg.json', 'citron/build-clangtron-windows.sh') }}
restore-keys: |
clangtron-vcpkg-${{ runner.os }}-
- name: Get Version (Clangtron)
id: version
working-directory: ./citron
run: |
git fetch --tags
VERSION=$(git rev-parse --short HEAD)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Skip BOLT build (not needed for --pgo none)
run: |
echo '#!/bin/bash' | sudo tee /usr/local/bin/llvm-bolt-21
echo '#!/bin/bash' | sudo tee /usr/local/bin/merge-fdata-21
sudo chmod +x /usr/local/bin/llvm-bolt-21
sudo chmod +x /usr/local/bin/merge-fdata-21
- name: Get FFmpeg Version
id: ffmpeg-ver
working-directory: ./citron
run: |
VERSION=$(tr -d '[:space:]' < externals/ffmpeg/ffmpeg/RELEASE)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Cache built FFmpeg
uses: actions/cache@v4
with:
path: citron/build/use-nopgo/externals/ffmpeg-${{ steps.ffmpeg-ver.outputs.VERSION }}
key: clangtron-ffmpeg-built-${{ runner.os }}-${{ steps.ffmpeg-ver.outputs.VERSION }}-${{ hashFiles('citron/build-clangtron-windows.sh') }}
- name: Cache Qt (Clangtron)
uses: actions/cache@v4
with:
path: |
citron/build/use-nopgo/externals/qt
citron/build/use-nopgo/externals/qt-host
key: clangtron-qt-6.9.3-${{ runner.os }}-${{ hashFiles('citron/build-clangtron-windows.sh') }}
- name: Setup Clangtron Build Environment
working-directory: ./citron
run: |
chmod +x build-clangtron-windows.sh
./build-clangtron-windows.sh setup
echo "${GITHUB_WORKSPACE}/citron/build/llvm-mingw/bin" >> "$GITHUB_PATH"
- name: Build Citron (Clangtron LTO)
working-directory: ./citron
run: |
export CITRON_BUILD_TYPE=Release
./build-clangtron-windows.sh use --pgo none --lto full
- name: Package Windows Build (Clangtron)
run: |
mkdir -p dist
BIN_DIR="./citron/build/use-nopgo/bin"
if [ ! -d "$BIN_DIR" ]; then
echo "::error::Build output not found at $BIN_DIR"
exit 1
fi
cd "$BIN_DIR"
zip -r "${GITHUB_WORKSPACE}/dist/Citron-windows-nightly-${{ steps.version.outputs.VERSION }}-x64-clangtron.zip" .
- name: Upload Windows Build (Clangtron)
uses: actions/upload-artifact@v4
with:
name: Citron-Windows-Nightly-Clangtron-x64
path: "dist/*.zip"
release:
if: ${{ github.ref_name == 'main' }}
name: "Release"
needs: [check-version, build-mingw, build-msvc]
needs: [check-version, build-mingw, build-msvc, build-clangtron]
permissions:
contents: write
runs-on: ubuntu-latest
@@ -409,6 +485,7 @@ jobs:
files: |
release-artifacts/*-x64-mingw.zip
release-artifacts/*-x64-msvc.zip
release-artifacts/*-x64-clangtron.zip
body: |
**Citron Upstream Commit:** [`${{ needs.check-version.outputs.new_hash }}`](https://github.com/citron-neo/emulator/commit/${{ needs.check-version.outputs.new_hash_full }})
@@ -416,7 +493,7 @@ jobs:
**Build Details:**
- Platform: Windows (x64)
- Toolchains: MinGW-w64 (MSYS2 UCRT64) + MSVC (Visual Studio 2022)
- Toolchains: MinGW-w64 (MSYS2 UCRT64) + MSVC (Visual Studio 2022) + Clangtron (Clang LTO cross-compiled)
- Build Type: Release
- Date: ${{ env.BUILD_DATE }}
- name: Update LATEST_VERSION
@@ -442,5 +519,5 @@ jobs:
exit 0
fi
curl -H "Content-Type: application/json" \
-d "{\"content\":\"๐ŸชŸ **New Windows Builds Available!**\n\n๐Ÿ“ฆ **Version:** \`${{ env.APP_VERSION }}\`\n๐Ÿ“… **Date:** ${DATE}\n๐Ÿ”ง **Toolchains:** MinGW-w64 (UCRT64) + MSVC\n๐Ÿ”— **Download:** $DOWNLOAD_URL\"}" \
-d "{\"content\":\"๐ŸชŸ **New Windows Builds Available!**\n\n๐Ÿ“ฆ **Version:** \`${{ env.APP_VERSION }}\`\n๐Ÿ“… **Date:** ${DATE}\n๐Ÿ”ง **Toolchains:** MinGW-w64 (UCRT64) + MSVC + Clangtron (Clang LTO)\n๐Ÿ”— **Download:** $DOWNLOAD_URL\"}" \
"$WEBHOOK_URL"
+4 -207
View File
@@ -646,144 +646,11 @@ jobs:
path: "dist/*.dmg"
# ===========================================================================
# WINDOWS (MinGW)
# WINDOWS: MinGW + MSVC + Clangtron nightly builds and the nightly-windows
# GitHub Release are handled exclusively by .github/workflows/build-windows.yml
# (same cron). A duplicate release job here used to run after that workflow
# and recreate nightly-windows with only the MinGW zip, dropping other assets.
# ===========================================================================
build-windows:
name: "Citron Build (Windows MinGW - x64)"
needs: [check-version]
if: needs.check-version.outputs.should_build == 'true'
runs-on: windows-latest
timeout-minutes: 180
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-qt6-base
mingw-w64-ucrt-x86_64-qt6-tools
mingw-w64-ucrt-x86_64-qt6-multimedia
mingw-w64-ucrt-x86_64-qt6-translations
mingw-w64-ucrt-x86_64-SDL2
mingw-w64-ucrt-x86_64-vulkan-headers
mingw-w64-ucrt-x86_64-vulkan-loader
mingw-w64-ucrt-x86_64-vulkan-utility-libraries
mingw-w64-ucrt-x86_64-vulkan-memory-allocator
mingw-w64-ucrt-x86_64-openssl
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-nlohmann-json
mingw-w64-ucrt-x86_64-zlib
mingw-w64-ucrt-x86_64-zstd
mingw-w64-ucrt-x86_64-lz4
mingw-w64-ucrt-x86_64-ffmpeg
mingw-w64-ucrt-x86_64-opus
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-openal
git
base-devel
- name: Clone Citron Source
run: |
ATTEMPT=0
MAX_ATTEMPTS=999
while true; do
ATTEMPT=$((ATTEMPT + 1))
echo "Attempt $ATTEMPT of $MAX_ATTEMPTS: Cloning Citron..."
rm -rf citron
if git clone --recursive "https://github.com/citron-neo/emulator.git" citron; then
echo "Clone successful on attempt $ATTEMPT."
break
fi
if [ $ATTEMPT -ge $MAX_ATTEMPTS ]; then
echo "Failed after $MAX_ATTEMPTS attempts."; exit 1
fi
echo "Clone failed. Retrying in 15 seconds..."
sleep 15
done
- name: Cache build directory
uses: actions/cache@v4
id: cache-build
with:
path: ./citron/build
key: mingw-build-${{ runner.os }}-${{ hashFiles('citron/CMakeLists.txt') }}
restore-keys: |
mingw-build-${{ runner.os }}-
- name: Get Nightly Version
id: version
working-directory: ./citron
run: |
git fetch --tags
VERSION=$(git rev-parse --short HEAD)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Configure CMake
working-directory: ./citron
run: |
cmake -B build -S . -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCITRON_USE_BUNDLED_VCPKG=ON \
-DCITRON_USE_BUNDLED_QT=OFF \
-DCITRON_USE_BUNDLED_FFMPEG=OFF \
-DCITRON_USE_EXTERNAL_SDL2=ON \
-DCITRON_USE_EXTERNAL_VULKAN_HEADERS=ON \
-DCITRON_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES=ON \
-DCITRON_BUILD_TYPE=Nightly \
-DCITRON_TESTS=OFF \
-DENABLE_QT=ON \
-DENABLE_QT6=ON \
-DENABLE_SDL2=ON \
-DENABLE_WEB_SERVICE=ON \
-DENABLE_OPENSSL=ON \
-DENABLE_CUBEB=OFF \
-DENABLE_OPENAL=ON \
-DENABLE_LIBUSB=ON \
-DUSE_DISCORD_PRESENCE=OFF \
-DCITRON_USE_AUTO_UPDATER=OFF \
-DCITRON_USE_PRECOMPILED_HEADERS=ON
- name: Build Citron
working-directory: ./citron
run: cmake --build build --config Release -j$(nproc)
- name: Package Windows Build
shell: pwsh
run: |
mkdir dist
mkdir temp_package
$binDir = ".\citron\build\bin"
if (Test-Path "$binDir\Release") { $binDir = "$binDir\Release" }
Get-ChildItem $binDir -Recurse | Where-Object {
$_.Extension -ne ".pdb" -and $_.Extension -ne ".a" -and $_.Extension -ne ".o"
} | ForEach-Object {
$relativePath = $_.FullName.Replace((Resolve-Path $binDir).Path, "").TrimStart('\')
$destPath = Join-Path ".\temp_package" $relativePath
$destDir = Split-Path $destPath -Parent
if (!(Test-Path $destDir)) { New-Item -ItemType Directory -Path $destDir -Force | Out-Null }
Copy-Item $_.FullName $destPath -Force
}
Compress-Archive -Path ".\temp_package\*" -DestinationPath ".\dist\Citron-windows-nightly-${{ steps.version.outputs.VERSION }}-x64-mingw.zip"
Remove-Item ".\temp_package" -Recurse -Force
- name: Upload Windows Build
uses: actions/upload-artifact@v4
with:
name: Citron-Windows-Nightly-x64
path: "dist/*.zip"
# ===========================================================================
# RELEASE - Android
@@ -1017,73 +884,3 @@ jobs:
curl -H "Content-Type: application/json" \
-d "{\"content\":\"๐ŸŽ **New macOS Nightly Build!**\n\n๐Ÿ“ฆ **Version:** \`${{ env.APP_VERSION }}\`\n๐Ÿ“… **Date:** ${DATE}\n๐Ÿ”— **Download:** $DOWNLOAD_URL\"}" \
"$WEBHOOK_URL"
# ===========================================================================
# RELEASE - Windows
# ===========================================================================
release-windows:
if: ${{ github.ref_name == 'main' }}
name: "Release Windows Nightly"
needs: [check-version, build-windows]
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: Citron-Windows-Nightly-x64
path: .
- name: Get Version from Filename
shell: bash
run: |
FILENAME=$(ls Citron-windows-nightly-*-x64-mingw.zip)
VERSION=${FILENAME#Citron-windows-nightly-}
VERSION=${VERSION%-x64-mingw.zip}
echo "APP_VERSION=${VERSION}" >> $GITHUB_ENV
- name: Delete Previous Release
run: gh release delete "nightly-windows" --repo "${{ github.repository }}" --cleanup-tag -y || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set Build Date
run: echo "BUILD_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Release Artifacts
uses: softprops/action-gh-release@v2
with:
name: "Continuous Build (Windows Nightly: ${{ env.APP_VERSION }})"
tag_name: "nightly-windows"
prerelease: false
files: "*.zip"
body: |
**Citron Upstream Commit:** [`${{ needs.check-version.outputs.new_hash }}`](https://github.com/citron-neo/emulator/commit/${{ needs.check-version.outputs.new_hash_full }})
This build is based on the latest Citron emulator source code from the upstream repository.
**Build Details:**
- Platform: Windows (x64)
- Toolchain: MinGW-w64 (MSYS2 UCRT64)
- Build Type: Nightly
- Date: ${{ env.BUILD_DATE }}
- name: Update LATEST_VERSION
if: success()
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
echo "${{ env.APP_VERSION }}" > LATEST_VERSION
git add LATEST_VERSION
git commit -m "Update LATEST_VERSION to ${{ env.APP_VERSION }} [skip ci]" || exit 0
for i in {1..5}; do
git pull --rebase origin main && git push && break || sleep 2
done
- name: Post to Discord
if: success()
run: |
DOWNLOAD_URL="https://github.com/${{ github.repository }}/releases/tag/nightly-windows"
DATE=$(date +'%Y-%m-%d')
WEBHOOK_URL="${{ secrets.DISCORD_WEBHOOK }}"
if [ -z "$WEBHOOK_URL" ]; then echo "DISCORD_WEBHOOK is not set; skipping."; exit 0; fi
curl -H "Content-Type: application/json" \
-d "{\"content\":\"๐ŸชŸ **New Windows Nightly Build!**\n\n๐Ÿ“ฆ **Version:** \`${{ env.APP_VERSION }}\`\n๐Ÿ“… **Date:** ${DATE}\n๐Ÿ”ง **Toolchain:** MinGW-w64 (UCRT64)\n๐Ÿ”— **Download:** $DOWNLOAD_URL\"}" \
"$WEBHOOK_URL"
+127 -4
View File
@@ -784,6 +784,128 @@ jobs:
name: Citron-Windows-Stable-x64
path: "dist/*.zip"
# ===========================================================================
# WINDOWS (Clangtron - Clang LTO cross-compiled from Ubuntu)
# ===========================================================================
build-clangtron:
name: "Citron Build (Windows Clangtron - x64)"
needs: [check-version]
if: needs.check-version.outputs.should_build == 'true'
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Clone Citron Source (Clangtron)
run: |
ATTEMPT=0
MAX_ATTEMPTS=999
while true; do
ATTEMPT=$((ATTEMPT + 1))
echo "Attempt $ATTEMPT of $MAX_ATTEMPTS: Cloning Citron..."
rm -rf citron
if git clone --recursive "https://github.com/citron-neo/emulator.git" citron; then
echo "Clone successful on attempt $ATTEMPT."
break
fi
if [ $ATTEMPT -ge $MAX_ATTEMPTS ]; then
echo "Failed after $MAX_ATTEMPTS attempts."
exit 1
fi
echo "Clone failed. Retrying in 15 seconds..."
sleep 15
done
- name: Cache llvm-mingw toolchain
uses: actions/cache@v4
id: cache-llvm-mingw
with:
path: ./citron/build/llvm-mingw
key: clangtron-llvm-mingw-${{ runner.os }}-20260224
- name: Cache vcpkg archives (Clangtron)
uses: actions/cache@v4
with:
path: |
~/.cache/vcpkg/archives
citron/externals/vcpkg/downloads
key: clangtron-vcpkg-stable-${{ runner.os }}-${{ hashFiles('citron/vcpkg.json', 'citron/build-clangtron-windows.sh') }}
restore-keys: |
clangtron-vcpkg-stable-${{ runner.os }}-
- name: Get Version (Clangtron)
id: version
working-directory: ./citron
run: |
git fetch --tags
VERSION=$(git rev-parse --short HEAD)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Get FFmpeg Version
id: ffmpeg-ver
working-directory: ./citron
run: |
VERSION=$(tr -d '[:space:]' < externals/ffmpeg/ffmpeg/RELEASE)
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Cache built FFmpeg
uses: actions/cache@v4
with:
path: citron/build/use-nopgo/externals/ffmpeg-${{ steps.ffmpeg-ver.outputs.VERSION }}
key: clangtron-ffmpeg-built-stable-${{ runner.os }}-${{ steps.ffmpeg-ver.outputs.VERSION }}-${{ hashFiles('citron/build-clangtron-windows.sh') }}
- name: Cache Qt (Clangtron)
uses: actions/cache@v4
with:
path: |
citron/build/use-nopgo/externals/qt
citron/build/use-nopgo/externals/qt-host
key: clangtron-qt-6.9.3-stable-${{ runner.os }}-${{ hashFiles('citron/build-clangtron-windows.sh') }}
- name: Skip BOLT build (not needed for --pgo none)
run: |
echo '#!/bin/bash' | sudo tee /usr/local/bin/llvm-bolt-21
echo '#!/bin/bash' | sudo tee /usr/local/bin/merge-fdata-21
sudo chmod +x /usr/local/bin/llvm-bolt-21
sudo chmod +x /usr/local/bin/merge-fdata-21
- name: Setup Clangtron Build Environment
working-directory: ./citron
run: |
chmod +x build-clangtron-windows.sh
./build-clangtron-windows.sh setup
echo "${GITHUB_WORKSPACE}/citron/build/llvm-mingw/bin" >> "$GITHUB_PATH"
- name: Build Citron (Clangtron LTO)
working-directory: ./citron
run: |
export CITRON_BUILD_TYPE=Stable
./build-clangtron-windows.sh use --pgo none --lto full
- name: Package Windows Build (Clangtron)
run: |
mkdir -p dist
BIN_DIR="./citron/build/use-nopgo/bin"
if [ ! -d "$BIN_DIR" ]; then
echo "::error::Build output not found at $BIN_DIR"
exit 1
fi
cd "$BIN_DIR"
zip -r "${GITHUB_WORKSPACE}/dist/Citron-windows-stable-${{ steps.version.outputs.VERSION }}-x64-clangtron.zip" .
- name: Upload Windows Build (Clangtron)
uses: actions/upload-artifact@v4
with:
name: Citron-Windows-Stable-Clangtron-x64
path: "dist/*.zip"
# ===========================================================================
# RELEASE - Android
# ===========================================================================
@@ -1023,7 +1145,7 @@ jobs:
release-windows:
if: ${{ github.ref_name == 'main' }}
name: "Release Windows Stable"
needs: [check-version, build-windows]
needs: [check-version, build-windows, build-clangtron]
permissions:
contents: write
runs-on: ubuntu-latest
@@ -1033,7 +1155,8 @@ jobs:
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: Citron-Windows-Stable-x64
pattern: Citron-Windows-Stable-*
merge-multiple: true
path: .
- name: Get Version from Filename
shell: bash
@@ -1062,7 +1185,7 @@ jobs:
**Build Details:**
- Platform: Windows (x64)
- Toolchain: MinGW-w64 (MSYS2 UCRT64)
- Toolchains: MinGW-w64 (MSYS2 UCRT64) + Clangtron (Clang LTO cross-compiled)
- Build Type: Stable
- Date: ${{ env.BUILD_DATE }}
- name: Update LATEST_VERSION
@@ -1084,5 +1207,5 @@ jobs:
WEBHOOK_URL="${{ secrets.DISCORD_WEBHOOK }}"
if [ -z "$WEBHOOK_URL" ]; then echo "DISCORD_WEBHOOK is not set; skipping."; exit 0; fi
curl -H "Content-Type: application/json" \
-d "{\"content\":\"๐ŸชŸ **New Windows Stable Release!**\n\n๐Ÿ“ฆ **Version:** \`${{ env.APP_VERSION }}\`\n๐Ÿ“… **Date:** ${DATE}\n๐Ÿ”ง **Toolchain:** MinGW-w64 (UCRT64)\n๐Ÿ”— **Download:** $DOWNLOAD_URL\"}" \
-d "{\"content\":\"๐ŸชŸ **New Windows Stable Release!**\n\n๐Ÿ“ฆ **Version:** \`${{ env.APP_VERSION }}\`\n๐Ÿ“… **Date:** ${DATE}\n๐Ÿ”ง **Toolchains:** MinGW-w64 (UCRT64) + Clangtron (Clang LTO)\n๐Ÿ”— **Download:** $DOWNLOAD_URL\"}" \
"$WEBHOOK_URL"
+1 -1
View File
@@ -1 +1 @@
b57795d
73993e5
+1 -1
View File
@@ -1 +1 @@
b57795d31
73993e5f3