[CI] Cleanup

Use new archive input to rework artifacts.
Add runs-on and llvm_version inputs and ubuntu_base output to Lint so it can be passed to the Linux job.
Remove broken config input.
Upgrade Windows to VS2026.
This commit is contained in:
Margen67
2026-06-18 13:26:34 -07:00
parent 2771366b8b
commit dd858e234c
6 changed files with 150 additions and 204 deletions

View File

@@ -14,37 +14,36 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Validate commit messages - name: Validate commit messages
run: | run: |-
BASE="${{ github.event.pull_request.base.sha }}" BASE="${{ github.event.pull_request.base.sha }}"
HEAD="${{ github.event.pull_request.head.sha }}" HEAD="${{ github.event.pull_request.head.sha }}"
COMMITS=$(git log --format="%H %s" "${BASE}..${HEAD}" --) COMMITS=$(git log --format='%H %s' "${BASE}..$HEAD" --)
if [ -z "${COMMITS}" ]; then if [ -z "$COMMITS" ]; then
echo "No commits found in this PR." echo "No commits found in this PR."
exit 0 exit 0
fi fi
FAILED=0
while IFS= read -r LINE; do while IFS= read -r LINE; do
SHA="${LINE%% *}" SHA="${LINE%% *}"
MSG="${LINE#* }" MSG="${LINE#* }"
SHORT="${SHA::7}" SHORT="${SHA::7}"
if echo "${MSG}" | grep -qP '^\[.+?\]'; then if echo "$MSG" | grep -qP '^\[.+?\]'; then
echo "✅ ${SHORT}: ${MSG}" echo "✅ ${SHORT}: $MSG"
else else
echo "❌ ${SHORT}: ${MSG}" echo "❌ ${SHORT}: $MSG"
echo "::error::Commit ${SHORT} is missing a [Tag] prefix. Expected format: [Tag] Description (e.g. [CPU] Fix overflow in JIT)" echo "::error::Commit $SHORT is missing a [Tag] prefix. Expected format: [Tag] Description (e.g. [CPU] Fix overflow in JIT)"
FAILED=1 FAILED=1
fi fi
done <<< "${COMMITS}" done <<< "${COMMITS}"
echo "" echo
if [ "${FAILED}" -eq 1 ]; then if [ -n "$FAILED" ]; then
echo "::error::One or more commits are missing a [Tag] prefix." echo "::error::One or more commits are missing a [Tag] prefix."
echo "" echo
echo "Expected format: [Tag] Description" echo "Expected format: [Tag] Description"
echo "Examples: [CPU] <commit message>" echo "Examples: [CPU] <commit message>"
echo " [GPU] <commit message>" echo " [GPU] <commit message>"

View File

