forked from godotengine/godot-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (119 loc) Β· 4.43 KB
/
ci-cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Continuous Integration (cmake)
on: [push, pull_request]
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.icon }} ${{ matrix.platform }}(${{matrix.arch}}, ${{ matrix.compiler }} ${{ matrix.extra_label }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
# runner: [ubuntu-20.04, windows-2019, macos-11]
# platform`: [android, ios, linux, macos, web, windows]
# arch: [arm32, arm64, ppc32, ppc64, rv64, wasm32, x86_32, x86_64]
# target: [editor, release]
# compiler: [gcc, clang, msvc, mingw]
# build_type: [release, debug]
# precision: [single, double]
# icon: [π§πππ€ππ]
include:
- runner: ubuntu-20.04
icon: π§
platform: linux
arch: x86_64
compiler: gcc
- runner: ubuntu-20.04
icon: π§
platform: linux
arch: x86_64
compiler: gcc
extra_label: double
extra_config: -DFLOAT_PRECISION:STRING=double
- runner: ubuntu-20.04
icon: π€
platform: android
arch: arm64
compiler: gcc
extra_config: -DCMAKE_TOOLCHAIN_FILE:PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME:STRING=arm-linux-androidabi-4.9
- runner: windows-2019
icon: π
platform: windows
arch: x86_64
compiler: msvc
- runner: windows-2019
icon: π
platform: windows
arch: x86_64
compiler: mingw
env:
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
EM_VERSION: 3.1.39
EM_CACHE_FOLDER: "emsdk-cache"
defaults:
if: ${{ matrix.compiler == 'mingw' }}
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# Install OS Level deps
- name: Install Linux Build Tools
if: ${{ matrix.runner == 'ubuntu-20.04' }}
run: |
sudo apt-get update -qq
sudo apt-get install -qqq build-essential pkg-config cmake ninja-build
- name: Install MSys2
if: ${{ matrix.runner == 'windows-2019' && matrix.compiler == 'mingw' }}
uses: msys2/setup-msys2@v2
with:
pacboy: >-
cmake:p
- name: Android dependencies
if: ${{ matrix.platform == 'android' }}
uses: nttld/setup-ndk@v1
with:
ndk-version: r23c
link-to-sdk: true
env:
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Web dependencies
if: ${{ matrix.platform == 'web' }}
uses: mymindstorm/setup-emsdk@v13
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
# Cmake configure and build godot-cpp
- name: Configure godot-cpp (Linux)
if: ${{ matrix.runner == 'ubuntu-20.04' }}
run:
cmake -DCMAKE_BUILD_TYPE=Release ${{ matrix.extra_config}} -GNinja .
- name: Configure godot-cpp (Windows, MSVC)
if: ${{ matrix.compiler == 'msvc' }}
run:
cmake -DCMAKE_BUILD_TYPE=Release ${{matrix.extra_config}} -G"Visual Studio 16 2019" .
- name: Configure godot-cpp (Windows, mingw)
if: ${{ matrix.compiler == 'mingw' }}
run:
cmake -DCMAKE_BUILD_TYPE=Release ${{matrix.extra_config}} -G"Visual Studio 16 2019" .
- name: Build godot-cpp
run:
cmake --build . -j $(nproc) --verbose
# Configure and build test extension
- name: Configure godot-cpp/test (Linux)
if: ${{ matrix.runner == 'ubuntu-20.04' }}
run:
cd test && cmake -DCMAKE_BUILD_TYPE=Release -DGODOT_HEADERS_PATH="../godot-headers" -DCPP_BINDINGS_PATH=".." -GNinja .
- name: Configure godot-cpp/test (Windows)
if: ${{ matrix.compiler == 'msvc' }}
run:
cd test && cmake -DCMAKE_BUILD_TYPE=Release -DGODOT_HEADERS_PATH="../godot-headers" -DCPP_BINDINGS_PATH=".." -G"Visual Studio 16 2019" .
- name: Build godot-cpp/test
run: |
cmake --build . -j $(nproc) --verbose