Build Manager #70
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Manager | |
on: | |
push: | |
branches: [ "main", "ci", "test", "staging" ] | |
paths: | |
- '.github/workflows/build-manager.yml' | |
- 'manager/**' | |
- 'kernel/**' | |
- 'userspace/ksud/**' | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- 'manager/**' | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build-ksud: | |
strategy: | |
matrix: | |
include: | |
- target: aarch64-linux-android | |
os: ubuntu-latest | |
- target: x86_64-unknown-linux-musl # x86 Linux, keeping this so i can ksud in muh pc | |
os: ubuntu-latest | |
uses: ./.github/workflows/ksud.yml | |
with: | |
target: ${{ matrix.target }} | |
os: ${{ matrix.os }} | |
pack_lkm: false | |
build-manager: | |
needs: build-ksud | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./manager | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup need_upload | |
id: need_upload | |
run: | | |
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then | |
echo "UPLOAD=true" >> $GITHUB_OUTPUT | |
else | |
echo "UPLOAD=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Write key | |
if: ${{ ( github.event_name != 'pull_request' ) || github.ref_type == 'tag' }} | |
run: | | |
{ | |
echo KEYSTORE_PASSWORD='password' | |
echo KEY_ALIAS='alias' | |
echo KEY_PASSWORD='password' | |
echo KEYSTORE_FILE='dummy.keystore' | |
} >> gradle.properties | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Download arm64 ksud | |
uses: actions/download-artifact@v4 | |
with: | |
name: ksud-aarch64-linux-android | |
path: . | |
- name: Copy ksud to app jniLibs | |
run: | | |
mkdir -p app/src/main/jniLibs/arm64-v8a | |
cp -f ../aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud.so | |
- name: Build with Gradle | |
run: | | |
{ | |
echo 'org.gradle.parallel=true' | |
echo 'org.gradle.vfs.watch=true' | |
echo 'org.gradle.jvmargs=-Xmx2048m' | |
echo 'android.native.buildOutput=verbose' | |
} >> gradle.properties | |
sed -i 's/org.gradle.configuration-cache=true//g' gradle.properties | |
./gradlew clean assembleRelease | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
if: ${{ ( github.event_name != 'pull_request' ) || github.ref_type == 'tag' }} | |
with: | |
name: manager | |
path: manager/app/build/outputs/apk/release/*.apk | |
- name: Upload mappings | |
uses: actions/upload-artifact@v4 | |
if: ${{ ( github.event_name != 'pull_request' ) || github.ref_type == 'tag' }} | |
with: | |
name: "mappings" | |
path: "manager/app/build/outputs/mapping/release/" |