-
-
Notifications
You must be signed in to change notification settings - Fork 7
173 lines (144 loc) · 5.64 KB
/
build-artifact-windows.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
on:
workflow_call:
inputs:
godot_tag:
required: true
type: string
godot_version:
required: true
type: string
steamworks_sdk_tag:
required: true
type: string
secrets:
steamworks_sdk_repo:
required: true
steamworks_sdk_repo_token:
required: true
jobs:
build-windows:
runs-on: windows-latest
name: Windows ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Editor and Templates (64-bit)
bits: x86_64
cache-name: windows64
editor-name: godot.windows.editor.x86_64.exe
editor-name-new: godotsteam.${{ inputs.godot_version }}.editor.windows.64.exe
debug-name: godot.windows.template_debug.x86_64.exe
debug-name-new: godotsteam.${{ inputs.godot_version }}.debug.template.windows.64.exe
release-name: godot.windows.template_release.x86_64.exe
release-name-new: godotsteam.${{ inputs.godot_version }}.template.windows.64.exe
steam-redist: steam_api64.dll
steam-redist-bin: win64/
steam-redist-bits: 64
- name: Editor and Templates (32-bit)
bits: x86_32
cache-name: windows32
editor-name: godot.windows.editor.x86_32.exe
editor-name-new: godotsteam.${{ inputs.godot_version }}.editor.windows.32.exe
debug-name: godot.windows.template_debug.x86_32.exe
debug-name-new: godotsteam.${{ inputs.godot_version }}.debug.template.windows.32.exe
release-name: godot.windows.template_release.x86_32.exe
release-name-new: godotsteam.${{ inputs.godot_version }}.template.windows.32.exe
steam-redist: steam_api.dll
steam-redist-bin: ""
steam-redist-bits: 32
steps:
- uses: actions/checkout@v4
# Download Godot to start
- name: Download Godot
uses: ./.github/actions/download-godot
with:
version: ${{ inputs.godot_tag }}
# Preempt the missing bin folder
- name: Preempt missing Bin Folder
shell: bash
run: |
mkdir ./bin/
# Download GodotSteam Server
- name: Download GodotSteam Server
uses: ./.github/actions/download-godotsteam
# Download Steamworks SDK
- name: Download Steamworks SDK
uses: ./.github/actions/download-steamworks
with:
path: "steamworks"
repository: ${{ secrets.steamworks_sdk_repo }}
token: ${{ secrets.steamworks_sdk_repo_token }}
ref: ${{ inputs.steamworks_sdk_tag }}
# Get that cache money
- name: Setup Build Cache
uses: ./.github/actions/setup-cache
with:
cache-name: ${{ matrix.cache-name }}
godot-base: inputs.godot_tag
continue-on-error: true
# Setup Python and SCONS
- name: Setup Python and SCONS
uses: ./.github/actions/setup-dependencies
# Apply ThorVG patch
- name: Apply ThorVG patch
shell: bash
run: |
mv -f ./.github/actions/helpers/tvgLock.h ./thirdparty/thorvg/src/common/
mv -f ./.github/actions/helpers/tvgTaskScheduler.h ./thirdparty/thorvg/src/renderer/
# Compiling editor
- name: ${{ matrix.bits }}-bit Editor Compilation
uses: ./.github/actions/build-godot
with:
sconsflags: arch=${{ matrix.bits }}
platform: windows
target: editor
binary: ${{ matrix.editor-name }}
export: ${{ matrix.editor-name-new }}
- name: Upload ${{ matrix.bits }}-bit Editor
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}-editor
path: ./bin/${{ matrix.editor-name-new }}
- name: Clear bin
shell: bash
run: |
rm -rf bin
# Compiling templates
- name: ${{ matrix.bits }}-bit Debug Template Compilation (target=template_debug)
uses: ./.github/actions/build-godot
with:
sconsflags: arch=${{ matrix.bits }}
platform: windows
target: template_debug
binary: ${{ matrix.debug-name }}
export: ${{ matrix.debug-name-new }}
- name: Upload ${{ matrix.bits }}-bit Debug Template
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}-debug-template
path: ./bin/${{ matrix.debug-name-new }}
- name: ${{ matrix.bits }}-bit Release Template Compilation (target=template_release)
uses: ./.github/actions/build-godot
with:
sconsflags: arch=${{ matrix.bits }} debug_symbols=no
platform: windows
target: template_release
binary: ${{ matrix.release-name }}
export: ${{ matrix.release-name-new }}
- name: Upload ${{ matrix.bits }}-bit Release Template
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}-release-template
path: ./bin/${{ matrix.release-name-new }}
- name: Clear bin
shell: bash
run: |
rm -rf bin
# Upload the Steam redistributable for packaging
- name: Upload Windows ${{ matrix.steam-redist-bits}}-bit Steam File
uses: ./.github/actions/upload-steam-redistributable
with:
name: windows${{ matrix.steam-redist-bits }}-steam
path: ${{ matrix.steam-redist-bin }}
redist: ${{ matrix.steam-redist }}