Merge branch '1.4.0-dev' of https://github.com/geode-sdk/geode into 1.4.0-dev

This commit is contained in:
altalk23 2023-10-15 19:40:26 +03:00
commit d7ea0a0eb3
3 changed files with 47 additions and 60 deletions

View file

@ -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

View file

@ -20,6 +20,7 @@ jobs:
- name: Windows - name: Windows
os: windows-latest os: windows-latest
id: win id: win
cli_id: win
extra_flags: -T host=x64 -A win32 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEODE_DEBUG=On extra_flags: -T host=x64 -A win32 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGEODE_DEBUG=On
# uncomment to use vs clang-cl and ninja # uncomment to use vs clang-cl and ninja
#extra_flags: > #extra_flags: >
@ -34,6 +35,7 @@ jobs:
- name: macOS - name: macOS
os: macos-latest os: macos-latest
id: mac id: mac
cli_id: mac
extra_flags: > extra_flags: >
-DCMAKE_C_COMPILER=clang -DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_COMPILER=clang++
@ -44,6 +46,21 @@ jobs:
package_cmd: './installer/mac/package.sh ./bin/nightly ./installer/mac/geode-installer-mac.pkg' package_cmd: './installer/mac/package.sh ./bin/nightly ./installer/mac/geode-installer-mac.pkg'
installer_path: './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
-DGEODE_DONT_BUILD_TEST_MODS=1
-G Ninja
cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode'
package_cmd: ''
installer_path: ''
name: Build ${{ matrix.config.name }} name: Build ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }} runs-on: ${{ matrix.config.os }}
@ -57,7 +74,7 @@ jobs:
uses: hendrikmuhs/ccache-action@v1 uses: hendrikmuhs/ccache-action@v1
with: with:
key: ${{ matrix.config.os }} key: ${{ matrix.config.os }}
if: matrix.config.id == 'mac' if: matrix.config.id != 'win'
- name: Setup MSVC - name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1.12.1 uses: ilammy/msvc-dev-cmd@v1.12.1
@ -65,22 +82,38 @@ jobs:
arch: amd64_x86 arch: amd64_x86
if: matrix.config.id == 'win' 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 == 'android'
- name: Download CLI - name: Download CLI
uses: robinraju/release-downloader@v1.8 uses: robinraju/release-downloader@v1.8
with: with:
repository: geode-sdk/cli repository: geode-sdk/cli
latest: true latest: true
fileName: '*-${{ matrix.config.id }}.zip' fileName: '*-${{ matrix.config.cli_id }}.zip'
tarBall: false tarBall: false
zipBall: false zipBall: false
out-file-path: "cli" out-file-path: "cli"
- name: Setup CLI - name: Setup CLI
run: | 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 }} ${{ matrix.config.cli_cmd }}
echo "${{ github.workspace }}/cli" >> $GITHUB_PATH 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 == 'android'
- name: Configure - name: Configure
run: > run: >
cmake -B ${{ github.workspace }}/build cmake -B ${{ github.workspace }}/build
@ -101,12 +134,14 @@ jobs:
- name: Package Installer - name: Package Installer
run: ${{ matrix.config.package_cmd }} run: ${{ matrix.config.package_cmd }}
if: matrix.config.id != 'android'
- name: Upload Installer - name: Upload Installer
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: geode-installer-${{ matrix.config.id }} name: geode-installer-${{ matrix.config.id }}
path: ${{ matrix.config.installer_path }} path: ${{ matrix.config.installer_path }}
if: matrix.config.id != 'android'
publish: publish:
name: Publish name: Publish
@ -146,6 +181,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 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 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 - name: Zip Resources
uses: vimtor/action-zip@v1.1 uses: vimtor/action-zip@v1.1
with: with:
@ -166,4 +207,5 @@ jobs:
./geode-installer-${{ steps.ref.outputs.hash }}-win.exe ./geode-installer-${{ steps.ref.outputs.hash }}-win.exe
./geode-${{ steps.ref.outputs.hash }}-mac.zip ./geode-${{ steps.ref.outputs.hash }}-mac.zip
./geode-${{ steps.ref.outputs.hash }}-win.zip ./geode-${{ steps.ref.outputs.hash }}-win.zip
./geode-${{ steps.ref.outputs.hash }}-android.zip
./resources.zip ./resources.zip

View file

@ -28,6 +28,7 @@ jobs:
mv dev/geode-installer-*-win.exe geode-installer-v${{ steps.ref.outputs.version }}-win.exe 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-*-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-*-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 mv dev/resources.zip resources.zip
- name: Create Draft Release - name: Create Draft Release
@ -48,4 +49,5 @@ jobs:
./geode-installer-v${{ steps.ref.outputs.version }}-win.exe ./geode-installer-v${{ steps.ref.outputs.version }}-win.exe
./geode-v${{ steps.ref.outputs.version }}-mac.zip ./geode-v${{ steps.ref.outputs.version }}-mac.zip
./geode-v${{ steps.ref.outputs.version }}-win.zip ./geode-v${{ steps.ref.outputs.version }}-win.zip
./geode-v${{ steps.ref.outputs.version }}-android.zip
./resources.zip ./resources.zip