[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:
21
.github/workflows/Check_commit_message.yml
vendored
21
.github/workflows/Check_commit_message.yml
vendored
@@ -14,37 +14,36 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Validate commit messages
|
||||
run: |
|
||||
run: |-
|
||||
BASE="${{ github.event.pull_request.base.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."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FAILED=0
|
||||
while IFS= read -r LINE; do
|
||||
SHA="${LINE%% *}"
|
||||
MSG="${LINE#* }"
|
||||
SHORT="${SHA::7}"
|
||||
|
||||
if echo "${MSG}" | grep -qP '^\[.+?\]'; then
|
||||
echo "✅ ${SHORT}: ${MSG}"
|
||||
if echo "$MSG" | grep -qP '^\[.+?\]'; then
|
||||
echo "✅ ${SHORT}: $MSG"
|
||||
else
|
||||
echo "❌ ${SHORT}: ${MSG}"
|
||||
echo "::error::Commit ${SHORT} is missing a [Tag] prefix. Expected format: [Tag] Description (e.g. [CPU] Fix overflow in JIT)"
|
||||
echo "❌ ${SHORT}: $MSG"
|
||||
echo "::error::Commit $SHORT is missing a [Tag] prefix. Expected format: [Tag] Description (e.g. [CPU] Fix overflow in JIT)"
|
||||
FAILED=1
|
||||
fi
|
||||
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 ""
|
||||
echo
|
||||
echo "Expected format: [Tag] Description"
|
||||
echo "Examples: [CPU] <commit message>"
|
||||
echo " [GPU] <commit message>"
|
||||
|
||||
129
.github/workflows/Create_release.yml
vendored
129
.github/workflows/Create_release.yml
vendored
@@ -9,9 +9,8 @@ on:
|
||||
type: string
|
||||
branch:
|
||||
description: 'Branch name used as release tag suffix (e.g. canary_experimental)'
|
||||
required: false
|
||||
type: string
|
||||
default: 'canary_experimental'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -21,8 +20,7 @@ jobs:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
# Checkout for git log access — no submodules needed
|
||||
- name: Checkout repository
|
||||
- name: Checkout repository for git log access
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@@ -32,112 +30,57 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
run: |-
|
||||
FULL_SHA="${{ inputs.tag }}"
|
||||
SHORT_SHA="${FULL_SHA::7}"
|
||||
BRANCH="${{ inputs.branch }}"
|
||||
TAG_NAME="${SHORT_SHA}"
|
||||
TITLE="${SHORT_SHA}_${BRANCH}"
|
||||
TAG_NAME="$SHORT_SHA"
|
||||
TITLE="${SHORT_SHA}_$BRANCH"
|
||||
|
||||
echo "tag_name=${TAG_NAME}" >> "$GITHUB_OUTPUT"
|
||||
echo "title=${TITLE}" >> "$GITHUB_OUTPUT"
|
||||
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
|
||||
echo "title=$TITLE" >> $GITHUB_OUTPUT
|
||||
|
||||
PREV_TAG=$(gh release list \
|
||||
--repo "${REPO}" \
|
||||
--repo "$REPO" \
|
||||
--limit 1 \
|
||||
--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 || \
|
||||
git rev-parse "${PREV_TAG}" 2>/dev/null || echo "")
|
||||
git rev-parse "${PREV_TAG}" 2>/dev/null || echo)
|
||||
fi
|
||||
|
||||
if [ -n "${PREV_SHA}" ]; then
|
||||
COMMITS=$(git log --format="- %s (\`%h\`)" --abbrev=7 "${PREV_SHA}..${FULL_SHA}" --)
|
||||
COMPARE_URL="https://github.com/${REPO}/compare/${PREV_TAG}...${TAG_NAME}"
|
||||
if [ -n "$PREV_SHA" ]; then
|
||||
COMMITS=$(git log --format='- %s (`%h`)' --abbrev=7 "${PREV_SHA}..$FULL_SHA" --)
|
||||
COMPARE_URL="https://github.com/${REPO}/compare/${PREV_TAG}...$TAG_NAME"
|
||||
else
|
||||
COMMITS=$(git log --format="- %s (\`%h\`)" --abbrev=7 -1 "${FULL_SHA}" --)
|
||||
COMPARE_URL=""
|
||||
COMMITS=$(git log --format='- %s (`%h`)' --abbrev=7 -1 "$FULL_SHA" --)
|
||||
fi
|
||||
|
||||
# Assemble body
|
||||
{
|
||||
echo "body<<RELEASE_BODY_EOF"
|
||||
|
||||
if [ -n "${COMMITS}" ]; then
|
||||
if [ -n "$COMMITS" ]; then
|
||||
echo "### Changes"
|
||||
echo ""
|
||||
echo "${COMMITS}"
|
||||
echo
|
||||
echo "$COMMITS"
|
||||
fi
|
||||
|
||||
if [ -n "${COMPARE_URL}" ]; then
|
||||
echo ""
|
||||
echo "**Full changelog**: ${COMPARE_URL}"
|
||||
if [ -n "$COMPARE_URL" ]; then
|
||||
echo
|
||||
echo "**Full changelog**: $COMPARE_URL"
|
||||
fi
|
||||
|
||||
echo "RELEASE_BODY_EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
} >> $GITHUB_OUTPUT
|
||||
|
||||
# --- Download artifacts only for platforms that succeeded ---
|
||||
|
||||
- name: Download Windows artifacts
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: xenia_canary_windows
|
||||
path: artifacts/windows/xenia_canary
|
||||
|
||||
- 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 ---
|
||||
path: release_assets
|
||||
merge-multiple: true
|
||||
|
||||
- name: Create GitHub Release
|
||||
env:
|
||||
@@ -147,25 +90,25 @@ jobs:
|
||||
TITLE: ${{ steps.notes.outputs.title }}
|
||||
BODY: ${{ steps.notes.outputs.body }}
|
||||
TARGET: ${{ inputs.tag }}
|
||||
run: |
|
||||
echo "${BODY}" > release_notes.md
|
||||
echo "Creating release: ${TAG}"
|
||||
run: |-
|
||||
echo "$BODY" > release_notes.md
|
||||
echo "Creating release: $TAG"
|
||||
|
||||
# Check if tag/release already exists (re-run safety)
|
||||
if gh release view "${TAG}" --repo "${REPO}" --json tagName 2>/dev/null; then
|
||||
echo "Release ${TAG} exists, uploading new assets..."
|
||||
gh release upload "${TAG}" \
|
||||
--repo "${REPO}" \
|
||||
if gh release view "$TAG" --repo "$REPO" --json tagName 2>/dev/null; then
|
||||
echo "Release $TAG exists, uploading new assets..."
|
||||
gh release upload "$TAG" \
|
||||
--repo "$REPO" \
|
||||
--clobber \
|
||||
release_assets/*
|
||||
else
|
||||
gh release create "${TAG}" \
|
||||
--repo "${REPO}" \
|
||||
gh release create "$TAG" \
|
||||
--repo "$REPO" \
|
||||
--target "${{ inputs.tag }}" \
|
||||
--title "${TITLE}" \
|
||||
--title "$TITLE" \
|
||||
--notes-file release_notes.md \
|
||||
--latest \
|
||||
release_assets/*
|
||||
fi
|
||||
|
||||
echo "✅ Release ${TAG} published"
|
||||
echo "✅ Release $TAG published"
|
||||
|
||||
33
.github/workflows/Lint.yml
vendored
33
.github/workflows/Lint.yml
vendored
@@ -2,28 +2,39 @@ name: Lint
|
||||
|
||||
on:
|
||||
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:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
outputs:
|
||||
#LLVM_VERSION: ${{ steps.setup.outputs.LLVM_VERSION }}
|
||||
UBUNTU_BASE: ${{ steps.setup.outputs.UBUNTU_BASE }}
|
||||
ubuntu_base: ${{ steps.setup.outputs.ubuntu_base }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup
|
||||
id: setup
|
||||
env:
|
||||
LLVM_VERSION: 20
|
||||
run: |
|
||||
run: |-
|
||||
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
|
||||
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 install clang-format-$LLVM_VERSION
|
||||
sudo apt-get -y install clang-format-${{ inputs.llvm_version }}
|
||||
- name: Lint
|
||||
run: ./xenia-build.py lint --all
|
||||
|
||||
|
||||
109
.github/workflows/Linux_x86.yml
vendored
109
.github/workflows/Linux_x86.yml
vendored
@@ -3,19 +3,23 @@ name: Linux Build
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
config:
|
||||
description: 'Build configuration (Release)'
|
||||
required: false
|
||||
default: 'release'
|
||||
runs-on:
|
||||
description: 'Image'
|
||||
required: true
|
||||
type: string
|
||||
llvm_version:
|
||||
description: 'LLVM Version'
|
||||
required: true
|
||||
type: string
|
||||
ubuntu_base:
|
||||
description: 'Ubuntu Base'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
LLVM_VERSION: 20
|
||||
UBUNTU_BASE: noble # We're running on ubuntu-24.04. Remember to change it after changing deploy env.
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -38,42 +42,41 @@ jobs:
|
||||
key: ${{ runner.os }}-linuxdeploy-tools
|
||||
|
||||
- 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
|
||||
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 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
|
||||
# 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++-${{ env.LLVM_VERSION }} 200
|
||||
sudo update-alternatives --install /usr/bin/lld lld /usr/bin/lld-${{ env.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/llvm-ar llvm-ar /usr/bin/llvm-ar-${{ env.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-nm llvm-nm /usr/bin/llvm-nm-${{ 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++-${{ inputs.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-${{ inputs.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-${{ inputs.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
|
||||
if [ '${{ steps.cache-linuxdeploy.outputs.cache-hit }}' != 'true' ]; then
|
||||
if [ ${{ steps.cache-linuxdeploy.outputs.cache-hit }} != true ]; then
|
||||
mkdir -p ~/linuxdeploy
|
||||
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O ~/linuxdeploy/linuxdeploy
|
||||
chmod +x ~/linuxdeploy/linuxdeploy
|
||||
fi
|
||||
echo "$HOME/linuxdeploy" >> $GITHUB_PATH
|
||||
echo "${HOME}/linuxdeploy" >> $GITHUB_PATH
|
||||
|
||||
- name: Install Vulkan SDK
|
||||
run: |
|
||||
# Install Vulkan SDK
|
||||
if [ '${{ steps.cache-vulkan-sdk-linux.outputs.cache-hit }}' != 'true' ]; then
|
||||
run: |-
|
||||
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
|
||||
mkdir -p ~/vulkan-sdk
|
||||
tar -xf vulkan-sdk.tar.xz -C ~/vulkan-sdk
|
||||
fi
|
||||
|
||||
VULKAN_SDK_VERSION=$(ls ~/vulkan-sdk)
|
||||
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 "VULKAN_SDK=${HOME}/vulkan-sdk/${VULKAN_SDK_VERSION}/x86_64" >> $GITHUB_ENV
|
||||
echo "${HOME}/vulkan-sdk/${VULKAN_SDK_VERSION}/x86_64/bin" >> $GITHUB_PATH
|
||||
|
||||
# Verify shader tools are available
|
||||
for tool in glslangValidator spirv-opt spirv-dis; do
|
||||
@@ -81,21 +84,19 @@ jobs:
|
||||
done
|
||||
|
||||
- name: Download submodules
|
||||
run: |
|
||||
# Exclude not needed 3pp modules
|
||||
EXCLUDE="DirectXShaderCompiler"
|
||||
SUBMODULES=$(grep -oP '(?<=path = ).+' .gitmodules | grep -vE "$EXCLUDE")
|
||||
git submodule update --init --depth=1 -j$(nproc) $SUBMODULES
|
||||
run: |- # Exclude unneeded submodules
|
||||
SUBMODULES=$(grep -oP '(?<=path = )(?!third_party\/DirectX(?:-Headers|ShaderCompiler)).+' .gitmodules)
|
||||
git submodule update --init --depth=1 -j$(getconf _NPROCESSORS_ONLN) $SUBMODULES
|
||||
|
||||
- name: Build Xenia
|
||||
env:
|
||||
CC: clang-${{ env.LLVM_VERSION }}
|
||||
CXX: clang++-${{ env.LLVM_VERSION }}
|
||||
CC: clang-${{ inputs.llvm_version }}
|
||||
CXX: clang++-${{ inputs.llvm_version }}
|
||||
run: ./xenia-build.py build --config=Release
|
||||
|
||||
- name: Prepare AppImage
|
||||
id: prepare_artifacts
|
||||
run: |
|
||||
run: |-
|
||||
binary=build/bin/Linux/Release/xenia_canary
|
||||
if [ $(stat -c%s $binary) -le 100000 ]; then
|
||||
echo "::error::Binary is too small."
|
||||
@@ -105,34 +106,21 @@ jobs:
|
||||
|
||||
# Set up AppDir structure
|
||||
APPDIR=artifacts/xenia_canary
|
||||
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
|
||||
|
||||
mkdir -p ${APPDIR}/usr/bin
|
||||
# Install icons
|
||||
cp assets/icon/16.png $APPDIR/usr/share/icons/hicolor/16x16/apps/xenia_canary.png
|
||||
cp assets/icon/32.png $APPDIR/usr/share/icons/hicolor/32x32/apps/xenia_canary.png
|
||||
cp assets/icon/48.png $APPDIR/usr/share/icons/hicolor/48x48/apps/xenia_canary.png
|
||||
cp assets/icon/64.png $APPDIR/usr/share/icons/hicolor/64x64/apps/xenia_canary.png
|
||||
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
|
||||
for size in 16 32 48 64 128 256 512 1024; do
|
||||
mkdir -p ${APPDIR}/usr/share/icons/hicolor/${size}x${size}/apps
|
||||
cp assets/icon/${size}.png ${APPDIR}/usr/share/icons/hicolor/${size}x${size}/apps/xenia_canary.png
|
||||
done
|
||||
|
||||
# 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)
|
||||
linuxdeploy --appdir $APPDIR \
|
||||
--executable $binary \
|
||||
--desktop-file $GITHUB_WORKSPACE/assets/xenia_canary.desktop \
|
||||
--icon-file $GITHUB_WORKSPACE/assets/icon/256.png \
|
||||
--desktop-file ${GITHUB_WORKSPACE}/assets/xenia_canary.desktop \
|
||||
--icon-file ${GITHUB_WORKSPACE}/assets/icon/256.png \
|
||||
--output appimage
|
||||
|
||||
# Find the generated AppImage and move to release directory
|
||||
@@ -142,15 +130,16 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p artifacts/release
|
||||
mv "$appimage_file" artifacts/release/xenia_canary_linux.AppImage
|
||||
chmod +x artifacts/release/xenia_canary_linux.AppImage
|
||||
chmod +x "$appimage_file"
|
||||
artifact=xenia_canary_linux.AppImage
|
||||
mv "$appimage_file" $artifact
|
||||
echo "path=$artifact" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload Xenia Canary artifact
|
||||
if: steps.prepare_artifacts.outcome == 'success'
|
||||
if: ${{ steps.prepare_artifacts.outcome == 'success' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: xenia_canary_linux
|
||||
path: artifacts/release
|
||||
path: ${{ steps.prepare_artifacts.outputs.path }}
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
archive: false
|
||||
|
||||
11
.github/workflows/Orchestrator.yml
vendored
11
.github/workflows/Orchestrator.yml
vendored
@@ -22,12 +22,15 @@ jobs:
|
||||
# ===========================================================================
|
||||
commit-message:
|
||||
name: Commit Message Validation
|
||||
if: github.event_name == 'pull_request'
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: ./.github/workflows/Check_commit_message.yml
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
uses: ./.github/workflows/Lint.yml
|
||||
with:
|
||||
runs-on: ubuntu-24.04
|
||||
llvm_version: 20
|
||||
|
||||
# Add optional steps here
|
||||
|
||||
@@ -45,6 +48,10 @@ jobs:
|
||||
needs: [lint, commit-message]
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
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:
|
||||
# build-windows-arm64:
|
||||
@@ -73,7 +80,7 @@ jobs:
|
||||
release:
|
||||
name: Create Release
|
||||
needs: [build-windows, build-linux]
|
||||
if: |
|
||||
if: |-
|
||||
always() &&
|
||||
github.repository == 'xenia-canary/xenia-canary' &&
|
||||
github.event_name == 'push' &&
|
||||
|
||||
51
.github/workflows/Windows_x86.yml
vendored
51
.github/workflows/Windows_x86.yml
vendored
@@ -2,16 +2,11 @@ name: Windows (x86-64)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
config:
|
||||
description: 'Build configuration (Release)'
|
||||
required: false
|
||||
default: 'release'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2025
|
||||
name: Build
|
||||
runs-on: windows-2025-vs2026
|
||||
|
||||
env:
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
@@ -28,27 +23,25 @@ jobs:
|
||||
with:
|
||||
path: C:\VulkanSDK
|
||||
key: ${{ runner.os }}-vulkan-sdk-${{ hashFiles('**/vulkan-sdk.exe') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-vulkan-sdk-
|
||||
restore-keys: ${{ runner.os }}-vulkan-sdk-
|
||||
|
||||
- name: Install Vulkan SDK
|
||||
run: |
|
||||
# Install Vulkan SDK with spirv-tools
|
||||
if (Test-Path -Path "C:\VulkanSDK") {
|
||||
- name: Install Vulkan SDK with spirv-tools
|
||||
run: |-
|
||||
if (Test-Path "C:\VulkanSDK") {
|
||||
echo "Vulkan SDK found in cache."
|
||||
} else {
|
||||
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:PATH = "$env:VULKAN_SDK\Bin;$env:PATH"
|
||||
echo "VULKAN_SDK=$env:VULKAN_SDK" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "$env:VULKAN_SDK\Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
$env:PATH += "${env:VULKAN_SDK}\Bin"
|
||||
echo "VULKAN_SDK=$env:VULKAN_SDK" >> $env:GITHUB_ENV
|
||||
echo "${env:VULKAN_SDK}\Bin" >> $env:GITHUB_PATH
|
||||
|
||||
# Verify shader tools are available
|
||||
foreach ($tool in @("glslangValidator", "spirv-opt", "spirv-dis")) {
|
||||
$toolPath = "$env:VULKAN_SDK\Bin\$tool.exe"
|
||||
if (Test-Path $toolPath) {
|
||||
$toolPath = "${env:VULKAN_SDK}\Bin\$tool.exe"
|
||||
if (Test-Path "$toolPath") {
|
||||
echo "$tool found at: $toolPath"
|
||||
& $toolPath --version 2>$null
|
||||
} else {
|
||||
@@ -73,20 +66,24 @@ jobs:
|
||||
|
||||
- name: Prepare artifacts
|
||||
id: prepare_artifacts
|
||||
run: |
|
||||
if ((Get-Item 'build\bin\Windows\Release\xenia_canary.exe').Length -le 100000) {
|
||||
run: |-
|
||||
if ((Get-Item "build\bin\Windows\Release\xenia_canary.exe").Length -le 100000) {
|
||||
echo "::error:: Executable is too small."
|
||||
exit 1
|
||||
}
|
||||
robocopy . build\bin\Windows\Release LICENSE /r:0 /w:0
|
||||
robocopy build\bin\Windows\Release artifacts\xenia_canary xenia_canary.exe LICENSE /r:0 /w:0
|
||||
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
|
||||
$path="xenia_canary_windows.7z"
|
||||
7z a $path .\build\bin\Windows\Release\xenia_canary.exe LICENSE -mx9 -bb3
|
||||
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
|
||||
if: steps.prepare_artifacts.outcome == 'success'
|
||||
if: ${{ steps.prepare_artifacts.outcome == 'success' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: xenia_canary_windows
|
||||
path: artifacts\xenia_canary
|
||||
path: ${{ steps.prepare_artifacts.outputs.path }}
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
archive: false
|
||||
|
||||
Reference in New Issue
Block a user