looper/.forgejo/workflows/compile.yaml

91 lines
3.7 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
run: apt update && apt install -y wget python3 python3-pip python3-venv
2024-10-19 16:37:43 -07:00
- name: Install Python dependencies via pip
run: python3 -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
2024-10-20 10:19:04 -07:00
run: emerge -v media-sound/looper
2024-10-19 16:37:43 -07:00
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
2024-10-20 12:36:02 -07:00
uses: fam-tech/setup-java@v3
2024-10-19 16:37:43 -07:00
with:
distribution: 'temurin'
java-version: 17
- name: Setup Android SDK
uses: https://complecwaft.com/catmeow/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: https://complecwaft.com/catmeow/action-zip@v1
2024-10-19 16:37:43 -07:00
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 }}
2024-10-20 13:29:32 -07:00
build-windows:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive
ref: main
fetch-depth: 0
- name: Build protoc
run: ./build-protoc.sh
- name: Install MinGW compiler
run: apt-get install gcc-mingw-w64 g++-mingw-w64 -y
- name: Build with CMake
run: mkdir -p build-windows && cd build-windows && cmake .. -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-gcc -G Ninja -DDISABLE_GTK_UI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_LIBFMT=ON -DUSE_PORTALS=OFF -DENABLE_DBUS=OFF -DBUILD_STATIC=ON -DDOWNLOAD_AUDIO_CODECS_DEPENDENCY=ON -DSDL_MIXER_X_SHARED=OFF -DSDL_MIXER_X_STATIC=ON -DUSE_OGG_VORBIS_STB=ON -DUSE_OPUS=OFF -DUSE_MODPLUG=OFF -DUSE_GME=OFF -DUSE_WAVPACK=OFF -DUSE_XMP=OFF -DUSE_MIDI_EDMIDI=OFF -DUSE_SYSTEM_SDL2=OFF -DBUILD_PROTOC=OFF -DBUILD_SDL=ON -DBUILD_SDL_IMAGE=ON -DBUILD_JSONCPP=ON -DBUILD_SOUNDTOUCH=ON -DBUILD_PROTOBUF=ON -DDISABLE_IMGUI_UI=OFF && ninja && cd ..
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: windows-artifacts
path: build-windows/looper.exe