Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47a7e35fea | ||
|
|
8b485c0bad |
No files matched your search
@@ -7,30 +7,38 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
android:
|
android:
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 40
|
timeout-minutes: 40
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
github-server-url: https://gitea.twinpay.one
|
github-server-url: https://gitea.turkservis.online
|
||||||
- name: Set up Java 21
|
- name: Set up Java 21
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
- name: Set up Android SDK
|
- name: Set up Android SDK
|
||||||
shell: powershell
|
shell: bash
|
||||||
run: ./scripts/setup-android-ci.ps1
|
run: bash scripts/setup-android-ci.sh
|
||||||
- name: Test and build exact commit
|
- name: Test and build exact commit
|
||||||
shell: powershell
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = 'Stop'
|
set -euo pipefail
|
||||||
if ((git rev-parse HEAD).Trim() -ne $env:GITHUB_SHA) { throw 'Checkout SHA mismatch' }
|
test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
|
||||||
Get-CimInstance Win32_OperatingSystem | Select-Object TotalVisibleMemorySize, FreePhysicalMemory
|
uname -a
|
||||||
# A fresh runner compiles both variants from scratch. Keep their compiler
|
free -m
|
||||||
# heaps separate in time; the previous shared 2 GiB heap exhausted itself.
|
# One compiler process inside the server's bounded, serial CI runner.
|
||||||
$buildArgs = @('--no-daemon', '--console=plain', '--max-workers=1', '-Pkotlin.daemon.jvmargs=-Xmx4096m')
|
build_args=(--no-daemon --console=plain --max-workers=1
|
||||||
.\gradlew.bat testDebugUnitTest assembleDebug @buildArgs
|
'-Dorg.gradle.jvmargs=-Xmx2560m -Dfile.encoding=UTF-8'
|
||||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
'-Pkotlin.compiler.execution.strategy=in-process')
|
||||||
.\gradlew.bat compileReleaseKotlin @buildArgs
|
bash gradlew testDebugUnitTest assembleDebug "${build_args[@]}"
|
||||||
exit $LASTEXITCODE
|
bash gradlew compileReleaseKotlin "${build_args[@]}"
|
||||||
|
- name: Keep exact-commit APK and test reports
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: aiturk-android-${{ github.sha }}
|
||||||
|
if-no-files-found: error
|
||||||
|
path: |
|
||||||
|
app/build/outputs/apk/debug/app-debug.apk
|
||||||
|
app/build/reports/tests/testDebugUnitTest
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Linux CI on the TurkServis server; no workstation Android installation required.
|
||||||
|
set -euo pipefail
|
||||||
|
sdk_root="${RUNNER_TEMP:?}/android-sdk"
|
||||||
|
archive="${RUNNER_TEMP}/commandlinetools-linux-16111833.zip"
|
||||||
|
mkdir -p "$sdk_root/cmdline-tools" "$sdk_root/licenses"
|
||||||
|
curl --fail --location --retry 3 --max-time 300 \
|
||||||
|
https://dl.google.com/android/repository/commandlinetools-linux-16111833_latest.zip -o "$archive"
|
||||||
|
# Official checksum from Google's repository2-3.xml, cmdline-tools;latest, linux.
|
||||||
|
printf '%s %s\n' e025545c62a8e64c7559119566a569fb1dec5f60 "$archive" | sha1sum -c -
|
||||||
|
unzip -q "$archive" -d "$sdk_root/cmdline-tools"
|
||||||
|
mv "$sdk_root/cmdline-tools/cmdline-tools" "$sdk_root/cmdline-tools/latest"
|
||||||
|
cp scripts/android-licenses/android-sdk-license "$sdk_root/licenses/"
|
||||||
|
"$sdk_root/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$sdk_root" \
|
||||||
|
'platform-tools' 'platforms;android-37.0' 'build-tools;37.0.0'
|
||||||
|
test -f "$sdk_root/platforms/android-37.0/android.jar"
|
||||||
|
test -x "$sdk_root/build-tools/37.0.0/aapt2"
|
||||||
|
printf 'ANDROID_HOME=%s\nANDROID_SDK_ROOT=%s\n' "$sdk_root" "$sdk_root" >> "$GITHUB_ENV"
|
||||||
Reference in new issue
Block a user