@@ -2,9 +2,52 @@ name: Continuous integration
22on : [push, pull_request]
33
44jobs :
5- linux :
6- name : Build (Linux, GCC)
7- runs-on : ubuntu-18.04
5+ build :
6+ name : ${{ matrix.name }}
7+ runs-on : ${{ matrix.os }}
8+ strategy :
9+ fail-fast : false
10+ matrix :
11+ include :
12+ - name : 🐧 Linux (GCC)
13+ os : ubuntu-18.04
14+ platform : linux
15+ artifact-name : godot-cpp-linux-glibc2.27-x86_64-release
16+ artifact-path : bin/libgodot-cpp.linux.release.64.a
17+
18+ - name : 🏁 Windows (x86_64, MSVC)
19+ os : windows-2019
20+ platform : windows
21+ artifact-name : godot-cpp-windows-msvc2019-x86_64-release
22+ artifact-path : bin/libgodot-cpp.windows.release.64.lib
23+
24+ - name : 🏁 Windows (x86_64, MinGW)
25+ os : windows-2019
26+ platform : windows
27+ artifact-name : godot-cpp-linux-mingw-x86_64-release
28+ artifact-path : bin/libgodot-cpp.windows.release.64.a
29+ flags : use_mingw=yes
30+
31+ - name : 🍎 macOS (universal)
32+ os : macos-11
33+ platform : osx
34+ artifact-name : godot-cpp-macos-universal-release
35+ artifact-path : bin/libgodot-cpp.osx.release.universal.a
36+ flags : macos_arch=universal
37+
38+ - name : 🤖 Android (arm64)
39+ os : ubuntu-18.04
40+ platform : android
41+ artifact-name : godot-cpp-android-arm64-release
42+ artifact-path : bin/libgodot-cpp.android.release.arm64v8.a
43+ flags : android_arch=arm64v8
44+
45+ - name : 🍏 iOS (arm64)
46+ os : macos-11
47+ platform : ios
48+ artifact-name : godot-cpp-ios-arm64-release
49+ artifact-path : bin/libgodot-cpp.ios.release.arm64.a
50+
851 steps :
952 - name : Checkout
1053 uses : actions/checkout@v2
@@ -16,26 +59,44 @@ jobs:
1659 with :
1760 python-version : ' 3.x'
1861
19- - name : Install dependencies
62+ - name : Linux dependencies
63+ if : ${{ matrix.platform == 'linux' }}
2064 run : |
2165 sudo apt-get update -qq
2266 sudo apt-get install -qqq build-essential pkg-config
67+
68+ - name : Install scons
69+ run : |
2370 python -m pip install scons
2471
25- - name : Build godot-cpp
72+ - name : Windows GCC dependency
73+ if : ${{ matrix.platform == 'windows' }}
74+ # Install GCC from Scoop as the default supplied GCC doesn't work ("Error 1").
75+ run : |
76+ Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
77+ scoop install gcc
78+ g++ --version
79+ gcc --version
80+
81+ - name : Build godot-cpp (debug)
82+ run : |
83+ scons platform=${{ matrix.platform }} target=debug generate_bindings=yes ${{ matrix.flags }} -j2
84+
85+ - name : Build test without rebuilding godot-cpp (debug)
2686 run : |
27- scons target=release generate_bindings=yes -j $(nproc)
87+ cd test
88+ scons platform=${{ matrix.platform }} target=debug ${{ matrix.flags }} build_library=no -j2
2889
29- - name : Build test project
90+ - name : Build test and godot-cpp (release)
3091 run : |
3192 cd test
32- scons target=release -j $(nproc)
93+ scons platform=${{ matrix.platform }} target=release ${{ matrix.flags }} -j2
3394
3495 - name : Upload artifact
3596 uses : actions/upload-artifact@v2
3697 with :
37- name : godot-cpp-linux-glibc2.27-x86_64-release
38- path : bin/libgodot-cpp.linux.release.64.a
98+ name : ${{ matrix.artifact-name }}
99+ path : ${{ matrix.artifact-path }}
39100 if-no-files-found : error
40101
41102 linux-cmake :
@@ -86,110 +147,6 @@ jobs:
86147 cd test && cmake -DCMAKE_BUILD_TYPE=Release -GNinja .
87148 cmake --build . -j $(nproc)
88149
89- windows-msvc :
90- name : Build (Windows, MSVC)
91- runs-on : windows-2019
92- steps :
93- - name : Checkout
94- uses : actions/checkout@v2
95- with :
96- submodules : recursive
97-
98- - name : Set up Python (for SCons)
99- uses : actions/setup-python@v2
100- with :
101- python-version : ' 3.x'
102-
103- - name : Install dependencies
104- run : |
105- python -m pip install scons
106-
107- - name : Build godot-cpp
108- run : |
109- scons target=release generate_bindings=yes -j $env:NUMBER_OF_PROCESSORS
110-
111- - name : Build test project
112- run : |
113- cd test
114- scons target=release -j $env:NUMBER_OF_PROCESSORS
115-
116- - name : Upload artifact
117- uses : actions/upload-artifact@v2
118- with :
119- name : godot-cpp-windows-msvc2019-x86_64-release
120- path : bin/libgodot-cpp.windows.release.64.lib
121- if-no-files-found : error
122-
123- windows-mingw :
124- name : Build (Windows, MinGW)
125- runs-on : windows-2019
126- steps :
127- - name : Checkout
128- uses : actions/checkout@v2
129- with :
130- submodules : recursive
131-
132- - name : Set up Python (for SCons)
133- uses : actions/setup-python@v2
134- with :
135- python-version : ' 3.x'
136-
137- - name : Install dependencies
138- run : |
139- python -m pip install scons
140-
141- - name : Build godot-cpp
142- # Install GCC from Scoop as the default supplied GCC doesn't work ("Error 1").
143- run : |
144- Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
145- scoop install gcc
146- g++ --version
147- gcc --version
148- scons target=release generate_bindings=yes use_mingw=yes -j $env:NUMBER_OF_PROCESSORS
149-
150- # - name: Build test project (TODO currently not supported, leaving uncommented as a reminder to fix this)
151- # run: |
152- # cd test
153- # scons target=release use_mingw=yes -j $env:NUMBER_OF_PROCESSORS
154-
155- - name : Build test
156- run : |
157- scons platform=${{ matrix.platform }} target=release ${{ matrix.flags }} -j2 build_projects=test
158-
159- - name : Upload artifact
160- uses : actions/upload-artifact@v2
161- with :
162- name : godot-cpp-linux-mingw-x86_64-release
163- path : bin/libgodot-cpp.windows.release.64.a
164- if-no-files-found : error
165-
166- macos :
167- name : Build (macOS, Clang, universal / x86_64 + arm64)
168- runs-on : macos-11
169- steps :
170- - name : Checkout
171- uses : actions/checkout@v2
172- with :
173- submodules : recursive
174-
175- - name : Set up Python (for SCons)
176- uses : actions/setup-python@v2
177- with :
178- python-version : ' 3.x'
179-
180- - name : Install dependencies
181- run : |
182- python -m pip install scons
183-
184- - name : Build godot-cpp
185- run : |
186- scons target=release generate_bindings=yes -j $(sysctl -n hw.logicalcpu)
187-
188- - name : Build test project
189- run : |
190- cd test
191- scons target=release -j $(sysctl -n hw.logicalcpu)
192-
193150 static-checks :
194151 name : Static Checks (clang-format)
195152 runs-on : ubuntu-20.04
0 commit comments