Skip to content

Commit

Permalink
CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mefiresu committed Aug 27, 2024
1 parent 471ee4f commit de3f15e
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 65 deletions.
182 changes: 119 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,80 +20,136 @@ env:
GENERAL_LINUX_FLAGS: "-DCMAKE_CXX_FLAGS='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0'"

jobs:
v5-windows:
runs-on: windows-latest
# v5-windows:
# runs-on: windows-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Install dependencies
# run: vcpkg install libtheora libogg --triplet=x86-windows-static
# - name: Build RSDKv5 + U
# run: |
# cmake -B build_v5 ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN32_FLAGS}} ${{env.V5_FLAGS}}
# cmake --build build_v5 --parallel --config Release
# cmake -B build_v5U ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN32_FLAGS}} ${{env.V5U_FLAGS}}
# cmake --build build_v5U --parallel --config Release
# - name: Move artifacts
# run: |
# mkdir artifacts
# mv ./build_*/Release/*.exe ./artifacts
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: v5-windows
# path: artifacts
# v5-windows-x64:
# runs-on: windows-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Install dependencies
# run: vcpkg install libtheora libogg --triplet=x64-windows-static
# - name: Build RSDKv5 + U
# run: |
# cmake -B build_v5 ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN64_FLAGS}} ${{env.V5_FLAGS}}
# cmake --build build_v5 --parallel --config Release
# cmake -B build_v5U ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN64_FLAGS}} ${{env.V5U_FLAGS}}
# cmake --build build_v5U --parallel --config Release
# - name: Move artifacts
# run: |
# mkdir artifacts
# mv ./build_*/Release/*.exe ./artifacts
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: v5-windows-x64
# path: artifacts
# v5-linux:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install libogg-dev libtheora-dev libglew-dev libglfw3-dev
# - name: Build RSDKv5 + U OGL
# run: |
# cmake -B build_v5 ${{env.GENERAL_FLAGS}} ${{env.GENERAL_LINUX_FLAGS}} ${{env.V5_FLAGS}}
# cmake --build build_v5 --parallel
# cmake -B build_v5U ${{env.GENERAL_FLAGS}} ${{env.GENERAL_LINUX_FLAGS}} ${{env.V5U_FLAGS}}
# cmake --build build_v5U --parallel
# # tar the executables so that they don't lose exec permissions
# # see: https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
# - name: Move artifacts
# run: |
# mkdir artifacts
# mv ./build_*/RSDKv5* ./artifacts
# tar -czvf linux.tar.gz -C ./artifacts .
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: v5-linux
# path: linux.tar.gz
v5-android:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout RSDKv5
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: vcpkg install libtheora libogg --triplet=x86-windows-static
- name: Build RSDKv5 + U
run: |
cmake -B build_v5 ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN32_FLAGS}} ${{env.V5_FLAGS}}
cmake --build build_v5 --parallel --config Release
cmake -B build_v5U ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN32_FLAGS}} ${{env.V5U_FLAGS}}
cmake --build build_v5U --parallel --config Release
- name: Move artifacts
run: |
mkdir artifacts
mv ./build_*/Release/*.exe ./artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: v5-windows
path: artifacts
v5-windows-x64:
runs-on: windows-latest
steps:
- name: Checkout
- name: Checkout Sonic Mania
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: vcpkg install libtheora libogg --triplet=x64-windows-static
- name: Build RSDKv5 + U
run: |
cmake -B build_v5 ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN64_FLAGS}} ${{env.V5_FLAGS}}
cmake --build build_v5 --parallel --config Release
cmake -B build_v5U ${{env.GENERAL_FLAGS}} ${{env.GENERAL_WIN_FLAGS}} ${{env.WIN64_FLAGS}} ${{env.V5U_FLAGS}}
cmake --build build_v5U --parallel --config Release
- name: Move artifacts
run: |
mkdir artifacts
mv ./build_*/Release/*.exe ./artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
repository: "RSDKModding/Sonic-Mania-Decompilation"
path: "Sonic-Mania-Decompilation"
- name: Checkout Example-Mods
uses: actions/checkout@v4
with:
name: v5-windows-x64
path: artifacts
v5-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
repository: "RSDKModding/RSDKv5-Example-Mods"
path: "RSDKv5-Example-Mods"
- name: Checkout GameAPI
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
repository: "RSDKModding/RSDKv5-GameAPI"
path: "RSDKv5-GameAPI"
- name: Setup RSDKv5 dependencies
working-directory: ./dependencies/android
run: |
sudo apt-get update
sudo apt-get install libogg-dev libtheora-dev libglew-dev libglfw3-dev
- name: Build RSDKv5 + U OGL
curl -L -O https://downloads.xiph.org/releases/ogg/libogg-1.3.5.zip
curl -L -O https://downloads.xiph.org/releases/theora/libtheora-1.1.1.zip
unzip \*.zip
rm *.zip
rsync -ar libogg-*/* libogg
mv libtheora-* libtheora
- name: Setup RSDKv5 mods
run: |
cmake -B build_v5 ${{env.GENERAL_FLAGS}} ${{env.GENERAL_LINUX_FLAGS}} ${{env.V5_FLAGS}}
cmake --build build_v5 --parallel
cmake -B build_v5U ${{env.GENERAL_FLAGS}} ${{env.GENERAL_LINUX_FLAGS}} ${{env.V5U_FLAGS}}
cmake --build build_v5U --parallel
# tar the executables so that they don't lose exec permissions
# see: https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
- name: Move artifacts
rm Game
ln -s $PWD/RSDKv5-GameAPI RSDKv5-Example-Mods/ManiaTouchControls/GameAPI
ln -s $PWD/RSDKv5-GameAPI RSDKv5-Example-Mods/UltrawideMania/GameAPI
ln -s $PWD/Sonic-Mania-Decompilation Game
ln -s $PWD/RSDKv5-GameAPI GameAPI
ln -s $PWD/RSDKv5-Example-Mods/ManiaTouchControls MTC
ln -s $PWD/RSDKv5-Example-Mods/UltrawideMania UWM
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Build Mania+RSDKv5 Android
working-directory: ./android
run: |
mkdir artifacts
mv ./build_*/RSDKv5* ./artifacts
tar -czvf linux.tar.gz -C ./artifacts .
- name: Upload artifacts
./gradlew assemble --no-daemon -PABIFILTERS="armeabi-v7a;arm64-v8a" -PRETRO_DISABLE_PLUS
- name: Upload artifact Android
uses: actions/upload-artifact@v4
with:
name: v5-linux
path: linux.tar.gz
name: v5-android
path: ./android/app/build/outputs/apk/release/*.apk
8 changes: 6 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
apply plugin: 'com.android.application'

def autobuildFlag = false

android {
ndkVersion "24.0.8215888"
compileSdkVersion 33
Expand All @@ -9,12 +11,14 @@ android {
defaultConfig {
applicationId "org.rems.rsdkv5"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 33
versionCode 100
versionName "1.0.0"
if(project.hasProperty("RETRO_DISABLE_PLUS"))
autobuildFlag = true
externalNativeBuild {
cmake {
arguments = ["-DANDROID_STL=c++_shared", "-DPLATFORM=Android"]
arguments = ["-DANDROID_STL=c++_shared", "-DPLATFORM=Android", "-DRETRO_DISABLE_PLUS=$autobuildFlag"]
}
}
ndk {
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
</activity>

<activity android:name=".RSDK"
android:exported="true"
android:icon="@mipmap/ic_launcher"
android:alwaysRetainTaskState="true"
android:launchMode="singleInstance"
Expand Down

0 comments on commit de3f15e

Please sign in to comment.