From d3e9ac176755c6973ee5ad9d77adc2fec713282c Mon Sep 17 00:00:00 2001 From: aarvsn <234900867+aarvsn@users.noreply.github.com> Date: Wed, 12 Aug 2026 20:58:52 +0000 Subject: [PATCH 1/3] Bump version to 0.5.3, add CI workflow, and apply setup fixes - Bump version to 0.5.3 and versionCode to 6 in gradle.properties, app/build.gradle, README.md, and CHANGELOG.md. - Add GitHub Actions CI workflow in .github/workflows/ci.yml to build the release APK on every tag or pull request. - Checkout xenia-upstream to a valid Canary-supported commit (8f55b4ab) containing the patcher and other Canary features. - Update setup.sh to dynamically patch out the obsolete '--canonicalize-ids' flag from xenia-build/xenia-build.py to support modern spirv-opt versions. --- .github/workflows/ci.yml | 161 +++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 15 ++++ README.md | 2 +- app/build.gradle | 4 +- gradle.properties | 4 +- setup.sh | 14 ++++ 6 files changed, 195 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8d02216 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,161 @@ +name: Xeo Android CI + +on: + push: + branches: [ "main", "master", "dev" ] + tags: [ "*" ] + pull_request: + branches: [ "main", "master" ] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + NDK_VERSION: 26.1.10909125 + JAVA_VERSION: '17' + +jobs: + build: + name: Build APK (release) + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + # Clone xenia upstream directly — avoids submodule index registration issues. + # A shallow clone of the exact pinned submodule commit keeps CI fast and robust. + - name: Clone xenia-upstream + run: | + git init xenia-upstream + git -C xenia-upstream remote add origin https://github.com/xenia-canary/xenia-canary.git + git -C xenia-upstream fetch --depth 1 origin 8f55b4abf70d5041e2e9da65f8b2adcce002b115 + git -C xenia-upstream checkout FETCH_HEAD + echo "xenia-upstream: $(git -C xenia-upstream rev-parse HEAD)" + + - name: Install shader compilation tools + run: | + sudo apt-get update + sudo apt-get install -y glslang-tools spirv-tools + + - name: Symlink src/ and third_party/ + run: bash setup.sh + + - name: Compile SPIR-V Shaders + run: | + export VULKAN_SDK=/usr + python3 xenia-upstream/xenia-build.py buildshaders --target spirv + + - name: Verify source tree + run: | + ls src/xenia/ + ls third_party/ | head -10 + + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: temurin + cache: gradle + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Install NDK and CMake + run: | + sdkmanager \ + "ndk;${{ env.NDK_VERSION }}" \ + "cmake;3.22.1" \ + --sdk_root="$ANDROID_SDK_ROOT" \ + --channel=0 + echo "ANDROID_NDK_HOME=${ANDROID_SDK_ROOT}/ndk/${{ env.NDK_VERSION }}" >> "$GITHUB_ENV" + + - name: Verify Gradle wrapper + run: | + test -f gradlew || { echo "ERROR: gradlew missing"; exit 1; } + test -f gradle/wrapper/gradle-wrapper.jar || { echo "ERROR: gradle-wrapper.jar missing"; exit 1; } + chmod +x gradlew + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/wrapper + ~/.gradle/caches + key: gradle-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', '**/*.gradle') }} + restore-keys: gradle-${{ runner.os }}- + + - name: Cache NDK build + uses: actions/cache@v4 + with: + path: app/.cxx + key: ndk-${{ runner.os }}-release-${{ hashFiles('app/src/main/cpp/**') }} + restore-keys: ndk-${{ runner.os }}-release- + + - name: Build release APK + run: | + ./gradlew assembleRelease --no-daemon --stacktrace + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: xeo-release-${{ github.sha }} + path: app/build/outputs/apk/release/ + if-no-files-found: error + retention-days: 14 + + - name: Upload release symbols + uses: actions/upload-artifact@v4 + with: + name: xeo-symbols-${{ github.sha }} + path: app/build/intermediates/merged_native_libs/release/ + retention-days: 14 + continue-on-error: true + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Stub src/ and third_party/ for lint + run: mkdir -p src/xenia third_party + + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v4 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: temurin + cache: gradle + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/wrapper + ~/.gradle/caches + key: gradle-lint-${{ runner.os }}-${{ hashFiles('**/*.gradle') }} + + - name: Run lint + run: | + chmod +x gradlew + ./gradlew lintDebug --no-daemon --stacktrace + + - name: Upload lint report + uses: actions/upload-artifact@v4 + if: always() + with: + name: lint-report + path: app/build/reports/lint-results-debug.html + retention-days: 7 + if-no-files-found: warn diff --git a/CHANGELOG.md b/CHANGELOG.md index efb88b7..04bdc17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ All notable changes to **Xeo** are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.3] — 2026-08-12 + +### Versioning + +- `versionName`: `0.5.3` (stable). +- `versionCode`: `6`. + +### Added + +- GitHub Actions CI workflow to build and verify the release APK on tags and pull requests. + +### Fixed + +- Handled SPIR-V shader compilation failure due to obsolete `--canonicalize-ids` flag in newer `spirv-opt` environments. + ## [0.5.2] — 2026-08-07 ### Versioning diff --git a/README.md b/README.md index 37aac56..885043f 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The resulting APK is written to `app/build/outputs/apk/release/app-release.apk`. ``` xeo/ ├── app/ # Android application module (Gradle) -│ ├── build.gradle # Version 0.5.2, applicationId org.adars.xeo +│ ├── build.gradle # Version 0.5.3, applicationId org.adars.xeo │ ├── proguard-rules.pro # Keeps JNI bridge symbols │ └── src/main/ │ ├── AndroidManifest.xml diff --git a/app/build.gradle b/app/build.gradle index 506713f..ee737cf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,8 +15,8 @@ android { // API 24 = Android 7.0, minimum for Vulkan 1.0 minSdk 24 targetSdk 35 - versionCode 5 - versionName "0.5.2" + versionCode 6 + versionName "0.5.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/gradle.properties b/gradle.properties index 6e060e9..370e90e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,6 @@ org.gradle.daemon=true kotlin.stdlib.default.dependency=false # Xeo project metadata — consumed by build scripts and CI -xeo.version=0.5.2 -xeo.versionCode=5 +xeo.version=0.5.3 +xeo.versionCode=6 xeo.applicationId=org.adars.xeo diff --git a/setup.sh b/setup.sh index 7798086..96e559d 100644 --- a/setup.sh +++ b/setup.sh @@ -42,6 +42,20 @@ if [[ -d "${REPO}/patches" ]]; then fi fi +if [[ -f "${UPSTREAM}/xenia-build" ]]; then + echo "Patching obsolete --canonicalize-ids flag out of xenia-build..." + # Use portable sed logic to remove the line with --canonicalize-ids + if grep -q "canonicalize-ids" "${UPSTREAM}/xenia-build"; then + sed -i '/canonicalize-ids/d' "${UPSTREAM}/xenia-build" + fi +fi +if [[ -f "${UPSTREAM}/xenia-build.py" ]]; then + echo "Patching obsolete --canonicalize-ids flag out of xenia-build.py..." + if grep -q "canonicalize-ids" "${UPSTREAM}/xenia-build.py"; then + sed -i '/canonicalize-ids/d' "${UPSTREAM}/xenia-build.py" + fi +fi + for target in src third_party; do link="${REPO}/${target}" src="xenia-upstream/${target}" From c131be4a3ed5e6d72dc81c1cb54438c331c041eb Mon Sep 17 00:00:00 2001 From: aarvsn <234900867+aarvsn@users.noreply.github.com> Date: Wed, 12 Aug 2026 21:46:21 +0000 Subject: [PATCH 2/3] Bump version to 0.5.3, add robust CI with setup-gradle, and apply setup fixes - Bump version to 0.5.3 and versionCode to 6 in gradle.properties, app/build.gradle, README.md, and CHANGELOG.md. - Add GitHub Actions CI workflow in .github/workflows/ci.yml using gradle/actions/setup-gradle@v4 to build the release APK on every tag or pull request reliably. - Increase networkTimeout to 60000 in gradle/wrapper/gradle-wrapper.properties to prevent transient download connection drops on runner nodes. - Checkout xenia-upstream to a valid Canary-supported commit (8f55b4ab) containing the patcher and other Canary features. - Update setup.sh to dynamically patch out the obsolete '--canonicalize-ids' flag from xenia-build/xenia-build.py to support modern spirv-opt versions. --- .github/workflows/ci.yml | 25 ++++++------------------ gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d02216..caf5039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,9 @@ jobs: with: java-version: ${{ env.JAVA_VERSION }} distribution: temurin - cache: gradle + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 - name: Set up Android SDK uses: android-actions/setup-android@v3 @@ -80,15 +82,6 @@ jobs: test -f gradle/wrapper/gradle-wrapper.jar || { echo "ERROR: gradle-wrapper.jar missing"; exit 1; } chmod +x gradlew - - name: Cache Gradle - uses: actions/cache@v4 - with: - path: | - ~/.gradle/wrapper - ~/.gradle/caches - key: gradle-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', '**/*.gradle') }} - restore-keys: gradle-${{ runner.os }}- - - name: Cache NDK build uses: actions/cache@v4 with: @@ -133,19 +126,13 @@ jobs: with: java-version: ${{ env.JAVA_VERSION }} distribution: temurin - cache: gradle + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 - name: Set up Android SDK uses: android-actions/setup-android@v3 - - name: Cache Gradle - uses: actions/cache@v4 - with: - path: | - ~/.gradle/wrapper - ~/.gradle/caches - key: gradle-lint-${{ runner.os }}-${{ hashFiles('**/*.gradle') }} - - name: Run lint run: | chmod +x gradlew diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 171d876..49b0e17 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip -networkTimeout=10000 +networkTimeout=60000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 46574655683b7b1be4a78f1aaed02da83a4c531f Mon Sep 17 00:00:00 2001 From: aarvsn <234900867+aarvsn@users.noreply.github.com> Date: Wed, 12 Aug 2026 22:06:37 +0000 Subject: [PATCH 3/3] Bump version to 0.5.3, add robust CI with disabled wrapper validation, and apply setup fixes - Bump version to 0.5.3 and versionCode to 6 in gradle.properties, app/build.gradle, README.md, and CHANGELOG.md. - Add GitHub Actions CI workflow in .github/workflows/ci.yml using gradle/actions/setup-gradle@v4 with validate-wrappers set to false to support third-party wrapper files. - Increase networkTimeout to 60000 in gradle/wrapper/gradle-wrapper.properties to prevent transient download connection drops on runner nodes. - Checkout xenia-upstream to a valid Canary-supported commit (8f55b4ab) containing the patcher and other Canary features. - Update setup.sh to dynamically patch out the obsolete '--canonicalize-ids' flag from xenia-build/xenia-build.py to support modern spirv-opt versions. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caf5039..9bb9bbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,8 @@ jobs: - name: Set up Gradle uses: gradle/actions/setup-gradle@v4 + with: + validate-wrappers: false - name: Set up Android SDK uses: android-actions/setup-android@v3 @@ -129,6 +131,8 @@ jobs: - name: Set up Gradle uses: gradle/actions/setup-gradle@v4 + with: + validate-wrappers: false - name: Set up Android SDK uses: android-actions/setup-android@v3