diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9bb9bbb --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 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/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 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}"