@@ -2,9 +2,56 @@ 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+ godot_zip : Godot_v3.4-stable_linux_server.64.zip
18+ executable : Godot_v3.4-stable_linux_server.64
19+
20+ - name : 🏁 Windows (x86_64, MSVC)
21+ os : windows-2019
22+ platform : windows
23+ artifact-name : godot-cpp-windows-msvc2019-x86_64-release
24+ artifact-path : bin/libgodot-cpp.windows.release.64.lib
25+
26+ - name : 🏁 Windows (x86_64, MinGW)
27+ os : windows-2019
28+ platform : windows
29+ artifact-name : godot-cpp-linux-mingw-x86_64-release
30+ artifact-path : bin/libgodot-cpp.windows.release.64.a
31+ flags : use_mingw=yes
32+
33+ - name : 🍎 macOS (universal)
34+ os : macos-11
35+ platform : osx
36+ artifact-name : godot-cpp-macos-universal-release
37+ artifact-path : bin/libgodot-cpp.osx.release.universal.a
38+ flags : macos_arch=universal
39+ godot_zip : Godot_v3.4-stable_osx.universal.zip
40+ executable : Godot.app/Contents/MacOS/Godot
41+
42+ - name : 🤖 Android (arm64)
43+ os : ubuntu-18.04
44+ platform : android
45+ artifact-name : godot-cpp-android-arm64-release
46+ artifact-path : bin/libgodot-cpp.android.release.arm64v8.a
47+ flags : android_arch=arm64v8
48+
49+ - name : 🍏 iOS (arm64)
50+ os : macos-11
51+ platform : ios
52+ artifact-name : godot-cpp-ios-arm64-release
53+ artifact-path : bin/libgodot-cpp.ios.release.arm64.a
54+
855 steps :
956 - name : Checkout
1057 uses : actions/checkout@v2
@@ -16,135 +63,53 @@ jobs:
1663 with :
1764 python-version : ' 3.x'
1865
19- - name : Install dependencies
66+ - name : Linux dependencies
67+ if : ${{ matrix.platform == 'linux' }}
2068 run : |
2169 sudo apt-get update -qq
2270 sudo apt-get install -qqq build-essential pkg-config
23- python -m pip install scons
24- curl -LO https://downloads.tuxfamily.org/godotengine/3.4/Godot_v3.4-stable_linux_server.64.zip
25- unzip Godot_v3.4-stable_linux_server.64.zip
26-
27- - name : Build godot-cpp
28- run : |
29- scons target=release generate_bindings=yes -j $(nproc)
30-
31- - name : Upload artifact
32- uses : actions/upload-artifact@v2
33- with :
34- name : godot-cpp-linux-glibc2.27-x86_64-release
35- path : bin/libgodot-cpp.linux.release.64.a
36- if-no-files-found : error
3771
38- - name : Build test GDNative library
39- run : |
40- scons target=release platform=linux bits=64 -j $(nproc) -C test
41-
42- - name : Run test GDNative library
43- run : |
44- ./Godot_v3.4-stable_linux_server.64 --path test -s script.gd
45-
46- windows-msvc :
47- name : Build (Windows, MSVC)
48- runs-on : windows-2019
49- steps :
50- - name : Checkout
51- uses : actions/checkout@v2
52- with :
53- submodules : recursive
54-
55- - name : Set up Python (for SCons)
56- uses : actions/setup-python@v2
57- with :
58- python-version : ' 3.x'
59-
60- - name : Install dependencies
72+ - name : Install scons
6173 run : |
6274 python -m pip install scons
6375
64- - name : Build godot-cpp
65- run : |
66- scons target=release generate_bindings=yes -j $env:NUMBER_OF_PROCESSORS
67-
68- - name : Upload artifact
69- uses : actions/upload-artifact@v2
70- with :
71- name : godot-cpp-windows-msvc2019-x86_64-release
72- path : bin/libgodot-cpp.windows.release.64.lib
73- if-no-files-found : error
74-
75- windows-mingw :
76- name : Build (Windows, MinGW)
77- runs-on : windows-2019
78- steps :
79- - name : Checkout
80- uses : actions/checkout@v2
81- with :
82- submodules : recursive
83-
84- - name : Set up Python (for SCons)
85- uses : actions/setup-python@v2
86- with :
87- python-version : ' 3.x'
88-
89- - name : Install dependencies
90- run : |
91- python -m pip install scons
92-
93- - name : Build godot-cpp
76+ - name : Windows GCC dependency
77+ if : ${{ matrix.platform == 'windows' }}
9478 # Install GCC from Scoop as the default supplied GCC doesn't work ("Error 1").
9579 run : |
9680 Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
9781 scoop install gcc
9882 g++ --version
9983 gcc --version
100- scons target=release generate_bindings=yes use_mingw=yes -j $env:NUMBER_OF_PROCESSORS
10184
102- - name : Upload artifact
103- uses : actions/upload-artifact@v2
104- with :
105- name : godot-cpp-linux-mingw-x86_64-release
106- path : bin/libgodot-cpp.windows.release.64.a
107- if-no-files-found : error
108-
109- macos :
110- name : Build (macOS, Clang)
111- runs-on : macos-11
112- steps :
113- - name : Checkout
114- uses : actions/checkout@v2
115- with :
116- submodules : recursive
85+ - name : Build godot-cpp (debug)
86+ run : |
87+ scons platform=${{ matrix.platform }} target=debug generate_bindings=yes ${{ matrix.flags }} -j2
11788
118- - name : Set up Python (for SCons )
119- uses : actions/setup-python@v2
120- with :
121- python-version : ' 3.x '
89+ - name : Build test without rebuilding godot-cpp (debug )
90+ run : |
91+ cd test
92+ scons platform=${{ matrix.platform }} target=debug ${{ matrix.flags }} build_library=no -j2
12293
123- - name : Install dependencies
94+ - name : Build test and godot-cpp (release)
12495 run : |
125- python -m pip install scons
126- curl -LO https://downloads.tuxfamily.org/godotengine/3.4/Godot_v3.4-stable_osx.universal.zip
127- unzip Godot_v3.4-stable_osx.universal.zip
96+ cd test
97+ scons platform=${{ matrix.platform }} target=release ${{ matrix.flags }} -j2
12898
129- - name : Build godot-cpp
99+ - name : Run test GDNative library
100+ if : ${{ matrix.platform == 'linux' || matrix.platform == 'osx' }}
130101 run : |
131- scons target=release generate_bindings=yes -j $(sysctl -n hw.logicalcpu)
102+ curl -LO https://downloads.tuxfamily.org/godotengine/3.4/${{ matrix.godot_zip }}
103+ unzip ${{ matrix.godot_zip }}
104+ ./${{ matrix.executable }} --path test -s script.gd
132105
133106 - name : Upload artifact
134107 uses : actions/upload-artifact@v2
135108 with :
136- name : godot-cpp-macos-universal-release
137- path : bin/libgodot-cpp.osx.release.64.a
109+ name : ${{ matrix.artifact-name }}
110+ path : ${{ matrix.artifact-path }}
138111 if-no-files-found : error
139112
140- - name : Build test GDNative library
141- run : |
142- scons target=release platform=osx bits=64 macos_arch=universal -j $(sysctl -n hw.logicalcpu) -C test
143-
144- - name : Run test GDNative library
145- run : |
146- ./Godot.app/Contents/MacOS/Godot --path test -s script.gd
147-
148113 static-checks :
149114 name : Static Checks (clang-format)
150115 runs-on : ubuntu-20.04
0 commit comments