mirror of
https://github.com/citron-neo/CI.git
synced 2026-07-05 15:21:59 -07:00
fix: Remove crons from separate jobs, ensure Nightly has Clangtron & update README for only Stable & Nightly .yml health
This commit is contained in:
@@ -2,8 +2,6 @@ name: Build Citron (Android)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 12 * * *"
|
||||
|
||||
jobs:
|
||||
check-version:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -5,8 +5,6 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 12 * * *"
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
@@ -55,278 +53,6 @@ jobs:
|
||||
echo "should_build=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build-mingw:
|
||||
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-openal
|
||||
mingw-w64-ucrt-x86_64-libusb
|
||||
git
|
||||
base-devel
|
||||
|
||||
- name: Clone Citron Source (MinGW)
|
||||
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 (MinGW)
|
||||
uses: actions/cache@v4
|
||||
id: cache-build
|
||||
with:
|
||||
path: ./citron/build
|
||||
key: mingw-build-${{ runner.os }}-${{ hashFiles('citron/CMakeLists.txt') }}-${{ hashFiles('.github/workflows/build-windows.yml') }}
|
||||
restore-keys: |
|
||||
mingw-build-${{ runner.os }}-
|
||||
|
||||
- name: Get Version (MinGW)
|
||||
id: version
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
git fetch --tags
|
||||
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: |
|
||||
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 \
|
||||
-DUSE_DISCORD_PRESENCE=OFF \
|
||||
-DCITRON_USE_AUTO_UPDATER=OFF \
|
||||
-DCITRON_USE_PRECOMPILED_HEADERS=ON \
|
||||
-DENABLE_LIBUSB=OFF
|
||||
|
||||
- name: Build Citron (MinGW)
|
||||
working-directory: ./citron
|
||||
run: cmake --build build --config Release -j$(nproc)
|
||||
|
||||
- name: Copy vcpkg runtime DLLs to bin (MinGW)
|
||||
working-directory: ./citron
|
||||
run: |
|
||||
# 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 "$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
|
||||
|
||||
|
||||
|
||||
- name: Package Windows Build (MinGW)
|
||||
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 (MinGW)
|
||||
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
|
||||
path: "dist/*.zip"
|
||||
|
||||
build-clangtron:
|
||||
name: "Citron Build (Windows Clangtron - x64)"
|
||||
@@ -450,7 +176,7 @@ jobs:
|
||||
release:
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
name: "Release"
|
||||
needs: [check-version, build-mingw, build-msvc, build-clangtron]
|
||||
needs: [check-version, build-clangtron]
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
@@ -460,15 +186,14 @@ jobs:
|
||||
- name: Download Windows artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: Citron-Windows-Nightly-*
|
||||
merge-multiple: true
|
||||
name: Citron-Windows-Nightly-Clangtron-x64
|
||||
path: ./release-artifacts
|
||||
- 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
|
||||
@@ -483,8 +208,6 @@ 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 }})
|
||||
@@ -493,7 +216,7 @@ jobs:
|
||||
|
||||
**Build Details:**
|
||||
- Platform: Windows (x64)
|
||||
- Toolchains: MinGW-w64 (MSYS2 UCRT64) + MSVC (Visual Studio 2022) + Clangtron (Clang LTO cross-compiled)
|
||||
- Toolchain: Clangtron (Clang LTO cross-compiled from Linux)
|
||||
- Build Type: Release
|
||||
- Date: ${{ env.BUILD_DATE }}
|
||||
- name: Update LATEST_VERSION
|
||||
@@ -519,5 +242,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 + Clangtron (Clang LTO)\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"
|
||||
|
||||
@@ -646,11 +646,126 @@ jobs:
|
||||
path: "dist/*.dmg"
|
||||
|
||||
# ===========================================================================
|
||||
# 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.
|
||||
# WINDOWS (Clangtron)
|
||||
# ===========================================================================
|
||||
build-windows-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=Nightly
|
||||
./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 - Android
|
||||
@@ -884,3 +999,73 @@ 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-clangtron]
|
||||
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-Clangtron-x64
|
||||
path: .
|
||||
- name: Get Version from Filename
|
||||
shell: bash
|
||||
run: |
|
||||
FILENAME=$(ls Citron-windows-nightly-*-x64-clangtron.zip)
|
||||
VERSION=${FILENAME#Citron-windows-nightly-}
|
||||
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
|
||||
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: Clangtron (Clang LTO cross-compiled from Linux)
|
||||
- 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:** Clangtron (Clang LTO)\n🔗 **Download:** $DOWNLOAD_URL\"}" \
|
||||
"$WEBHOOK_URL"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user