@@ -9,9 +9,8 @@ on:
type: string type: string
branch: branch:
description: 'Branch name used as release tag suffix (e.g. canary_experimental)' description: 'Branch name used as release tag suffix (e.g. canary_experimental)'
required: false
type: string
default: 'canary_experimental' default: 'canary_experimental'
type: string
jobs: jobs:
release: release:
@@ -21,8 +20,7 @@ jobs:
contents: write contents: write
steps: steps:
# Checkout for git log access — no submodules needed - name: Checkout repository for git log access
- name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -32,112 +30,57 @@ jobs:
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }} REPO: ${{ github.repository }}
run: | run: |-
FULL_SHA="${{ inputs.tag }}" FULL_SHA="${{ inputs.tag }}"
SHORT_SHA="${FULL_SHA::7}" SHORT_SHA="${FULL_SHA::7}"
BRANCH="${{ inputs.branch }}" BRANCH="${{ inputs.branch }}"
TAG_NAME="${SHORT_SHA}" TAG_NAME="$SHORT_SHA"
TITLE="${SHORT_SHA}_${BRANCH}" TITLE="${SHORT_SHA}_$BRANCH"
echo "tag_name=${TAG_NAME}" >> "$GITHUB_OUTPUT" echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "title=${TITLE}" >> "$GITHUB_OUTPUT" echo "title=$TITLE" >> $GITHUB_OUTPUT
PREV_TAG=$(gh release list \ PREV_TAG=$(gh release list \
--repo "${REPO}" \ --repo "$REPO" \
--limit 1 \ --limit 1 \
--json tagName \ --json tagName \
--jq '.[0].tagName' 2>/dev/null || echo "") --jq '.[0].tagName' 2>/dev/null || echo)
if [ -n "${PREV_TAG}" ]; then if [ -n "$PREV_TAG" ]; then
PREV_SHA=$(git rev-parse "${PREV_TAG}^{}" 2>/dev/null || \ PREV_SHA=$(git rev-parse "${PREV_TAG}^{}" 2>/dev/null || \
git rev-parse "${PREV_TAG}" 2>/dev/null || echo "") git rev-parse "${PREV_TAG}" 2>/dev/null || echo)
fi fi
if [ -n "${PREV_SHA}" ]; then if [ -n "$PREV_SHA" ]; then
COMMITS=$(git log --format="- %s (\`%h\`)" --abbrev=7 "${PREV_SHA}..${FULL_SHA}" --) COMMITS=$(git log --format='- %s (`%h`)' --abbrev=7 "${PREV_SHA}..$FULL_SHA" --)
COMPARE_URL="https://github.com/${REPO}/compare/${PREV_TAG}...${TAG_NAME}" COMPARE_URL="https://github.com/${REPO}/compare/${PREV_TAG}...$TAG_NAME"
else else
COMMITS=$(git log --format="- %s (\`%h\`)" --abbrev=7 -1 "${FULL_SHA}" --) COMMITS=$(git log --format='- %s (`%h`)' --abbrev=7 -1 "$FULL_SHA" --)
COMPARE_URL=""
fi fi
# Assemble body # Assemble body
{ {
echo "body<<RELEASE_BODY_EOF" echo "body<<RELEASE_BODY_EOF"
if [ -n "${COMMITS}" ]; then if [ -n "$COMMITS" ]; then
echo "### Changes" echo "### Changes"
echo "" echo
echo "${COMMITS}" echo "$COMMITS"
fi fi
if [ -n "${COMPARE_URL}" ]; then if [ -n "$COMPARE_URL" ]; then
echo "" echo
echo "**Full changelog**: ${COMPARE_URL}" echo "**Full changelog**: $COMPARE_URL"
fi fi
echo "RELEASE_BODY_EOF" echo "RELEASE_BODY_EOF"
} >> "$GITHUB_OUTPUT" } >> $GITHUB_OUTPUT
# --- Download artifacts only for platforms that succeeded --- - name: Download artifacts
- name: Download Windows artifacts
uses: actions/download-artifact@v8 uses: actions/download-artifact@v8
with: with:
name: xenia_canary_windows path: release_assets
path: artifacts/windows/xenia_canary merge-multiple: true
- name: Download Linux artifacts
uses: actions/download-artifact@v8
with:
name: xenia_canary_linux
path: artifacts/linux
# Uncomment when platforms are enabled:
# - name: Download macOS artifacts
# uses: actions/download-artifact@v8
# with:
# name: xenia_canary_macos
# path: artifacts/macos
# - name: Download Android artifacts
# uses: actions/download-artifact@v8
# with:
# name: xenia_canary_android
# path: artifacts/android
# --- Package everything into release assets ---
- name: Package release assets
run: |
mkdir -p release_assets
# Windows
if [ -d "artifacts/windows/xenia_canary" ]; then
cd artifacts/windows/xenia_canary
zip -r ../../../release_assets/xenia_canary_windows.zip . -x "*.pdb"
cd ../../..
fi
# Linux AppImage
if [ -f "artifacts/linux/xenia_canary_linux.AppImage" ]; then
cp artifacts/linux/xenia_canary_linux.AppImage release_assets/
fi
# macOS (uncomment when enabled)
# if [ -f "artifacts/macos/xenia_canary_macos.tar.gz" ]; then
# cp artifacts/macos/xenia_canary_macos.tar.gz release_assets/
# fi
# Android (uncomment when enabled)
# if [ -f "artifacts/android/xenia_canary_android.zip" ]; then
# cp artifacts/android/xenia_canary_android.zip release_assets/
# fi
echo "=== Release assets ==="
ls -lh release_assets/
# --- Create the release ---
- name: Create GitHub Release - name: Create GitHub Release
env: env:
@@ -147,25 +90,25 @@ jobs:
TITLE: ${{ steps.notes.outputs.title }} TITLE: ${{ steps.notes.outputs.title }}
BODY: ${{ steps.notes.outputs.body }} BODY: ${{ steps.notes.outputs.body }}
TARGET: ${{ inputs.tag }} TARGET: ${{ inputs.tag }}
run: | run: |-
echo "${BODY}" > release_notes.md echo "$BODY" > release_notes.md
echo "Creating release: ${TAG}" echo "Creating release: $TAG"
# Check if tag/release already exists (re-run safety) # Check if tag/release already exists (re-run safety)
if gh release view "${TAG}" --repo "${REPO}" --json tagName 2>/dev/null; then if gh release view "$TAG" --repo "$REPO" --json tagName 2>/dev/null; then
echo "Release ${TAG} exists, uploading new assets..." echo "Release $TAG exists, uploading new assets..."
gh release upload "${TAG}" \ gh release upload "$TAG" \
--repo "${REPO}" \ --repo "$REPO" \
--clobber \ --clobber \
release_assets/* release_assets/*
else else
gh release create "${TAG}" \ gh release create "$TAG" \
--repo "${REPO}" \ --repo "$REPO" \
--target "${{ inputs.tag }}" \ --target "${{ inputs.tag }}" \
--title "${TITLE}" \ --title "$TITLE" \
--notes-file release_notes.md \ --notes-file release_notes.md \
--latest \ --latest \
release_assets/* release_assets/*
fi fi
echo "✅ Release ${TAG} published" echo "✅ Release $TAG published"

View File

@@ -2,28 +2,39 @@ name: Lint
on: on:
workflow_call: workflow_call:
inputs:
runs-on:
description: 'Image'
required: true
type: string
llvm_version:
description: 'LLVM Version'
required: true
type: string
outputs:
runs-on:
value: ${{ inputs.runs-on }}
llvm_version:
value: ${{ inputs.llvm_version }}
ubuntu_base:
value: ${{ jobs.lint.outputs.ubuntu_base }}
jobs: jobs:
lint: lint:
name: Lint name: Lint
runs-on: ubuntu-24.04 runs-on: ${{ inputs.runs-on }}
outputs: outputs:
#LLVM_VERSION: ${{ steps.setup.outputs.LLVM_VERSION }} ubuntu_base: ${{ steps.setup.outputs.ubuntu_base }}
UBUNTU_BASE: ${{ steps.setup.outputs.UBUNTU_BASE }}
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Setup - name: Setup
id: setup id: setup
env: run: |-
LLVM_VERSION: 20
run: |
UBUNTU_BASE=$(lsb_release -cs) UBUNTU_BASE=$(lsb_release -cs)
#echo "LLVM_VERSION=$LLVM_VERSION" >> "$GITHUB_OUTPUT" echo "ubuntu_base=$UBUNTU_BASE" >> $GITHUB_OUTPUT
echo "UBUNTU_BASE=$UBUNTU_BASE" >> "$GITHUB_OUTPUT"
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo apt-add-repository "deb http://apt.llvm.org/${UBUNTU_BASE}/ llvm-toolchain-${UBUNTU_BASE}-$LLVM_VERSION main" sudo apt-add-repository "deb http://apt.llvm.org/${UBUNTU_BASE}/ llvm-toolchain-${UBUNTU_BASE}-${{ inputs.llvm_version }} main"
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install clang-format-$LLVM_VERSION sudo apt-get -y install clang-format-${{ inputs.llvm_version }}
- name: Lint - name: Lint
run: ./xenia-build.py lint --all run: ./xenia-build.py lint --all

View File

@@ -3,19 +3,23 @@ name: Linux Build
on: on:
workflow_call: workflow_call:
inputs: inputs:
config: runs-on:
description: 'Build configuration (Release)' description: 'Image'
required: false required: true
default: 'release' type: string
llvm_version:
description: 'LLVM Version'
required: true
type: string
ubuntu_base:
description: 'Ubuntu Base'
required: true
type: string type: string
jobs: jobs:
build: build:
name: Build name: Build
runs-on: ubuntu-24.04 runs-on: ${{ inputs.runs-on }}
env:
LLVM_VERSION: 20
UBUNTU_BASE: noble # We're running on ubuntu-24.04. Remember to change it after changing deploy env.
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -38,42 +42,41 @@ jobs:
key: ${{ runner.os }}-linuxdeploy-tools key: ${{ runner.os }}-linuxdeploy-tools
- name: Setup build environment - name: Setup build environment
run: | run: |-
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo apt-add-repository "deb http://apt.llvm.org/${{ env.UBUNTU_BASE }}/ llvm-toolchain-${{ env.UBUNTU_BASE }}-${{ env.LLVM_VERSION }} main" sudo apt-add-repository "deb http://apt.llvm.org/${{ inputs.ubuntu_base }}/ llvm-toolchain-${{ inputs.ubuntu_base }}-${{ inputs.llvm_version }} main"
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install mesa-vulkan-drivers valgrind libc++-dev libc++abi-dev libgtk-3-dev libsdl2-dev libvulkan-dev libx11-xcb-dev clang-${{ env.LLVM_VERSION }} lld-${{ env.LLVM_VERSION }} ninja-build cmake spirv-tools libfuse2 sudo apt-get -y install mesa-vulkan-drivers valgrind libc++-dev libc++abi-dev libgtk-3-dev libsdl2-dev libvulkan-dev libx11-xcb-dev clang-${{ inputs.llvm_version }} lld-${{ inputs.llvm_version }} spirv-tools libfuse2
# Pin LLVM tools to the correct version so system ar/ranlib/lld # Pin LLVM tools to the correct version so system ar/ranlib/lld
# don't use the older LLVM 17 gold plugin with clang-20 LTO bitcode # don't use the older LLVM 17 gold plugin with clang-20 LTO bitcode
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.LLVM_VERSION }} 200 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ inputs.llvm_version }} 200
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ env.LLVM_VERSION }} 200 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ inputs.llvm_version }} 200
sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-${{ env.LLVM_VERSION }} 200 sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-${{ inputs.llvm_version }} 200
sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-${{ env.LLVM_VERSION }} 200 sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-${{ inputs.llvm_version }} 200
sudo update-alternatives --install /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-${{ env.LLVM_VERSION }} 200 sudo update-alternatives --install /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-${{ inputs.llvm_version }} 200
sudo update-alternatives --install /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-${{ env.LLVM_VERSION }} 200 sudo update-alternatives --install /usr/bin/llvm-ranlib llvm-ranlib /usr/bin/llvm-ranlib-${{ inputs.llvm_version }} 200
sudo update-alternatives --install /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-${{ env.LLVM_VERSION }} 200 sudo update-alternatives --install /usr/bin/llvm-nm llvm-nm /usr/bin/llvm-nm-${{ inputs.llvm_version }} 200
# Download linuxdeploy tools if not cached # Download linuxdeploy tools if not cached
if [ '${{ steps.cache-linuxdeploy.outputs.cache-hit }}' != 'true' ]; then if [ ${{ steps.cache-linuxdeploy.outputs.cache-hit }} != true ]; then
mkdir -p ~/linuxdeploy mkdir -p ~/linuxdeploy
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O ~/linuxdeploy/linuxdeploy wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O ~/linuxdeploy/linuxdeploy
chmod +x ~/linuxdeploy/linuxdeploy chmod +x ~/linuxdeploy/linuxdeploy
fi fi
echo "$HOME/linuxdeploy" >> $GITHUB_PATH echo "${HOME}/linuxdeploy" >> $GITHUB_PATH
- name: Install Vulkan SDK - name: Install Vulkan SDK
run: | run: |-
# Install Vulkan SDK if [ ${{ steps.cache-vulkan-sdk-linux.outputs.cache-hit }} != true ]; then
if [ '${{ steps.cache-vulkan-sdk-linux.outputs.cache-hit }}' != 'true' ]; then
wget -qO vulkan-sdk.tar.xz https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.xz wget -qO vulkan-sdk.tar.xz https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.xz
mkdir -p ~/vulkan-sdk mkdir -p ~/vulkan-sdk
tar -xf vulkan-sdk.tar.xz -C ~/vulkan-sdk tar -xf vulkan-sdk.tar.xz -C ~/vulkan-sdk
fi fi
VULKAN_SDK_VERSION=$(ls ~/vulkan-sdk) VULKAN_SDK_VERSION=$(ls ~/vulkan-sdk)
echo "VULKAN_SDK=$HOME/vulkan-sdk/$VULKAN_SDK_VERSION/x86_64" >> $GITHUB_ENV echo "VULKAN_SDK=${HOME}/vulkan-sdk/${VULKAN_SDK_VERSION}/x86_64" >> $GITHUB_ENV
echo "$HOME/vulkan-sdk/$VULKAN_SDK_VERSION/x86_64/bin" >> $GITHUB_PATH echo "${HOME}/vulkan-sdk/${VULKAN_SDK_VERSION}/x86_64/bin" >> $GITHUB_PATH
# Verify shader tools are available # Verify shader tools are available
for tool in glslangValidator spirv-opt spirv-dis; do for tool in glslangValidator spirv-opt spirv-dis; do
@@ -81,21 +84,19 @@ jobs:
done done
- name: Download submodules - name: Download submodules
run: | run: |- # Exclude unneeded submodules
# Exclude not needed 3pp modules SUBMODULES=$(grep -oP '(?<=path = )(?!third_party\/DirectX(?:-Headers|ShaderCompiler)).+' .gitmodules)
EXCLUDE="DirectXShaderCompiler" git submodule update --init --depth=1 -j$(getconf _NPROCESSORS_ONLN) $SUBMODULES
SUBMODULES=$(grep -oP '(?<=path = ).+' .gitmodules | grep -vE "$EXCLUDE")
git submodule update --init --depth=1 -j$(nproc) $SUBMODULES
- name: Build Xenia - name: Build Xenia
env: env:
CC: clang-${{ env.LLVM_VERSION }} CC: clang-${{ inputs.llvm_version }}
CXX: clang++-${{ env.LLVM_VERSION }} CXX: clang++-${{ inputs.llvm_version }}
run: ./xenia-build.py build --config=Release run: ./xenia-build.py build --config=Release
- name: Prepare AppImage - name: Prepare AppImage
id: prepare_artifacts id: prepare_artifacts
run: | run: |-
binary=build/bin/Linux/Release/xenia_canary binary=build/bin/Linux/Release/xenia_canary
if [ $(stat -c%s $binary) -le 100000 ]; then if [ $(stat -c%s $binary) -le 100000 ]; then
echo "::error::Binary is too small." echo "::error::Binary is too small."
@@ -105,34 +106,21 @@ jobs:
# Set up AppDir structure # Set up AppDir structure
APPDIR=artifacts/xenia_canary APPDIR=artifacts/xenia_canary
mkdir -p $APPDIR/usr/bin mkdir -p ${APPDIR}/usr/bin
mkdir -p $APPDIR/usr/share/icons/hicolor/16x16/apps
mkdir -p $APPDIR/usr/share/icons/hicolor/32x32/apps
mkdir -p $APPDIR/usr/share/icons/hicolor/48x48/apps
mkdir -p $APPDIR/usr/share/icons/hicolor/64x64/apps
mkdir -p $APPDIR/usr/share/icons/hicolor/128x128/apps
mkdir -p $APPDIR/usr/share/icons/hicolor/256x256/apps
mkdir -p $APPDIR/usr/share/icons/hicolor/512x512/apps
mkdir -p $APPDIR/usr/share/icons/hicolor/1024x1024/apps
# Install icons # Install icons
cp assets/icon/16.png $APPDIR/usr/share/icons/hicolor/16x16/apps/xenia_canary.png for size in 16 32 48 64 128 256 512 1024; do
cp assets/icon/32.png $APPDIR/usr/share/icons/hicolor/32x32/apps/xenia_canary.png mkdir -p ${APPDIR}/usr/share/icons/hicolor/${size}x${size}/apps
cp assets/icon/48.png $APPDIR/usr/share/icons/hicolor/48x48/apps/xenia_canary.png cp assets/icon/${size}.png ${APPDIR}/usr/share/icons/hicolor/${size}x${size}/apps/xenia_canary.png
cp assets/icon/64.png $APPDIR/usr/share/icons/hicolor/64x64/apps/xenia_canary.png done
cp assets/icon/128.png $APPDIR/usr/share/icons/hicolor/128x128/apps/xenia_canary.png
cp assets/icon/256.png $APPDIR/usr/share/icons/hicolor/256x256/apps/xenia_canary.png
cp assets/icon/512.png $APPDIR/usr/share/icons/hicolor/512x512/apps/xenia_canary.png
cp assets/icon/1024.png $APPDIR/usr/share/icons/hicolor/1024x1024/apps/xenia_canary.png
# Copy any extra runtime data directories alongside the binary # Copy any extra runtime data directories alongside the binary
find build/bin/Linux/Release -maxdepth 1 -type d ! -name Release -exec cp -r {} $APPDIR/usr/bin/ \; find build/bin/Linux/Release -maxdepth 1 -type d ! -name Release -exec cp -r {} ${APPDIR}/usr/bin/ \;
# Build AppImage with linuxdeploy (requires absolute paths) # Build AppImage with linuxdeploy (requires absolute paths)
linuxdeploy --appdir $APPDIR \ linuxdeploy --appdir $APPDIR \
--executable $binary \ --executable $binary \
--desktop-file $GITHUB_WORKSPACE/assets/xenia_canary.desktop \ --desktop-file ${GITHUB_WORKSPACE}/assets/xenia_canary.desktop \
--icon-file $GITHUB_WORKSPACE/assets/icon/256.png \ --icon-file ${GITHUB_WORKSPACE}/assets/icon/256.png \
--output appimage --output appimage
# Find the generated AppImage and move to release directory # Find the generated AppImage and move to release directory
@@ -142,15 +130,16 @@ jobs:
exit 1 exit 1
fi fi
mkdir -p artifacts/release chmod +x "$appimage_file"
mv "$appimage_file" artifacts/release/xenia_canary_linux.AppImage artifact=xenia_canary_linux.AppImage
chmod +x artifacts/release/xenia_canary_linux.AppImage mv "$appimage_file" $artifact
echo "path=$artifact" >> $GITHUB_OUTPUT
- name: Upload Xenia Canary artifact - name: Upload Xenia Canary artifact
if: steps.prepare_artifacts.outcome == 'success' if: ${{ steps.prepare_artifacts.outcome == 'success' }}
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7
with: with:
name: xenia_canary_linux path: ${{ steps.prepare_artifacts.outputs.path }}
path: artifacts/release
if-no-files-found: error if-no-files-found: error
retention-days: 7 retention-days: 7
archive: false

View File

@@ -22,12 +22,15 @@ jobs:
# =========================================================================== # ===========================================================================
commit-message: commit-message:
name: Commit Message Validation name: Commit Message Validation
if: github.event_name == 'pull_request' if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/workflows/Check_commit_message.yml uses: ./.github/workflows/Check_commit_message.yml
lint: lint:
name: Lint name: Lint
uses: ./.github/workflows/Lint.yml uses: ./.github/workflows/Lint.yml
with:
runs-on: ubuntu-24.04
llvm_version: 20
# Add optional steps here # Add optional steps here
@@ -45,6 +48,10 @@ jobs:
needs: [lint, commit-message] needs: [lint, commit-message]
if: ${{ !failure() && !cancelled() }} if: ${{ !failure() && !cancelled() }}
uses: ./.github/workflows/Linux_x86.yml uses: ./.github/workflows/Linux_x86.yml
with:
runs-on: ${{ needs.lint.outputs.runs-on }}
llvm_version: ${{ needs.lint.outputs.llvm_version }}
ubuntu_base: ${{ needs.lint.outputs.ubuntu_base }}
# Uncomment when platform support is ready: # Uncomment when platform support is ready:
# build-windows-arm64: # build-windows-arm64:
@@ -73,7 +80,7 @@ jobs:
release: release:
name: Create Release name: Create Release
needs: [build-windows, build-linux] needs: [build-windows, build-linux]
if: | if: |-
always() && always() &&
github.repository == 'xenia-canary/xenia-canary' && github.repository == 'xenia-canary/xenia-canary' &&
github.event_name == 'push' && github.event_name == 'push' &&

View File

@@ -2,16 +2,11 @@ name: Windows (x86-64)
on: on:
workflow_call: workflow_call:
inputs:
config:
description: 'Build configuration (Release)'
required: false
default: 'release'
type: string
jobs: jobs:
build: build:
runs-on: windows-2025 name: Build
runs-on: windows-2025-vs2026
env: env:
POWERSHELL_TELEMETRY_OPTOUT: 1 POWERSHELL_TELEMETRY_OPTOUT: 1
@@ -28,27 +23,25 @@ jobs:
with: with:
path: C:\VulkanSDK path: C:\VulkanSDK
key: ${{ runner.os }}-vulkan-sdk-${{ hashFiles('**/vulkan-sdk.exe') }} key: ${{ runner.os }}-vulkan-sdk-${{ hashFiles('**/vulkan-sdk.exe') }}
restore-keys: | restore-keys: ${{ runner.os }}-vulkan-sdk-
${{ runner.os }}-vulkan-sdk-
- name: Install Vulkan SDK - name: Install Vulkan SDK with spirv-tools
run: | run: |-
# Install Vulkan SDK with spirv-tools if (Test-Path "C:\VulkanSDK") {
if (Test-Path -Path "C:\VulkanSDK") {
echo "Vulkan SDK found in cache." echo "Vulkan SDK found in cache."
} else { } else {
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe" -OutFile "vulkan-sdk.exe" Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe" -OutFile "vulkan-sdk.exe"
Start-Process -FilePath "vulkan-sdk.exe" -ArgumentList "--accept-licenses", "--default-answer", "--confirm-command", "install" -Wait Start-Process -FilePath "vulkan-sdk.exe" -ArgumentList "--accept-licenses", "--default-answer", "--confirm-command", "install" -NoNewWindow -Wait
} }
$env:VULKAN_SDK = "C:\VulkanSDK\$(Get-ChildItem -Path 'C:\VulkanSDK' -Directory | Select-Object -First 1 -ExpandProperty Name)" $env:VULKAN_SDK = "C:\VulkanSDK\$(Get-ChildItem -Path 'C:\VulkanSDK' -Directory | Select-Object -First 1 -ExpandProperty Name)"
$env:PATH = "$env:VULKAN_SDK\Bin;$env:PATH" $env:PATH += "${env:VULKAN_SDK}\Bin"
echo "VULKAN_SDK=$env:VULKAN_SDK" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "VULKAN_SDK=$env:VULKAN_SDK" >> $env:GITHUB_ENV
echo "$env:VULKAN_SDK\Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "${env:VULKAN_SDK}\Bin" >> $env:GITHUB_PATH
# Verify shader tools are available # Verify shader tools are available
foreach ($tool in @("glslangValidator", "spirv-opt", "spirv-dis")) { foreach ($tool in @("glslangValidator", "spirv-opt", "spirv-dis")) {
$toolPath = "$env:VULKAN_SDK\Bin\$tool.exe" $toolPath = "${env:VULKAN_SDK}\Bin\$tool.exe"
if (Test-Path $toolPath) { if (Test-Path "$toolPath") {
echo "$tool found at: $toolPath" echo "$tool found at: $toolPath"
& $toolPath --version 2>$null & $toolPath --version 2>$null
} else { } else {
@@ -73,20 +66,24 @@ jobs:
- name: Prepare artifacts - name: Prepare artifacts
id: prepare_artifacts id: prepare_artifacts
run: | run: |-
if ((Get-Item 'build\bin\Windows\Release\xenia_canary.exe').Length -le 100000) { if ((Get-Item "build\bin\Windows\Release\xenia_canary.exe").Length -le 100000) {
echo "::error:: Executable is too small." echo "::error:: Executable is too small."
exit 1 exit 1
} }
robocopy . build\bin\Windows\Release LICENSE /r:0 /w:0 $path="xenia_canary_windows.7z"
robocopy build\bin\Windows\Release artifacts\xenia_canary xenia_canary.exe LICENSE /r:0 /w:0 7z a $path .\build\bin\Windows\Release\xenia_canary.exe LICENSE -mx9 -bb3
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 } if ((Get-Item "$path").Length -le 100000) {
echo "::error:: Archive is too small."
exit 1
}
echo "path=$path" >> $env:GITHUB_OUTPUT
- name: Upload Xenia Canary artifact - name: Upload Xenia Canary artifact
if: steps.prepare_artifacts.outcome == 'success' if: ${{ steps.prepare_artifacts.outcome == 'success' }}
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7
with: with:
name: xenia_canary_windows path: ${{ steps.prepare_artifacts.outputs.path }}
path: artifacts\xenia_canary
if-no-files-found: error if-no-files-found: error
retention-days: 7 retention-days: 7
archive: false