CI: build without marketplace actions
Some checks failed
Build TV app / build (push) Failing after 21s
Some checks failed
Build TV app / build (push) Failing after 21s
The runner resolves bare action names against this Gitea, and even with full GitHub URLs it fails on annotated tags (unsupported object type). The image also ships neither a JDK nor an Android SDK, so the job never had a chance. Everything is plain shell now: shallow checkout, JDK 17, command-line SDK tools, tests, debug APK. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
55
.github/workflows/build.yml
vendored
55
.github/workflows/build.yml
vendored
@@ -4,36 +4,49 @@ on:
|
|||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# No marketplace actions: this Gitea runner resolves bare action names
|
||||||
|
# against the local instance, and even with full URLs it cannot resolve
|
||||||
|
# annotated tags ("unsupported object type"). Everything below is plain
|
||||||
|
# shell, which also keeps the job readable.
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
ANDROID_SDK_ROOT: /opt/android-sdk
|
||||||
|
CMDLINE_TOOLS: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
|
||||||
steps:
|
steps:
|
||||||
# Full URLs: this Gitea resolves bare action names against itself,
|
- name: Checkout
|
||||||
# where these actions do not exist.
|
run: |
|
||||||
- uses: https://github.com/actions/checkout@v4
|
git init -q .
|
||||||
|
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||||
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
||||||
|
git checkout -q FETCH_HEAD
|
||||||
|
|
||||||
- uses: https://github.com/actions/setup-java@v4
|
- name: Install JDK
|
||||||
with:
|
run: |
|
||||||
distribution: temurin
|
apt-get update -qq
|
||||||
java-version: "17"
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq openjdk-17-jdk-headless > /dev/null
|
||||||
|
java -version
|
||||||
|
|
||||||
- uses: https://github.com/gradle/actions/setup-gradle@v4
|
- name: Install Android SDK
|
||||||
|
run: |
|
||||||
|
mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools"
|
||||||
|
curl -sSL -o /tmp/tools.zip "$CMDLINE_TOOLS"
|
||||||
|
unzip -q /tmp/tools.zip -d "$ANDROID_SDK_ROOT/cmdline-tools"
|
||||||
|
mv "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest"
|
||||||
|
yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null
|
||||||
|
"$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" \
|
||||||
|
"platforms;android-35" "build-tools;35.0.0" "platform-tools" > /dev/null
|
||||||
|
echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties
|
||||||
|
|
||||||
- name: Unit tests
|
- name: Unit tests
|
||||||
run: ./gradlew testDebugUnitTest --stacktrace
|
run: ./gradlew testDebugUnitTest --no-daemon --stacktrace
|
||||||
|
|
||||||
- name: Build debug APK
|
- name: Build debug APK
|
||||||
run: ./gradlew assembleDebug --stacktrace
|
run: ./gradlew assembleDebug --no-daemon --stacktrace
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Summary
|
||||||
uses: https://github.com/actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: castarr-debug-apk
|
|
||||||
path: app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
|
|
||||||
- name: Upload test report
|
|
||||||
if: always()
|
if: always()
|
||||||
uses: https://github.com/actions/upload-artifact@v4
|
run: |
|
||||||
with:
|
echo "APK:"; ls -la app/build/outputs/apk/debug/ 2>/dev/null || echo " (kein Build)"
|
||||||
name: castarr-test-report
|
echo "Tests:"; ls tests/runs/junit/ 2>/dev/null || echo " (keine Reports)"
|
||||||
path: tests/runs/
|
|
||||||
|
|||||||
Reference in New Issue
Block a user