looper/.forgejo/workflows/compile.yaml

71 lines
2.4 KiB
YAML
Raw Normal View History

2023-07-15 17:31:33 -07:00
name: Build
run-name: Build the project
on: [push]
jobs:
2024-10-19 16:37:43 -07:00
build-appimage:
runs-on: ubuntu-latest
2023-07-15 17:31:33 -07:00
steps:
- name: Check out repository code
uses: actions/checkout@v3
2023-07-15 18:46:18 -07:00
with:
submodules: recursive
2023-07-23 20:58:59 -07:00
ref: main
2023-07-21 09:47:08 -07:00
fetch-depth: 0
2023-07-18 20:43:45 -07:00
- name: Install system dependencies
2024-10-19 16:37:43 -07:00
run: apt update && apt install -y wget python3 python3-pip
- name: Install Python dependencies via pip
run: python -m venv venv && ./venv/bin/pip install pylddwrap
2023-07-18 20:43:45 -07:00
- name: Build project
2024-10-19 16:37:43 -07:00
run: ./build-appimage.sh
2024-10-19 16:43:58 -07:00
- name: Upload artifact
uses: actions/upload-artifact@v3
2024-10-19 16:37:43 -07:00
with:
name: build
path: build/Looper.AppImage
build-gentoo:
runs-on: gentoo
2024-10-19 16:37:43 -07:00
steps:
- name: Stop GPG from erroring out
run: pkill gpg || true; rm -f ~/.gnupg/public-keys.d/*.lock || true
2024-10-19 16:37:43 -07:00
- name: Build binary package
run: emerge -v media-sound/looper
build-android:
2024-10-20 09:48:01 -07:00
runs-on: ubuntu-latest
2024-10-19 16:37:43 -07:00
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive
ref: main
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v2.0.10
- name: Fix vgmstream repo
run: ./setup.sh
2024-10-19 16:37:43 -07:00
- name: Build Debug apk
run: ./setup-android-build.sh && cd sdl-android-project && ./gradlew assembleDebug --stacktrace
- name: Build Debug bundle
run: cd sdl-android-project && ./gradlew bundleDebug --stacktrace
- name: Get debug file aab path
id: debugAab
run: echo "aabfile=$(find sdl-android-project/app/build/outputs/bundle/debug/*.aab)" >> $GITHUB_OUTPUT
- name: Get debug file apk path
id: debugApk
run: echo "apkfile=$(find sdl-android-project/app/build/outputs/apk/debug/*.apk)" >> $GITHUB_OUTPUT
- name: Zip Files
uses: papeloto/action-zip@v1
with:
files: ${{ steps.debugAab.outputs.aabfile }} ${{ steps.debugApk.outputs.apkfile }}
dest: ${{ steps.debugApk.outputs.apkfile }}.zip
- name: Upload Debug build to Artifacts
uses: actions/upload-artifact@v3
with:
name: debug-artifacts
path: ${{ steps.debugApk.outputs.apkFile }}