d2dc58391b
build / build (push) Successful in 2m26s
- xr_input.c/h: an OpenXR action set (aim pose, trigger/select click, a menu-toggle button) plus ray/quad hit-testing, and a visible laser-pointer line drawn from the controller toward the hit point. - xr_menu.c/h + MenuOverlay.java: a second composition-layer quad, toggled by a controller button, showing an off-screen, never-attached Android View tree (one "Keyboard" button so far) driven by synthetic touch events computed from the laser ray's hit UV. - Migrate gl4es from a prebuilt binary baked into the Docker build-image to a vendored source snapshot (android/gl4es-src/) compiled from source at APK build time via CMake add_subdirectory(), patched through a new android/gl4es-patches/ (mirrors the existing engine-patches/ pattern). This was needed to track down and fix a bug hit while building the menu: gl4es's fixed-pipeline emulation (fpe.c) was unconditionally substituting its own shader onto the menu's draw call (fpe_ReleventState() always sets alphafunc to a nonzero sentinel, so its fpe_IsEmpty() check could never see the state as empty), making the menu quad show the game's own rendering instead of its own content. Fixed by routing the menu's blit through a real glBlitFramebuffer() call instead of a shader-based draw, which gl4es's fpe.c has nothing to intercept - documented in README.md's new "Debugging notes" section. - Renumber android/engine-patches/ to close the gap left by removing an unrelated diagnostic-only patch, and strip investigation-journal comments and dead diagnostic code (temporary tracing, env-var probes) left over from finding the bug above. - Restructure README.md into numbered sections, document every engine/gl4es patch, add Android Studio dev/testing-cycle instructions, and generalize Quest-specific wording to any OpenXR headset. Update NOTICE.txt to match (gl4es is now vendored/patched source, not a prebuilt binary; add the OpenXR-SDK loader).
99 lines
4.2 KiB
YAML
99 lines
4.2 KiB
YAML
name: build
|
|
|
|
# Builds a versioned Linux release tarball (see `make package`) on every
|
|
# push/PR, plus on-demand via the Gitea "Run workflow" button. Runs
|
|
# inside the build-image (see ../../build-image/Dockerfile, built/pushed
|
|
# via ../../build-image.sh and ../../upload-image.sh), which bundles
|
|
# every dependency engine/ needs to compile - no network access needed
|
|
# at job runtime. Since the job's container already *is* the build-image
|
|
# (QUESTSHOCK_BUILD_IMAGE=1), `make package`'s `engine` prerequisite
|
|
# compiles directly instead of trying to docker-run it again, which
|
|
# wouldn't work here (no nested docker).
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
# Runner defaults `run:` steps to `sh`, which doesn't understand
|
|
# `set -o pipefail` used below - force bash explicitly.
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
# Must match a label your act_runner is registered with.
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: cr.ladkau.de/questshock/builder:latest
|
|
credentials:
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# `make package`'s version comes from `git describe --tags` -
|
|
# needs full history/tags, not actions/checkout's default
|
|
# shallow single-commit clone.
|
|
fetch-depth: 0
|
|
|
|
- name: Preflight
|
|
run: |
|
|
set -euo pipefail
|
|
command -v cc >/dev/null 2>&1 || { echo "PREFLIGHT FAIL: no C compiler (cc) in PATH" >&2; exit 1; }
|
|
command -v cmake >/dev/null 2>&1 || { echo "PREFLIGHT FAIL: cmake not in PATH" >&2; exit 1; }
|
|
[ -n "${QUESTSHOCK_BUILD_IMAGE:-}" ] || { echo "PREFLIGHT FAIL: QUESTSHOCK_BUILD_IMAGE not set - not running inside the questshock build-image?" >&2; exit 1; }
|
|
[ -d /opt/prebuilt/built_sdl ] || { echo "PREFLIGHT FAIL: /opt/prebuilt/built_sdl missing" >&2; exit 1; }
|
|
# gl4es itself is no longer prebuilt here (compiled from source at
|
|
# APK-build time instead - see build-image/Dockerfile's gl4es
|
|
# comment) - openxr was added to this image in the same
|
|
# Android/Quest layer, so it's an equally good marker of that.
|
|
[ -d /opt/prebuilt/android/openxr ] || { echo "PREFLIGHT FAIL: /opt/prebuilt/android/openxr missing - runner is using a build-image older than the Android/Quest layer" >&2; exit 1; }
|
|
|
|
- name: Build package
|
|
run: make package
|
|
|
|
- name: Upload build artifact
|
|
# v4 uses the newer @actions/artifact backend, which this Gitea
|
|
# instance's artifact storage doesn't support (GHESNotSupportedError) - v3 works.
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: shockolate
|
|
path: dist/shockolate-*-linux-*.tar.gz
|
|
|
|
- name: Build Quest APK
|
|
# QUESTSHOCK_BUILD_IMAGE is already set (see Preflight above), so
|
|
# this runs build-apk.sh directly instead of trying to docker-run
|
|
# the image again - same reasoning as `make package` above.
|
|
# Unlike the fully offline engine/package build, this needs
|
|
# network access for Gradle/AGP's own dependency resolution - a
|
|
# scoped, accepted exception (see build-image/Dockerfile).
|
|
run: make apk
|
|
|
|
- name: Upload APK artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: questshock-quest-apk
|
|
path: dist/questshock-*-android-*.apk
|
|
|
|
- name: Publish to dl.ladkau.de
|
|
# Uploads the tarball and APK over SFTP instead of using
|
|
# actions/upload-artifact (whose zip wrapping can't be disabled).
|
|
# Only runs on push so PR builds don't publish.
|
|
if: gitea.event_name == 'push'
|
|
run: |
|
|
set -euo pipefail
|
|
TARBALL="$(ls dist/shockolate-*-linux-*.tar.gz)"
|
|
APK="$(ls dist/questshock-*-android-*.apk)"
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.DL_SFTP_KEY }}" > ~/.ssh/dl_sftp_key
|
|
chmod 600 ~/.ssh/dl_sftp_key
|
|
sftp -i ~/.ssh/dl_sftp_key -P 2223 \
|
|
-o StrictHostKeyChecking=accept-new \
|
|
uploader@dl.ladkau.de <<EOF
|
|
-mkdir files/questshock
|
|
put $TARBALL files/questshock/$(basename "$TARBALL")
|
|
put $APK files/questshock/$(basename "$APK")
|
|
EOF
|