-
Notifications
You must be signed in to change notification settings - Fork 111
98 lines (82 loc) · 2.92 KB
/
windows_builds_deployment.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
name: 🏁 Windows Builds
on: push
# on:
# push:
# paths:
# - godot-engine/**
defaults:
run:
working-directory: ./godot-engine
# Global Settings
# SCONS_CACHE for windows must be set in the build environment
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=no module_text_server_fb_enabled=yes fontconfig=no
SCONS_CACHE_MSVC_CONFIG: true
concurrency:
# workflow name - PR || fallback to unique run id, this happens when you're not building a PR
# this ensures all branches build properly and cancel their previous runs
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-windows:
runs-on: "windows-latest"
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Editor
cache-name: windows-editor
target: editor
strip: true
tests: false
sconsflags: arch=x86_64 debug_symbols=no windows_subsystem=console optimize=speed production=yes
bin: "./bin/godot.windows.editor.x86_64"
artifact-name: "MirrorGodotEditorWindows"
artifact: true
- name: Template
cache-name: windows-template
target: template_debug
strip: true
tests: false
sconsflags: arch=x86_64 debug_symbols=no optimize=speed
bin: "./bin/godot.windows.template_debug.x86_64"
artifact-name: "windows_release_x86_64"
artifact: true
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Godot build cache
uses: ./godot-engine/.github/actions/godot-cache
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
- name: Setup python and scons
uses: ./godot-engine/.github/actions/godot-deps
#- name: Download Direct3D 12 SDK components
# run: python ./misc/scripts/install_d3d12_sdk_windows.py
- name: Setup MSVC problem matcher
uses: ammaraskar/msvc-problem-matcher@master
- name: Compilation
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: windows
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
- name: Strip binaries
if: ${{ matrix.strip }}
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
- name: Move PDB file (if not stripped)
if: ${{ !matrix.strip }}
run: |
dir -Path ./bin/
mv ${{matrix.bin}}.pdb bin/${{ matrix.artifact-name}}.pdb
- name: Prepare artifact
if: ${{ matrix.artifact }}
run: |
mv ${{ matrix.bin }}.exe bin/${{ matrix.artifact-name }}.exe