Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Cleanup CI build configuration #768

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 22 additions & 50 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,57 +15,41 @@ jobs:
fail-fast: false
matrix:
include:
# - identifier: linux-debug
# name: 🐧 Linux (Debug)
# build_type: Debug
# runner: ubuntu-20.04
# target: template_debug
# platform: linux
# arch: x86_64
- identifier: linux-release
name: 🐧 Linux (Release)
name: 🐧 Linux
build_type: Release
runner: ubuntu-20.04
target: template_release
platform: linux
arch: x86_64
# - identifier: windows-debug
# name: 🪟 Windows (Debug)
# build_type: Debug
# runner: windows-latest
# target: template_debug
# platform: windows
# arch: x86_64

- identifier: windows-release
name: 🪟 Windows (Release)
name: 🪟 Windows
build_type: Release
runner: windows-latest
target: template_release
platform: windows
arch: x86_64
# - identifier: macos-debug
# name: 🍎 MacOS (Debug)
# build_type: Debug
# runner: macos-latest
# target: template_debug
# platform: macos

- identifier: macos-release
name: 🍎 MacOS (Release)
name: 🍎 MacOS
build_type: Release
runner: macos-latest
target: template_release
platform: macos

- identifier: android-arm64
name: 🤖 Android Arm64
name: 🤖 Android (arm64)
build_type: Release
runner: ubuntu-20.04
platform: android
platform: arm64-v8a
arch: arm64-v8a

- identifier: android-arm32
name: 🤖 Android Arm32
name: 🤖 Android (arm32)
build_type: Release
runner: ubuntu-20.04
platform: android
platform: armeabi-v7a
arch: armeabi-v7a

runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -97,31 +81,20 @@ jobs:
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps

- name: ccache (Linux/Mac)
- name: Install ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-${{ matrix.identifier }}

- name: Build Orchestrator (Linux/MacOS)
if: startsWith(matrix.identifier, 'linux-') || startsWith(matrix.identifier, 'macos-')
- name: Generate Build Files (${{ matrix.identifier }})
shell: sh
run: |
cmake -B ${{ github.workspace }}/.out-${{ matrix.identifier }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -S ${{ github.workspace }} -G Ninja
cmake --build ${{ github.workspace }}/.out-${{ matrix.identifier }} --target orchestrator -j 18
cmake -B '${{ github.workspace }}/.out-${{ matrix.identifier }}' --preset ${{ matrix.platform }} -S '${{ github.workspace }}'

- name: Build Orchestrator (Windows)
if: startsWith(matrix.identifier, 'windows-')
shell: bash
run: |
cmake -B '${{ github.workspace }}/.out-${{ matrix.identifier }}' -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -S '${{ github.workspace }}' -G Ninja
cmake --build '${{ github.workspace }}/.out-${{ matrix.identifier }}' --target orchestrator -j 18

- name: Build Orchestrator (Android)
if: startsWith(matrix.identifier, 'android-')
- name: Build Orchestrator (${{ matrix.identifier }})
shell: sh
run: |
cmake -B ${{ github.workspace }}/.out-${{ matrix.identifier }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_ANDROID_ARCH_ABI=${{ matrix.arch }} -DANDROID_ABI=${{ matrix.arch }} -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 -DANDROID_PLATFORM=android-23 -DANDROID_TOOLCHAIN=clang -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -S ${{ github.workspace }}
cmake --build ${{ github.workspace }}/.out-${{ matrix.identifier }} --target orchestrator -j 18
cmake --build '${{ github.workspace }}/.out-${{ matrix.identifier }}' --target orchestrator -j 18

- name: Prepare addon files
shell: bash
Expand Down Expand Up @@ -166,13 +139,12 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-plugin
retention-days: 1
retention-days: 7
path: |
${{ github.workspace }}

# - name: Remove Transient Artifacts
# uses: geekyeggo/delete-artifact@v4
# with:
# name: |
# ${{ github.event.repository.name}}-plugin-*
# failOnError: false
- name: Delete Incremental Plugin Artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: |
godot-orchestrator-plugin-*
130 changes: 35 additions & 95 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,118 +28,58 @@
}
},
{
"name": "msvc",
"inherits": "default",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl",
"VCPKG_TARGET_TRIPLET": "x64-windows-static-md"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"displayName": "MSVC Debug",
"name": "msvc-debug",
"inherits": "msvc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"displayName": "MSVC Release",
"name": "msvc-release",
"inherits": "msvc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"displayName": "MSVC RelWithDebInfo",
"name": "msvc-relwdebinfo",
"inherits": "msvc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "gcc",
"inherits": "default",
"hidden": true,
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"displayName": "GCC Debug",
"name": "gcc-debug",
"inherits": "gcc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"displayName": "GCC Release",
"name": "gcc-release",
"inherits": "gcc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"displayName": "GCC RelWithDebInfo",
"name": "gcc-relwdebinfo",
"inherits": "gcc",
"name": "linux",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
}
},
{
"name": "clang",
"inherits": "default",
"hidden": true,
"name": "windows",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
},
"condition": {
"type": "notEquals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl"
}
},
{
"displayName": "Clang Debug",
"name": "clang-debug",
"inherits": "clang",
"name": "macos",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
}
},
{
"displayName": "Clang Release",
"name": "clang-release",
"inherits": "clang",
"name": "arm64-v8a",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_ANDROID_ARCH_ABI": "arm64-v8a",
"ANDROID_ABI": "arm64-v8a",
"CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_NDK}/build/cmake/android.toolchain.cmake",
"ANDROID_TOOLCHAIN_NAME": "arm-linux-androideabi-4.9",
"ANDROID_PLATFORM": "android-23",
"ANDROID_TOOLCHAIN": "clang",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
}
},
{
"displayName": "Clang RelWithDebInfo",
"name": "clang-relwdebinfo",
"inherits": "clang",
"name": "armeabi-v7a",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_ANDROID_ARCH_ABI": "armeabi-v7a",
"ANDROID_ABI": "armeabi-v7a",
"CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_NDK}/build/cmake/android.toolchain.cmake",
"ANDROID_TOOLCHAIN_NAME": "arm-linux-androideabi-4.9",
"ANDROID_PLATFORM": "android-23",
"ANDROID_TOOLCHAIN": "clang",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
}
}
]
Expand Down
Loading