SHA256
ci: target Gitea Ubuntu and native Apple Silicon runners
Move workflows into Gitea's workflow directory and use the supplied ubuntu-latest and macos-arm64 labels. Provision the Android SDK, require KVM without changing host permissions, support SHA-256 checkout and Gitea artifact uploads, and isolate scratch output on persistent runners. Skip untrusted fork PRs and keep release builds unsigned because Gitea ignores GitHub environment approval gates. Local workflow lint, repository invariants, ten preflight regressions, eight evidence-verifier tests, inline shell checks, scratch cleanup and SHA-256 fetch checks pass; remote runner execution remains unverified.
This commit is contained in:
1 parent
2d12491516
commit
11bf4ca620
16 files changed
+442
-192
No files matched your search
@@ -1,82 +0,0 @@
|
||||
name: Android validation
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
concurrency:
|
||||
group: android-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
- uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '17'
|
||||
- name: Build, test and lint (release remains unsigned)
|
||||
run: bash android/gradlew -p android testDebugUnitTest lintDebug lintRelease assembleDebug assembleRelease bundleRelease
|
||||
- name: Source formatting and repository invariants
|
||||
run: |
|
||||
bash scripts/check-format.sh
|
||||
python3 scripts/check-repository.py
|
||||
python3 -m py_compile scripts/*.py
|
||||
python3 scripts/test-verifier.py
|
||||
- name: Check dependencies against OSV
|
||||
run: python3 scripts/check-dependencies.py
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
if: always()
|
||||
with:
|
||||
name: android-builds-and-reports
|
||||
path: |
|
||||
android/app/build/outputs/apk/debug/*.apk
|
||||
android/app/build/outputs/apk/release/*unsigned.apk
|
||||
android/app/build/outputs/bundle/release/*.aab
|
||||
android/app/build/reports/
|
||||
retention-days: 14
|
||||
emulator:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
api: ['35', '37.0']
|
||||
timeout-minutes: 35
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
- uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '17'
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: '22.22.1'
|
||||
- name: Prepare pinned, unmodified upstream
|
||||
run: |
|
||||
git clone --filter=blob:none https://github.com/ulsklyc/yuvomi.git "$RUNNER_TEMP/upstream"
|
||||
git -C "$RUNNER_TEMP/upstream" checkout 10bfef7686ed7303b4c74c7fcc55a5eb16356c9d
|
||||
npm ci --omit=dev --prefix "$RUNNER_TEMP/upstream"
|
||||
- name: Enable KVM for the emulator
|
||||
run: |
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
- uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2
|
||||
with:
|
||||
api-level: ${{ matrix.api }}
|
||||
arch: x86_64
|
||||
target: google_apis
|
||||
disable-animations: true
|
||||
script: |
|
||||
bash android/gradlew -p android connectedDebugAndroidTest
|
||||
python3 scripts/verify-test-results.py android/app/build/outputs/androidTest-results/connected/debug --minimum 6
|
||||
python3 scripts/test-integration.py "$RUNNER_TEMP/upstream" --android
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
if: always()
|
||||
with:
|
||||
name: android-device-test-reports-${{ matrix.api }}
|
||||
path: android/app/build/reports/androidTests/
|
||||
retention-days: 14
|
||||
@@ -1,39 +0,0 @@
|
||||
name: iOS validation
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: read
|
||||
concurrency:
|
||||
group: ios-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
simulator:
|
||||
runs-on: macos-15
|
||||
timeout-minutes: 35
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
- name: Install verified XcodeGen and generate project
|
||||
run: |
|
||||
bash scripts/install-xcodegen.sh "$RUNNER_TEMP/xcodegen"
|
||||
"$RUNNER_TEMP/xcodegen/xcodegen/bin/xcodegen" generate --spec ios/project.yml
|
||||
xcodebuild -version
|
||||
- name: Portable URL policy tests and Swift syntax
|
||||
run: |
|
||||
swift test --package-path ios
|
||||
swiftc -frontend -parse ios/Sources/*.swift ios/Tests/*.swift ios/UITests/*.swift
|
||||
- name: Simulator build and XCTest (no production signing)
|
||||
run: |
|
||||
device=$(python3 scripts/select-simulator.py)
|
||||
xcodebuild -project ios/Yuvomi.xcodeproj -scheme Yuvomi -destination "platform=iOS Simulator,id=$device" -derivedDataPath "$RUNNER_TEMP/DerivedData" -resultBundlePath "$RUNNER_TEMP/Simulator.xcresult" CODE_SIGNING_ALLOWED=NO test
|
||||
- name: Unsigned device archive validation
|
||||
run: xcodebuild -project ios/Yuvomi.xcodeproj -scheme Yuvomi -destination 'generic/platform=iOS' -archivePath "$RUNNER_TEMP/Yuvomi-unsigned.xcarchive" CODE_SIGNING_ALLOWED=NO archive
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
if: always()
|
||||
with:
|
||||
name: ios-unsigned-archive-and-test-results
|
||||
path: |
|
||||
${{ runner.temp }}/Simulator.xcresult
|
||||
${{ runner.temp }}/Yuvomi-unsigned.xcarchive
|
||||
retention-days: 14
|
||||
@@ -1,48 +0,0 @@
|
||||
name: Maintainer release build (never publishes)
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
sign_android:
|
||||
description: Sign APK and AAB using the protected release environment
|
||||
type: boolean
|
||||
default: false
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-24.04
|
||||
environment: release
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
- uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '17'
|
||||
- run: bash android/gradlew -p android testDebugUnitTest lintRelease assembleRelease bundleRelease
|
||||
- name: Sign with maintainer-supplied credentials
|
||||
if: inputs.sign_android
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
|
||||
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
umask 077
|
||||
test -n "$KEYSTORE_BASE64" && test -n "$STORE_PASSWORD" && test -n "$KEY_PASSWORD" && test -n "$KEY_ALIAS"
|
||||
trap 'rm -f "$RUNNER_TEMP/release.jks"' EXIT
|
||||
printf '%s' "$KEYSTORE_BASE64" | base64 --decode > "$RUNNER_TEMP/release.jks"
|
||||
tools="$ANDROID_HOME/build-tools/36.0.0"
|
||||
"$tools/zipalign" -p -f 4 android/app/build/outputs/apk/release/app-release-unsigned.apk "$RUNNER_TEMP/aligned.apk"
|
||||
"$tools/apksigner" sign --ks "$RUNNER_TEMP/release.jks" --ks-key-alias "$KEY_ALIAS" --ks-pass env:STORE_PASSWORD --key-pass env:KEY_PASSWORD --out android/app/build/outputs/apk/release/yuvomi-release-signed.apk "$RUNNER_TEMP/aligned.apk"
|
||||
"$tools/apksigner" verify --verbose android/app/build/outputs/apk/release/yuvomi-release-signed.apk
|
||||
jarsigner -keystore "$RUNNER_TEMP/release.jks" -storepass:env STORE_PASSWORD -keypass:env KEY_PASSWORD android/app/build/outputs/bundle/release/app-release.aab "$KEY_ALIAS"
|
||||
jarsigner -verify android/app/build/outputs/bundle/release/app-release.aab
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
with:
|
||||
name: maintainer-android-release-builds
|
||||
path: |
|
||||
android/app/build/outputs/apk/release/*.apk
|
||||
android/app/build/outputs/bundle/release/*.aab
|
||||
retention-days: 7
|
||||
Reference in new issue
Block a user