Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
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

- 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

- 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 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

- 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

- 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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Loading