From 0828aa19aca04c2bf6f79ed3d646b8c734ac126a Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sun, 15 Oct 2023 12:55:28 -0300 Subject: [PATCH 1/6] okay --- .github/workflows/build-android.yml | 57 ----------------------------- .github/workflows/build.yml | 44 ++++++++++++++++++++-- 2 files changed, 41 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/build-android.yml diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml deleted file mode 100644 index c74d522ae..000000000 --- a/.github/workflows/build-android.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Build Android - -on: - workflow_dispatch: - push: - branches: - - '**' # every branch - - '!no-build-**' # unless marked as no-build - -jobs: - build: - name: Build Android - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: r26b - add-to-path: false - - - name: Download CLI - uses: robinraju/release-downloader@v1.8 - with: - repository: geode-sdk/cli - latest: true - fileName: '*-linux.zip' - tarBall: false - zipBall: false - out-file-path: "cli" - - - name: Setup CLI - run: | - 7z x "${{ github.workspace }}/cli/*-linux.zip" -o"${{ github.workspace }}/cli" - chmod +x $GITHUB_WORKSPACE/cli/geode - echo "${{ github.workspace }}/cli" >> $GITHUB_PATH - - - name: Configure - env: - NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - ANDROID_ABI: armeabi-v7a - MIN_SDK_VERSION: 24 - run: | - sudo apt install ninja-build - cmake -DCMAKE_TOOLCHAIN_FILE=$NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=$ANDROID_ABI -DANDROID_PLATFORM=android-$MIN_SDK_VERSION -DCMAKE_BUILD_TYPE=Debug -DGEODE_DONT_BUILD_TEST_MODS=1 -G Ninja -B build - - - name: Build - run: | - cmake --build build --config Debug - - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: geode-android - path: ./bin/nightly/*.so diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0cdd5865..6932fe328 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - name: Windows os: windows-latest id: win + cli_id: win extra_flags: -T host=x64 -A win32 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEODE_DEBUG=On # uncomment to use vs clang-cl and ninja #extra_flags: > @@ -34,6 +35,7 @@ jobs: - name: macOS os: macos-latest id: mac + cli_id: mac extra_flags: > -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ @@ -43,6 +45,19 @@ jobs: cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode' package_cmd: './installer/mac/package.sh ./bin/nightly ./installer/mac/geode-installer-mac.pkg' installer_path: './installer/mac/geode-installer-mac.pkg' + + - name: Android + os: ubuntu-latest + id: android + cli_id: linux + extra_flags: > + -DCMAKE_TOOLCHAIN_FILE=$NDK_HOME/build/cmake/android.toolchain.cmake + -DANDROID_ABI=$ANDROID_ABI + -DANDROID_PLATFORM=android-$MIN_SDK_VERSION + cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode' + package_cmd: '' + installer_path: '' + name: Build ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} @@ -57,7 +72,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1 with: key: ${{ matrix.config.os }} - if: matrix.config.id == 'mac' + if: matrix.config.id != 'win' - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1.12.1 @@ -65,22 +80,38 @@ jobs: arch: amd64_x86 if: matrix.config.id == 'win' + - name: Setup NDK + uses: nttld/setup-ndk@v1 + id: setup-ndk + with: + ndk-version: r26b + add-to-path: false + if: matrix.config.id == 'linux' + - name: Download CLI uses: robinraju/release-downloader@v1.8 with: repository: geode-sdk/cli latest: true - fileName: '*-${{ matrix.config.id }}.zip' + fileName: '*-${{ matrix.config.cli_id }}.zip' tarBall: false zipBall: false out-file-path: "cli" - name: Setup CLI run: | - 7z x "${{ github.workspace }}/cli/*-${{ matrix.config.id }}.zip" -o"${{ github.workspace }}/cli" + 7z x "${{ github.workspace }}/cli/*-${{ matrix.config.cli_id }}.zip" -o"${{ github.workspace }}/cli" ${{ matrix.config.cli_cmd }} echo "${{ github.workspace }}/cli" >> $GITHUB_PATH + - name: Setup Android Env + run: | + echo "NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV" + echo "ANDROID_ABI=armeabi-v7a" >> "$GITHUB_ENV" + echo "MIN_SDK_VERSION=24" >> "$GITHUB_ENV" + # sudo apt install ninja-build + if: matrix.config.id == 'linux' + - name: Configure run: > cmake -B ${{ github.workspace }}/build @@ -146,6 +177,12 @@ jobs: files: geode-win/XInput9_1_0.dll geode-win/Geode.dll geode-win/GeodeUpdater.exe geode-win/Geode.lib geode-win/Geode.pdb dest: geode-${{ steps.ref.outputs.hash }}-win.zip + - name: Zip Android Artifacts + uses: vimtor/action-zip@v1.1 + with: + files: geode-android/Geode.so + dest: geode-${{ steps.ref.outputs.hash }}-android.zip + - name: Zip Resources uses: vimtor/action-zip@v1.1 with: @@ -166,4 +203,5 @@ jobs: ./geode-installer-${{ steps.ref.outputs.hash }}-win.exe ./geode-${{ steps.ref.outputs.hash }}-mac.zip ./geode-${{ steps.ref.outputs.hash }}-win.zip + ./geode-${{ steps.ref.outputs.hash }}-android.zip ./resources.zip From 507a1045a39987ddd7b8baf9e84991570737fa2e Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sun, 15 Oct 2023 12:57:08 -0300 Subject: [PATCH 2/6] okay i guess --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6932fe328..3f9804af6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,7 +86,7 @@ jobs: with: ndk-version: r26b add-to-path: false - if: matrix.config.id == 'linux' + if: matrix.config.id == 'android' - name: Download CLI uses: robinraju/release-downloader@v1.8 @@ -110,7 +110,7 @@ jobs: echo "ANDROID_ABI=armeabi-v7a" >> "$GITHUB_ENV" echo "MIN_SDK_VERSION=24" >> "$GITHUB_ENV" # sudo apt install ninja-build - if: matrix.config.id == 'linux' + if: matrix.config.id == 'android' - name: Configure run: > From a44a1b8e5b5c77b565851a21dc7e1c9406fe54e6 Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sun, 15 Oct 2023 13:04:06 -0300 Subject: [PATCH 3/6] fine i will try ninja --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f9804af6..6178857d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,6 +54,7 @@ jobs: -DCMAKE_TOOLCHAIN_FILE=$NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=$ANDROID_ABI -DANDROID_PLATFORM=android-$MIN_SDK_VERSION + -G Ninja cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode' package_cmd: '' installer_path: '' @@ -109,7 +110,7 @@ jobs: echo "NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV" echo "ANDROID_ABI=armeabi-v7a" >> "$GITHUB_ENV" echo "MIN_SDK_VERSION=24" >> "$GITHUB_ENV" - # sudo apt install ninja-build + sudo apt install ninja-build if: matrix.config.id == 'android' - name: Configure From 1c75b7dfe14e276eac286213eaad9e8437d1f675 Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sun, 15 Oct 2023 13:18:18 -0300 Subject: [PATCH 4/6] will this work.. --- .github/workflows/draft.yml | 2 ++ loader/test/dependency/mod.json | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml index d6051f79d..f6bc76049 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/draft.yml @@ -28,6 +28,7 @@ jobs: mv dev/geode-installer-*-win.exe geode-installer-v${{ steps.ref.outputs.version }}-win.exe mv dev/geode-*-mac.zip geode-v${{ steps.ref.outputs.version }}-mac.zip mv dev/geode-*-win.zip geode-v${{ steps.ref.outputs.version }}-win.zip + mv dev/geode-*-android.zip geode-v${{ steps.ref.outputs.version }}-android.zip mv dev/resources.zip resources.zip - name: Create Draft Release @@ -48,4 +49,5 @@ jobs: ./geode-installer-v${{ steps.ref.outputs.version }}-win.exe ./geode-v${{ steps.ref.outputs.version }}-mac.zip ./geode-v${{ steps.ref.outputs.version }}-win.zip + ./geode-v${{ steps.ref.outputs.version }}-android.zip ./resources.zip diff --git a/loader/test/dependency/mod.json b/loader/test/dependency/mod.json index 934cfc86d..f346a56d5 100644 --- a/loader/test/dependency/mod.json +++ b/loader/test/dependency/mod.json @@ -5,9 +5,6 @@ "name": "Geode Test Dependency", "developer": "Geode Team", "description": "Unit test dependency for Geode", - "api": { - "include": [] - }, "settings": { "its-raining-after-all": { "type": "bool", From 1f522285dc51716aa8867cf8f57dd862aaf619a5 Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sun, 15 Oct 2023 13:23:45 -0300 Subject: [PATCH 5/6] ok whatever just dont build em --- .github/workflows/build.yml | 1 + loader/test/dependency/mod.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6178857d1..ca8f4ff69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,6 +54,7 @@ jobs: -DCMAKE_TOOLCHAIN_FILE=$NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=$ANDROID_ABI -DANDROID_PLATFORM=android-$MIN_SDK_VERSION + -DGEODE_DONT_BUILD_TEST_MODS=1 -G Ninja cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode' package_cmd: '' diff --git a/loader/test/dependency/mod.json b/loader/test/dependency/mod.json index f346a56d5..934cfc86d 100644 --- a/loader/test/dependency/mod.json +++ b/loader/test/dependency/mod.json @@ -5,6 +5,9 @@ "name": "Geode Test Dependency", "developer": "Geode Team", "description": "Unit test dependency for Geode", + "api": { + "include": [] + }, "settings": { "its-raining-after-all": { "type": "bool", From b3ec77acb8da96b0a4987004c3e33bcf54ca1c75 Mon Sep 17 00:00:00 2001 From: mat <26722564+matcool@users.noreply.github.com> Date: Sun, 15 Oct 2023 13:27:42 -0300 Subject: [PATCH 6/6] no installer for you --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca8f4ff69..fd54c88e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,12 +134,14 @@ jobs: - name: Package Installer run: ${{ matrix.config.package_cmd }} + if: matrix.config.id != 'android' - name: Upload Installer uses: actions/upload-artifact@v3 with: name: geode-installer-${{ matrix.config.id }} path: ${{ matrix.config.installer_path }} + if: matrix.config.id != 'android' publish: name: Publish