mirror of
https://github.com/citron-neo/CI.git
synced 2026-07-05 15:21:59 -07:00
Compare commits
205
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55ddf574e8 | ||
|
|
f306685201 | ||
|
|
bc07c8e6da | ||
|
|
2bd8b164ab | ||
|
|
d17f84c0f9 | ||
|
|
46e01b49cc | ||
|
|
e064d15557 | ||
|
|
3f2efad127 | ||
|
|
d1eb8376ac | ||
|
|
93125444bf | ||
|
|
8fa1a1f979 | ||
|
|
2831852d93 | ||
|
|
8fb0d15334 | ||
|
|
beb44f3281 | ||
|
|
350f6f2755 | ||
|
|
da0e74d875 | ||
|
|
782b68f541 | ||
|
|
4c443effb6 | ||
|
|
33401e2584 | ||
|
|
7536fe6717 | ||
|
|
2c144827a6 | ||
|
|
d8b4d717d9 | ||
|
|
7e635568ea | ||
|
|
b7141875a1 | ||
|
|
3d695038ce | ||
|
|
1dd7de390d | ||
|
|
c1d75d2859 | ||
|
|
0bac88677a | ||
|
|
832b3b5871 | ||
|
|
6205477d73 | ||
|
|
7552e53a1c | ||
|
|
8fcb6b54eb | ||
|
|
2cf0e35199 | ||
|
|
4a9c70b2b2 | ||
|
|
8376913e04 | ||
|
|
5ccb3d2c56 | ||
|
|
922258e2f5 | ||
|
|
acc30b07fa | ||
|
|
3ab9cae671 | ||
|
|
546e246cdc | ||
|
|
d64b16040c | ||
|
|
ddd414e289 | ||
|
|
2843c3e756 | ||
|
|
3542ed262f | ||
|
|
fcc721ed73 | ||
|
|
b94fc3b8cf | ||
|
|
65faa59a67 | ||
|
|
2fc95bdbe7 | ||
|
|
9b1698cfd7 | ||
|
|
bdc2c7e206 | ||
|
|
14ca21772c | ||
|
|
286bca765f | ||
|
|
718107d6cc | ||
|
|
3661901b95 | ||
|
|
e1717d7ec3 | ||
|
|
b2e4f581d3 | ||
|
|
35138e6506 | ||
|
|
e77f5f3d6c | ||
|
|
d5f7b2a0f5 | ||
|
|
97446e1b7b | ||
|
|
35eccd1637 | ||
|
|
2c0e0a3262 | ||
|
|
0266b1a4d0 | ||
|
|
c5afb61df4 | ||
|
|
e4135afbf8 | ||
|
|
06922e0e14 | ||
|
|
20e784f943 | ||
|
|
b82a439938 | ||
|
|
065ea1d717 | ||
|
|
e1ca884e44 | ||
|
|
8a616c2de8 | ||
|
|
19a590fd09 | ||
|
|
9efb04ca27 | ||
|
|
af56667e41 | ||
|
|
08f3f29b89 | ||
|
|
5e09b8dc0f | ||
|
|
433f010228 | ||
|
|
a4c5a4b2fe | ||
|
|
e7523e69ea | ||
|
|
ae32f5184b | ||
|
|
91302faa01 | ||
|
|
5408e498a2 | ||
|
|
47e4d8083a | ||
|
|
7e776a1125 | ||
|
|
148b6a2e9a | ||
|
|
96412ddb42 | ||
|
|
03c5de382d | ||
|
|
9c7c15609e | ||
|
|
4741c828eb | ||
|
|
27b181565e | ||
|
|
19b014c262 | ||
|
|
feac6825d4 | ||
|
|
6f7155deb9 | ||
|
|
ad8df019a9 | ||
|
|
4c032dca46 | ||
|
|
ea03b02fa4 | ||
|
|
246b47937c | ||
|
|
faba4dd7d6 | ||
|
|
8a109b8ae9 | ||
|
|
8bd4db1434 | ||
|
|
481d3f9918 | ||
|
|
96985c7618 | ||
|
|
6dfda9512e | ||
|
|
df387b93a4 | ||
|
|
f01f374aa9 | ||
|
|
dc5deba3de | ||
|
|
2481fc29d7 | ||
|
|
d1009d2413 | ||
|
|
0bcd36374a | ||
|
|
14fd113971 | ||
|
|
7881a3e238 | ||
|
|
69e466141e | ||
|
|
d66cb1df26 | ||
|
|
18912ed350 | ||
|
|
4817f74efa | ||
|
|
a5657393e9 | ||
|
|
c4f5bd84aa | ||
|
|
9dd04b9215 | ||
|
|
fce89fc9ef | ||
|
|
65873e20cc | ||
|
|
cf2a6c7b64 | ||
|
|
1410686bc9 | ||
|
|
05947e4eee | ||
|
|
89d4c0ebab | ||
|
|
a490912c28 | ||
|
|
8c5360c1a6 | ||
|
|
ccda811eaf | ||
|
|
8596d2d09b | ||
|
|
f24c503e39 | ||
|
|
715aec416f | ||
|
|
358079e6b3 | ||
|
|
9845e7dea1 | ||
|
|
943bc3ffa2 | ||
|
|
a22884897d | ||
|
|
d2021e7306 | ||
|
|
d301f31b68 | ||
|
|
0de1505e84 | ||
|
|
17e24f428e | ||
|
|
1e914abe8b | ||
|
|
85d860e931 | ||
|
|
23cb3574ad | ||
|
|
e99ae4cfa7 | ||
|
|
f0c64e6001 | ||
|
|
9ac446b614 | ||
|
|
e3de2d82a5 | ||
|
|
b34a39a9dc | ||
|
|
b28dca2488 | ||
|
|
8e2af78a7e | ||
|
|
5a41338348 | ||
|
|
f3f829008e | ||
|
|
551b1243ad | ||
|
|
0ed6bc4642 | ||
|
|
dcc681efbf | ||
|
|
454b18ed32 | ||
|
|
596d5fc9d5 | ||
|
|
c74265fc72 | ||
|
|
e78b67ccea | ||
|
|
8d40e6cb07 | ||
|
|
f1bf64e2ba | ||
|
|
cb2f5006f2 | ||
|
|
45ca1ed808 | ||
|
|
0de320e62f | ||
|
|
3a36f50a1a | ||
|
|
ab388bfe33 | ||
|
|
b33b9beb58 | ||
|
|
6c80e374a9 | ||
|
|
38581df5c4 | ||
|
|
e9868f039c | ||
|
|
3b52cc119d | ||
|
|
b8bd165dab | ||
|
|
82f1ce77e5 | ||
|
|
8d9690451a | ||
|
|
3d1f689652 | ||
|
|
40759da244 | ||
|
|
0aff1795fb | ||
|
|
00e580fc28 | ||
|
|
e9024d95f2 | ||
|
|
7095c50c30 | ||
|
|
9255cb05f5 | ||
|
|
a6f7aa9564 | ||
|
|
347e428e88 | ||
|
|
5059c1cfda | ||
|
|
af03253df4 | ||
|
|
4ddfdaa1ca | ||
|
|
e72bcabf50 | ||
|
|
e15e63ba7c | ||
|
|
79bb987046 | ||
|
|
518f8f0d21 | ||
|
|
ce1f9e9f41 | ||
|
|
a322bd15bd | ||
|
|
6a7ef097a6 | ||
|
|
aeedbca292 | ||
|
|
34c0116e3c | ||
|
|
b76362b4b5 | ||
|
|
8bdfbed52a | ||
|
|
048fafd2c9 | ||
|
|
14611d241e | ||
|
|
f70de2061a | ||
|
|
4712bfda7f | ||
|
|
ba1b08d38e | ||
|
|
db86d502a6 | ||
|
|
5210fe3474 | ||
|
|
167e857d2d | ||
|
|
12c4a729b6 | ||
|
|
8550f02355 |
@@ -2,8 +2,6 @@ name: Build Citron (Android)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 12 * * *"
|
||||
|
||||
jobs:
|
||||
check-version:
|
||||
@@ -181,7 +179,7 @@ jobs:
|
||||
export ANDROID_NDK="$ANDROID_NDK_HOME"
|
||||
chmod +x gradlew
|
||||
./gradlew assembleMainlineRelease \
|
||||
-Pcmake.args="-DENABLE_QT=OFF -DENABLE_SDL2=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_OPENSSL=OFF -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_USE_BUNDLED_FFMPEG=ON -DCITRON_ENABLE_LTO=ON -DCITRON_BUILD_TYPE=Release"
|
||||
-Pcmake.args="-DENABLE_QT=OFF -DENABLE_SDL2=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_OPENSSL=ON -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_USE_BUNDLED_FFMPEG=ON -DCITRON_ENABLE_LTO=ON -DCITRON_BUILD_TYPE=Release"
|
||||
|
||||
- name: Upload APK artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -340,7 +338,7 @@ jobs:
|
||||
export ANDROID_NDK="$ANDROID_NDK_HOME"
|
||||
chmod +x ./gradlew
|
||||
./gradlew assembleMainlineRelease \
|
||||
-Pcmake.args="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DENABLE_UPDATE_CHECKER=ON -DENABLE_QT=OFF -DENABLE_SDL2=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_OPENSSL=OFF -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_USE_BUNDLED_FFMPEG=ON -DCITRON_ENABLE_LTO=ON -DCITRON_BUILD_TYPE=Release"
|
||||
-Pcmake.args="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DENABLE_UPDATE_CHECKER=ON -DENABLE_QT=OFF -DENABLE_SDL2=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_OPENSSL=ON -DCITRON_USE_BUNDLED_VCPKG=ON -DCITRON_USE_BUNDLED_FFMPEG=ON -DCITRON_ENABLE_LTO=ON -DCITRON_BUILD_TYPE=Release"
|
||||
|
||||
APK_PATH=$(find app/build/outputs/apk -type f -name "*.apk" | head -n 1)
|
||||
if [ -z "$APK_PATH" ]; then
|
||||
|
||||
@@ -5,8 +5,6 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 12 * * *"
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -5,8 +5,6 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 14 * * *"
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
|
||||
Regular → Executable
+55
-274
@@ -5,8 +5,6 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 12 * * *"
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
@@ -55,54 +53,23 @@ jobs:
|
||||
echo "should_build=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build-mingw:
|
||||
name: "Citron Build (Windows MinGW - x64)"
|
||||
|
||||
|
||||
build-clangtron:
|
||||
name: "Citron Build (Windows Clangtron - x64)"
|
||||
needs: [check-version]
|
||||
if: needs.check-version.outputs.should_build == 'true'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 180
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 240
|
||||
env:
|
||||
CPM_SOURCE_CACHE: /home/runner/.cache/cpm
|
||||
|
||||
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 (MinGW)
|
||||
- name: Clone Citron Source (Clangtron)
|
||||
run: |
|
||||
ATTEMPT=0
|
||||
MAX_ATTEMPTS=999
|
||||
@@ -112,7 +79,7 @@ jobs:
|
||||
|
||||
rm -rf citron
|
||||
|
||||
if git clone --recursive "https://github.com/citron-neo/emulator.git" citron; then
|
||||
if git clone "https://github.com/citron-neo/emulator.git" citron; then
|
||||
echo "Clone successful on attempt $ATTEMPT."
|
||||
break
|
||||
fi
|
||||
@@ -126,16 +93,21 @@ jobs:
|
||||
sleep 15
|
||||
done
|
||||
|
||||
- name: Cache build directory (MinGW)
|
||||
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: Init required submodules
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
echo "CPM manages all dependencies — no submodules needed for Clangtron"
|
||||
|
||||
- name: Get Version (MinGW)
|
||||
- name: Cache CPM and Toolchain (Clangtron)
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /home/runner/.cache/cpm
|
||||
key: clangtron-cache-${{ runner.os }}-${{ hashFiles('citron/CMakeModules/dependencies.cmake', 'citron/build-clangtron-windows.sh') }}
|
||||
restore-keys: |
|
||||
clangtron-cache-${{ runner.os }}-
|
||||
|
||||
|
||||
- name: Get Version (Clangtron)
|
||||
id: version
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
@@ -143,238 +115,48 @@ jobs:
|
||||
VERSION=$(git rev-parse --short HEAD)
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Configure CMake (MinGW)
|
||||
- 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: |
|
||||
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=Release \
|
||||
-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
|
||||
chmod +x build-clangtron-windows.sh
|
||||
./build-clangtron-windows.sh setup
|
||||
echo "${HOME}/.cache/cpm/llvm-mingw/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build Citron (MinGW)
|
||||
working-directory: ./citron
|
||||
run: cmake --build build --config Release -j$(nproc)
|
||||
|
||||
- name: Collect runtime DLL dependencies (MinGW)
|
||||
- name: Build Citron (Clangtron LTO)
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
set -e
|
||||
BIN_DIR="./build/bin"
|
||||
if [ -d "$BIN_DIR/Release" ]; then
|
||||
BIN_DIR="$BIN_DIR/Release"
|
||||
fi
|
||||
export CITRON_BUILD_TYPE=Release
|
||||
./build-clangtron-windows.sh use --pgo none --lto full
|
||||
|
||||
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"
|
||||
- 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" .
|
||||
|
||||
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
|
||||
run: |
|
||||
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" }
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
# 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
|
||||
|
||||
- name: Upload Windows Build (MinGW)
|
||||
- name: Upload Windows Build (Clangtron)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Citron-Windows-Nightly-Mingw-x64
|
||||
path: "dist/*.zip"
|
||||
|
||||
build-msvc:
|
||||
name: "Citron Build (Windows MSVC - x64)"
|
||||
needs: [check-version]
|
||||
if: needs.check-version.outputs.should_build == 'true'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 180
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Vulkan SDK
|
||||
shell: pwsh
|
||||
run: |
|
||||
$vulkan_sdk_url = "https://sdk.lunarg.com/sdk/download/1.3.283.0/windows/VulkanSDK-1.3.283.0-Installer.exe"
|
||||
Invoke-WebRequest -Uri $vulkan_sdk_url -OutFile VulkanSDK-Installer.exe
|
||||
Start-Process -FilePath ".\VulkanSDK-Installer.exe" -ArgumentList "--accept-licenses", "--default-answer", "--confirm-command", "install" -Wait
|
||||
echo "C:\VulkanSDK\1.3.283.0\Bin" | Out-File -FilePath $env:GITHUB_PATH -Append
|
||||
|
||||
- name: Clone Citron Source (MSVC)
|
||||
shell: bash
|
||||
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 vcpkg and Qt dependencies (MSVC)
|
||||
uses: actions/cache@v4
|
||||
id: cache-vcpkg
|
||||
with:
|
||||
path: |
|
||||
./citron/build
|
||||
~/.vcpkg/archives
|
||||
${{ env.LOCALAPPDATA }}\vcpkg\archives
|
||||
key: vcpkg-qt-cache-x64-${{ runner.os }}-${{ hashFiles('citron/vcpkg.json') }}-${{ hashFiles('citron/externals/vcpkg/.git/HEAD') }}
|
||||
restore-keys: |
|
||||
vcpkg-qt-cache-x64-${{ runner.os }}-${{ hashFiles('citron/vcpkg.json') }}-
|
||||
|
||||
- name: Get Version (MSVC)
|
||||
id: version
|
||||
working-directory: ./citron
|
||||
shell: bash
|
||||
run: |
|
||||
git fetch --tags
|
||||
VERSION=$(git rev-parse --short HEAD)
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Configure CMake (MSVC)
|
||||
working-directory: ./citron
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake -B build -S . -G "Visual Studio 17 2022" -A x64 ^
|
||||
-DCITRON_USE_BUNDLED_VCPKG=ON ^
|
||||
-DCITRON_BUILD_TYPE=Release ^
|
||||
-DCITRON_ENABLE_LTO=ON ^
|
||||
-DCITRON_USE_BUNDLED_QT=ON ^
|
||||
-DENABLE_QT6=ON ^
|
||||
-DCITRON_TESTS=OFF ^
|
||||
-DUSE_DISCORD_PRESENCE=ON ^
|
||||
-DENABLE_WEB_SERVICE=ON ^
|
||||
-DENABLE_OPENSSL=ON ^
|
||||
-DCITRON_USE_AUTO_UPDATER=ON ^
|
||||
-DCITRON_ENABLE_LIBARCHIVE=ON
|
||||
|
||||
- name: Build Citron (MSVC)
|
||||
working-directory: ./citron
|
||||
shell: cmd
|
||||
run: cmake --build build --config Release --parallel
|
||||
|
||||
- name: Package Windows Build (MSVC)
|
||||
shell: pwsh
|
||||
run: |
|
||||
mkdir dist
|
||||
mkdir temp_package
|
||||
Get-ChildItem ".\citron\build\bin\Release\" -Recurse | Where-Object { $_.Extension -ne ".pdb" } | ForEach-Object {
|
||||
$relativePath = $_.FullName.Replace((Resolve-Path ".\citron\build\bin\Release\").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-msvc.zip"
|
||||
Remove-Item ".\temp_package" -Recurse -Force
|
||||
|
||||
- name: Upload Windows Build (MSVC)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Citron-Windows-Nightly-MSVC-x64
|
||||
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-clangtron]
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
@@ -390,9 +172,9 @@ jobs:
|
||||
- name: Get Version from Filename
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME=$(basename "$(ls ./release-artifacts/Citron-windows-nightly-*-x64-mingw.zip)")
|
||||
FILENAME=$(basename "$(ls ./release-artifacts/Citron-windows-nightly-*-x64-clangtron.zip)")
|
||||
VERSION=${FILENAME#Citron-windows-nightly-}
|
||||
VERSION=${VERSION%-x64-mingw.zip}
|
||||
VERSION=${VERSION%-x64-clangtron.zip}
|
||||
echo "APP_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
- name: Delete Previous Release
|
||||
run: gh release delete "nightly-windows" --repo "${{ github.repository }}" --cleanup-tag -y || true
|
||||
@@ -407,8 +189,7 @@ jobs:
|
||||
tag_name: "nightly-windows"
|
||||
prerelease: false
|
||||
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 +197,7 @@ jobs:
|
||||
|
||||
**Build Details:**
|
||||
- Platform: Windows (x64)
|
||||
- Toolchains: MinGW-w64 (MSYS2 UCRT64) + MSVC (Visual Studio 2022)
|
||||
- Toolchain: Clangtron (Clang LTO cross-compiled from Linux)
|
||||
- Build Type: Release
|
||||
- Date: ${{ env.BUILD_DATE }}
|
||||
- name: Update LATEST_VERSION
|
||||
@@ -442,5 +223,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 Build Available!**\n\n📦 **Version:** \`${{ env.APP_VERSION }}\`\n📅 **Date:** ${DATE}\n🔧 **Toolchain:** Clangtron (Clang LTO)\n🔗 **Download:** $DOWNLOAD_URL\"}" \
|
||||
"$WEBHOOK_URL"
|
||||
|
||||
@@ -645,85 +645,63 @@ jobs:
|
||||
name: Citron-macOS-Nightly
|
||||
path: "dist/*.dmg"
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# WINDOWS (MinGW)
|
||||
# WINDOWS (Clangtron)
|
||||
# ===========================================================================
|
||||
build-windows:
|
||||
name: "Citron Build (Windows MinGW - x64)"
|
||||
build-windows-clangtron:
|
||||
name: "Citron Build (Windows Clangtron - x64)"
|
||||
needs: [check-version]
|
||||
if: needs.check-version.outputs.should_build == 'true'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 180
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 240
|
||||
env:
|
||||
CPM_SOURCE_CACHE: /home/runner/.cache/cpm
|
||||
|
||||
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
|
||||
- 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
|
||||
|
||||
if git clone "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
|
||||
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: Init required submodules
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
echo "CPM manages all dependencies — no submodules needed for Clangtron"
|
||||
|
||||
- name: Get Nightly Version
|
||||
- name: Cache CPM and Toolchain (Clangtron)
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /home/runner/.cache/cpm
|
||||
key: clangtron-cache-${{ runner.os }}-${{ hashFiles('citron/CMakeModules/dependencies.cmake', 'citron/build-clangtron-windows.sh') }}
|
||||
restore-keys: |
|
||||
clangtron-cache-${{ runner.os }}-
|
||||
|
||||
|
||||
- name: Get Version (Clangtron)
|
||||
id: version
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
@@ -731,58 +709,42 @@ jobs:
|
||||
VERSION=$(git rev-parse --short HEAD)
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Configure CMake
|
||||
- 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: |
|
||||
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
|
||||
chmod +x build-clangtron-windows.sh
|
||||
./build-clangtron-windows.sh setup
|
||||
echo "${HOME}/.cache/cpm/llvm-mingw/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build Citron
|
||||
- name: Build Citron (Clangtron LTO)
|
||||
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
|
||||
export CITRON_BUILD_TYPE=Nightly
|
||||
./build-clangtron-windows.sh use --pgo none --lto full
|
||||
|
||||
- name: Upload Windows Build
|
||||
- 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-x64
|
||||
name: Citron-Windows-Nightly-Clangtron-x64
|
||||
path: "dist/*.zip"
|
||||
|
||||
# ===========================================================================
|
||||
@@ -1024,7 +986,7 @@ jobs:
|
||||
release-windows:
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
name: "Release Windows Nightly"
|
||||
needs: [check-version, build-windows]
|
||||
needs: [check-version, build-windows-clangtron]
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
@@ -1032,16 +994,18 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
- name: Download Windows artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: Citron-Windows-Nightly-x64
|
||||
pattern: Citron-Windows-Nightly-*
|
||||
merge-multiple: true
|
||||
path: .
|
||||
- name: Get Version from Filename
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME=$(ls Citron-windows-nightly-*-x64-mingw.zip)
|
||||
FILENAME=$(ls Citron-windows-nightly-*-x64-clangtron.zip)
|
||||
VERSION=${FILENAME#Citron-windows-nightly-}
|
||||
VERSION=${VERSION%-x64-mingw.zip}
|
||||
VERSION=${VERSION%-x64-clangtron.zip}
|
||||
echo "APP_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
- name: Delete Previous Release
|
||||
run: gh release delete "nightly-windows" --repo "${{ github.repository }}" --cleanup-tag -y || true
|
||||
@@ -1055,7 +1019,8 @@ jobs:
|
||||
name: "Continuous Build (Windows Nightly: ${{ env.APP_VERSION }})"
|
||||
tag_name: "nightly-windows"
|
||||
prerelease: false
|
||||
files: "*.zip"
|
||||
files: |
|
||||
*-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 }})
|
||||
|
||||
@@ -1063,7 +1028,7 @@ jobs:
|
||||
|
||||
**Build Details:**
|
||||
- Platform: Windows (x64)
|
||||
- Toolchain: MinGW-w64 (MSYS2 UCRT64)
|
||||
- Toolchain: Clangtron (Clang LTO cross-compiled from Linux)
|
||||
- Build Type: Nightly
|
||||
- Date: ${{ env.BUILD_DATE }}
|
||||
- name: Update LATEST_VERSION
|
||||
@@ -1085,5 +1050,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 Nightly Build!**\n\n📦 **Version:** \`${{ env.APP_VERSION }}\`\n📅 **Date:** ${DATE}\n🔧 **Toolchain:** MinGW-w64 (UCRT64)\n🔗 **Download:** $DOWNLOAD_URL\"}" \
|
||||
-d "{\"content\":\"🪟 **New Windows Nightly Build!**\n\n📦 **Version:** \`${{ env.APP_VERSION }}\`\n📅 **Date:** ${DATE}\n🔧 **Toolchain:** Clangtron (Clang LTO)\n🔗 **Download:** $DOWNLOAD_URL\"}" \
|
||||
"$WEBHOOK_URL"
|
||||
|
||||
@@ -644,85 +644,63 @@ jobs:
|
||||
name: Citron-macOS-Stable
|
||||
path: "dist/*.dmg"
|
||||
|
||||
|
||||
# ===========================================================================
|
||||
# WINDOWS (MinGW)
|
||||
# WINDOWS (Clangtron - Clang LTO cross-compiled from Ubuntu)
|
||||
# ===========================================================================
|
||||
build-windows:
|
||||
name: "Citron Build (Windows MinGW - x64)"
|
||||
build-windows-clangtron:
|
||||
name: "Citron Build (Windows Clangtron - x64)"
|
||||
needs: [check-version]
|
||||
if: needs.check-version.outputs.should_build == 'true'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 180
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 240
|
||||
env:
|
||||
CPM_SOURCE_CACHE: /home/runner/.cache/cpm
|
||||
|
||||
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
|
||||
- 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
|
||||
|
||||
if git clone "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
|
||||
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-stable-${{ runner.os }}-${{ hashFiles('citron/CMakeLists.txt') }}
|
||||
restore-keys: |
|
||||
mingw-build-stable-${{ runner.os }}-
|
||||
- name: Init required submodules
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
echo "CPM manages all dependencies — no submodules needed for Clangtron"
|
||||
|
||||
- name: Get Stable Version
|
||||
- name: Cache CPM and Toolchain (Clangtron)
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /home/runner/.cache/cpm
|
||||
key: clangtron-cache-stable-${{ runner.os }}-${{ hashFiles('citron/CMakeModules/dependencies.cmake', 'citron/build-clangtron-windows.sh') }}
|
||||
restore-keys: |
|
||||
clangtron-cache-stable-${{ runner.os }}-
|
||||
|
||||
|
||||
- name: Get Version (Clangtron)
|
||||
id: version
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
@@ -730,58 +708,42 @@ jobs:
|
||||
VERSION=$(git rev-parse --short HEAD)
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Configure CMake
|
||||
|
||||
- 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: |
|
||||
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=Stable \
|
||||
-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
|
||||
chmod +x build-clangtron-windows.sh
|
||||
./build-clangtron-windows.sh setup
|
||||
echo "${HOME}/.cache/cpm/llvm-mingw/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Build Citron
|
||||
- name: Build Citron (Clangtron LTO)
|
||||
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-stable-${{ steps.version.outputs.VERSION }}-x64-mingw.zip"
|
||||
Remove-Item ".\temp_package" -Recurse -Force
|
||||
export CITRON_BUILD_TYPE=Stable
|
||||
./build-clangtron-windows.sh use --pgo none --lto full
|
||||
|
||||
- name: Upload Windows Build
|
||||
- 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-x64
|
||||
name: Citron-Windows-Stable-Clangtron-x64
|
||||
path: "dist/*.zip"
|
||||
|
||||
# ===========================================================================
|
||||
@@ -1023,7 +985,7 @@ jobs:
|
||||
release-windows:
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
name: "Release Windows Stable"
|
||||
needs: [check-version, build-windows]
|
||||
needs: [check-version, build-windows-clangtron]
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
@@ -1031,16 +993,18 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
- name: Download Windows artifacts
|
||||
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
|
||||
run: |
|
||||
FILENAME=$(ls Citron-windows-stable-*-x64-mingw.zip)
|
||||
FILENAME=$(ls Citron-windows-stable-*-x64-clangtron.zip)
|
||||
VERSION=${FILENAME#Citron-windows-stable-}
|
||||
VERSION=${VERSION%-x64-mingw.zip}
|
||||
VERSION=${VERSION%-x64-clangtron.zip}
|
||||
echo "APP_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
- name: Delete Previous Release
|
||||
run: gh release delete "stable-windows" --repo "${{ github.repository }}" --cleanup-tag -y || true
|
||||
@@ -1054,7 +1018,8 @@ jobs:
|
||||
name: "Stable Release (Windows Stable: ${{ env.APP_VERSION }})"
|
||||
tag_name: "stable-windows"
|
||||
prerelease: false
|
||||
files: "*.zip"
|
||||
files: |
|
||||
*-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 }})
|
||||
|
||||
@@ -1062,7 +1027,7 @@ jobs:
|
||||
|
||||
**Build Details:**
|
||||
- Platform: Windows (x64)
|
||||
- Toolchain: MinGW-w64 (MSYS2 UCRT64)
|
||||
- Toolchain: Clangtron (Clang LTO cross-compiled from Linux)
|
||||
- Build Type: Stable
|
||||
- Date: ${{ env.BUILD_DATE }}
|
||||
- name: Update LATEST_VERSION
|
||||
@@ -1084,5 +1049,6 @@ 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🔧 **Toolchain:** Clangtron (Clang LTO)\n🔗 **Download:** $DOWNLOAD_URL\"}" \
|
||||
"$WEBHOOK_URL"
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
b57795d
|
||||
ca6d997
|
||||
|
||||
@@ -1 +1 @@
|
||||
b57795d31
|
||||
ca6d997c1
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
# 🍋 The Official Citron-CI
|
||||
|
||||
[](https://github.com/citron-neo/CI/releases/latest)
|
||||
[](https://github.com/citron-neo/CI/actions/workflows/build-android.yml)
|
||||
[](https://github.com/citron-neo/CI/actions/workflows/build-windows.yml)
|
||||
[](https://github.com/citron-neo/CI/actions/workflows/build-linux.yml)
|
||||
[](https://github.com/citron-neo/CI/actions/workflows/build-macos.yml)
|
||||
[](https://github.com/citron-neo/CI/actions/workflows/build_nightly.yml)
|
||||
[](https://github.com/citron-neo/CI/actions/workflows/build_stable.yml)
|
||||
|
||||
## Star History
|
||||
|
||||
|
||||
+8
-5
@@ -2,6 +2,7 @@
|
||||
|
||||
set -ex
|
||||
ARCH="$(uname -m)"
|
||||
EXTRA_PACKAGES="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/get-debloated-pkgs.sh"
|
||||
|
||||
pacman -Syu --noconfirm --needed \
|
||||
base-devel \
|
||||
@@ -13,34 +14,32 @@ pacman -Syu --noconfirm --needed \
|
||||
curl \
|
||||
enet \
|
||||
fmt \
|
||||
ffmpeg \
|
||||
gamemode \
|
||||
gcc \
|
||||
git \
|
||||
glslang \
|
||||
glu \
|
||||
hidapi \
|
||||
libdecor \
|
||||
libvpx \
|
||||
libxi \
|
||||
libxkbcommon-x11 \
|
||||
libxss \
|
||||
lld \
|
||||
llvm \
|
||||
mbedtls2 \
|
||||
rapidjson \
|
||||
mesa \
|
||||
nasm \
|
||||
ninja \
|
||||
nlohmann-json \
|
||||
numactl \
|
||||
openal \
|
||||
patchelf \
|
||||
pulseaudio \
|
||||
pulseaudio-alsa \
|
||||
qt6-base \
|
||||
qt6-networkauth \
|
||||
qt6-multimedia \
|
||||
qt6-svg \
|
||||
qt6-tools \
|
||||
qt6-wayland \
|
||||
qt6-translations \
|
||||
sdl2 \
|
||||
unzip \
|
||||
@@ -54,3 +53,7 @@ pacman -Syu --noconfirm --needed \
|
||||
xorg-server-xvfb \
|
||||
zip \
|
||||
zsync
|
||||
|
||||
wget --retry-connrefused --tries=30 "$EXTRA_PACKAGES" -O ./get-debloated-pkgs.sh
|
||||
chmod +x ./get-debloated-pkgs.sh
|
||||
./get-debloated-pkgs.sh --add-mesa ffmpeg-mini qt6-base-mini libxml2-mini opus-mini icu-mini
|
||||
|
||||
+7
-49
@@ -10,63 +10,21 @@ fi
|
||||
|
||||
# Construct unique names for the AppImage and tarball based on the build matrix.
|
||||
OUTNAME_BASE="citron_nightly-${APP_VERSION}-linux-${ARCH}${ARCH_SUFFIX}"
|
||||
export OUTNAME_APPIMAGE="${OUTNAME_BASE}.AppImage"
|
||||
export OUTNAME_TAR="${OUTNAME_BASE}.tar.zst"
|
||||
|
||||
URUNTIME="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh"
|
||||
SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh"
|
||||
|
||||
export OUTNAME="${OUTNAME_BASE}.AppImage"
|
||||
export OUTPATH="$PWD"/dist
|
||||
export DESKTOP=/usr/share/applications/org.citron_emu.citron.desktop
|
||||
export ICON=/usr/share/icons/hicolor/scalable/apps/org.citron_emu.citron.svg
|
||||
export DEPLOY_OPENGL=1
|
||||
export DEPLOY_VULKAN=1
|
||||
export DEPLOY_PIPEWIRE=1
|
||||
|
||||
wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun
|
||||
chmod +x ./quick-sharun
|
||||
|
||||
./quick-sharun /usr/bin/citron* /usr/lib/libgamemode.so* /usr/lib/libpulse.so*
|
||||
|
||||
echo "Copying Qt translation files..."
|
||||
|
||||
mkdir -p ./AppDir/usr/share/qt6
|
||||
|
||||
cp -r /usr/share/qt6/translations ./AppDir/usr/share/qt6/
|
||||
|
||||
if [ "$DEVEL" = 'true' ]; then
|
||||
sed -i 's|Name=citron|Name=citron nightly|' ./AppDir/*.desktop
|
||||
export DEVEL_RELEASE=1
|
||||
fi
|
||||
|
||||
echo 'SHARUN_ALLOW_SYS_VK_ICD=1' > ./AppDir/.env
|
||||
|
||||
|
||||
echo "Creating tar.zst archive..."
|
||||
|
||||
(cd AppDir && tar -c --zstd -f ../"$OUTNAME_TAR" usr)
|
||||
echo "Successfully created $OUTNAME_TAR"
|
||||
|
||||
|
||||
wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage
|
||||
chmod +x ./uruntime2appimage
|
||||
|
||||
# Run the AppImage creation tool and capture its output to a variable.
|
||||
BUILD_OUTPUT=$(./uruntime2appimage)
|
||||
|
||||
# Print the captured output to the logs for debugging purposes.
|
||||
echo "$BUILD_OUTPUT"
|
||||
|
||||
# Automatically find the AppImage path from the output, strip any ANSI color codes,
|
||||
# and then use basename to get just the filename.
|
||||
SOURCE_APPIMAGE=$(basename "$(echo "$BUILD_OUTPUT" | grep "All done! AppImage at:" | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g')")
|
||||
|
||||
echo "Discovered source AppImage: ${SOURCE_APPIMAGE}"
|
||||
echo "Renaming to final suffixed name: ${OUTNAME_APPIMAGE}..."
|
||||
|
||||
# Now, use the dynamically discovered and cleaned filename for the move operations.
|
||||
mv -v "${SOURCE_APPIMAGE}" "${OUTNAME_APPIMAGE}"
|
||||
mv -v "${SOURCE_APPIMAGE}.zsync" "${OUTNAME_APPIMAGE}.zsync"
|
||||
|
||||
mkdir -p ./dist
|
||||
|
||||
mv -v ./*.AppImage* ./dist
|
||||
mv -v ./*.tar.zst ./dist
|
||||
wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun
|
||||
chmod +x ./quick-sharun
|
||||
./quick-sharun /usr/bin/citron* /usr/lib/libgamemode.so*
|
||||
./quick-sharun --make-appimage
|
||||
|
||||
Reference in New Issue
Block a user