1
1
name : 🔧 Build -> Package 📦
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
+
4
8
jobs :
5
9
static-checks :
6
10
name : 📊 Static Checks (clang-format, black format, file format)
7
11
runs-on : ubuntu-20.04
8
12
steps :
9
13
- name : Checkout
10
- uses : actions/checkout@v2
14
+ uses : actions/checkout@v3
11
15
12
16
- name : Install dependencies
13
17
run : |
@@ -42,48 +46,55 @@ jobs:
42
46
gdnative_flags : ' android_arch=x86_64'
43
47
sconsflags : ' '
44
48
os : ' ubuntu-20.04'
49
+ cache-name : android-x86_64
45
50
- platform : android
46
51
arch : ' arm64'
47
52
gdnative_flags : ' android_arch=arm64v8'
48
53
sconsflags : ' '
49
54
os : ' ubuntu-20.04'
55
+ cache-name : android-arm64
50
56
51
57
# iOS
52
58
- platform : ios
53
59
arch : ' x86_64'
54
60
gdnative_flags : ' ios_arch=x86_64'
55
61
sconsflags : ' ios_simulator=true'
56
62
os : ' macos-latest'
63
+ cache-name : ios-x86_64-simulator
57
64
- platform : ios
58
65
arch : ' arm64'
59
66
gdnative_flags : ' ios_arch=arm64'
60
67
sconsflags : ' '
61
68
os : ' macos-11'
62
-
69
+ cache-name : ios-arm64
63
70
64
71
# Linux
65
72
- platform : linux
66
73
arch : ' x86_32'
67
74
gdnative_flags : ' bits=32'
68
75
sconsflags : ' '
69
76
os : ' ubuntu-20.04'
77
+ cache-name : linux-x86_32
70
78
- platform : linux
71
79
arch : ' x86_64'
72
80
gdnative_flags : ' bits=64'
73
81
sconsflags : ' '
74
82
os : ' ubuntu-20.04'
83
+ cache-name : linux-x86_64
75
84
76
85
# macOS
77
86
- platform : macos
78
87
arch : ' x86_64'
79
88
gdnative_flags : ' macos_arch=x86_64 bits=64'
80
89
sconsflags : ' '
81
90
os : ' macos-11'
91
+ cache-name : macos-x86_64
82
92
- platform : macos
83
93
gdnative_flags : ' macos_arch=arm64 bits=64'
84
94
arch : ' arm64'
85
95
sconsflags : ' '
86
96
os : ' macos-11'
97
+ cache-name : macos-arm64
87
98
88
99
# Windows
89
100
- platform : windows
@@ -92,25 +103,34 @@ jobs:
92
103
sconsflags : ' use_mingw=yes'
93
104
os : ' ubuntu-20.04'
94
105
msvc_arch : amd64_x86
106
+ cache-name : win-x86_32
95
107
- platform : windows
96
108
arch : ' x86_64'
97
109
gdnative_flags : ' bits=64'
98
110
sconsflags : ' use_mingw=yes'
99
111
os : ' ubuntu-20.04'
100
112
msvc_arch : amd64
113
+ cache-name : win-x86_64
101
114
102
115
env :
116
+ SCONS_CACHE : ${{ github.workspace }}/.scons-cache/
103
117
SCONSFLAGS : ${{ matrix.sconsflags }} platform=${{ matrix.platform }} arch=${{ matrix.arch }} --jobs=2
104
118
105
119
defaults :
106
120
run :
107
121
shell : bash
108
122
109
123
steps :
110
- - uses : actions/checkout@v2
124
+ - uses : actions/checkout@v3
111
125
with :
112
126
submodules : recursive
113
127
128
+ - name : Setup Godot build cache
129
+ uses : ./godot-cpp/.github/actions/godot-cache
130
+ with :
131
+ cache-name : ${{ matrix.cache-name }}
132
+ continue-on-error : true
133
+
114
134
- name : Install Windows build dependencies
115
135
if : ${{ matrix.platform == 'windows' }}
116
136
run : |
@@ -129,7 +149,7 @@ jobs:
129
149
sudo apt-get install build-essential gcc-multilib g++-multilib
130
150
131
151
- name : Set up Python 3.x
132
- uses : actions/setup-python@v2
152
+ uses : actions/setup-python@v4
133
153
with :
134
154
python-version : ' 3.x'
135
155
architecture : ' x64'
@@ -168,7 +188,7 @@ jobs:
168
188
needs : build
169
189
runs-on : " ubuntu-latest"
170
190
steps :
171
- - uses : actions/checkout@v2
191
+ - uses : actions/checkout@v3
172
192
with :
173
193
submodules : recursive
174
194
0 commit comments