1
1
name : Continuous integration
2
2
on : [push, pull_request]
3
3
4
+ env :
5
+ # Only used for the cache key. Increment version to force clean build.
6
+ GODOT_BASE_BRANCH : master
7
+
8
+ concurrency :
9
+ group : ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
10
+ cancel-in-progress : true
11
+
4
12
jobs :
5
13
build :
6
14
name : ${{ matrix.name }}
@@ -14,54 +22,70 @@ jobs:
14
22
platform : linux
15
23
artifact-name : godot-cpp-linux-glibc2.27-x86_64-release
16
24
artifact-path : bin/libgodot-cpp.linux.release.x86_64.a
25
+ cache-name : linux-x86_64
17
26
18
27
- name : 🐧 Linux (GCC, Double Precision)
19
28
os : ubuntu-18.04
20
29
platform : linux
21
30
artifact-name : godot-cpp-linux-glibc2.27-x86_64-double-release
22
31
artifact-path : bin/libgodot-cpp.linux.release.x86_64.a
23
32
flags : float=64
33
+ cache-name : linux-x86_64-f64
24
34
25
35
- name : 🏁 Windows (x86_64, MSVC)
26
36
os : windows-2019
27
37
platform : windows
28
38
artifact-name : godot-cpp-windows-msvc2019-x86_64-release
29
39
artifact-path : bin/libgodot-cpp.windows.release.x86_64.lib
40
+ cache-name : windows-x86_64-msvc
30
41
31
42
- name : 🏁 Windows (x86_64, MinGW)
32
43
os : windows-2019
33
44
platform : windows
34
45
artifact-name : godot-cpp-linux-mingw-x86_64-release
35
46
artifact-path : bin/libgodot-cpp.windows.release.x86_64.a
36
47
flags : use_mingw=yes
48
+ cache-name : windows-x86_64-mingw
37
49
38
50
- name : 🍎 macOS (universal)
39
51
os : macos-11
40
52
platform : macos
41
53
artifact-name : godot-cpp-macos-universal-release
42
54
artifact-path : bin/libgodot-cpp.macos.release.universal.a
43
55
flags : arch=universal
56
+ cache-name : macos-universal
44
57
45
58
- name : 🤖 Android (arm64)
46
59
os : ubuntu-18.04
47
60
platform : android
48
61
artifact-name : godot-cpp-android-arm64-release
49
62
artifact-path : bin/libgodot-cpp.android.release.arm64.a
50
63
flags : ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
64
+ cache-name : android-arm64
51
65
52
66
- name : 🍏 iOS (arm64)
53
67
os : macos-11
54
68
platform : ios
55
69
artifact-name : godot-cpp-ios-arm64-release
56
70
artifact-path : bin/libgodot-cpp.ios.release.arm64.a
57
71
flags : arch=arm64
72
+ cache-name : ios-arm64
73
+
74
+ env :
75
+ SCONS_CACHE : ${{ github.workspace }}/.scons-cache/
58
76
59
77
steps :
60
78
- name : Checkout
61
79
uses : actions/checkout@v3
62
80
with :
63
81
submodules : recursive
64
82
83
+ - name : Setup Godot build cache
84
+ uses : ./.github/actions/godot-cache
85
+ with :
86
+ cache-name : ${{ matrix.cache-name }}
87
+ continue-on-error : true
88
+
65
89
- name : Set up Python (for SCons)
66
90
uses : actions/setup-python@v4
67
91
with :
83
107
84
108
- name : Build godot-cpp (debug)
85
109
run : |
86
- scons platform=${{ matrix.platform }} target=debug generate_bindings=yes ${{ matrix.flags }}
110
+ scons platform=${{ matrix.platform }} target=debug ${{ matrix.flags }}
87
111
88
112
- name : Build test without rebuilding godot-cpp (debug)
89
113
run : |
0 commit comments