-
Notifications
You must be signed in to change notification settings - Fork 54
178 lines (175 loc) · 5.82 KB
/
export-c7.yml
File metadata and controls
178 lines (175 loc) · 5.82 KB
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
174
175
176
177
178
name: Export C7 Game
on:
workflow_dispatch:
inputs:
debug-build:
type: boolean
description: Checked for debug build, unchecked for release
default: true
folder-suffix:
description: Will be added to $EXPORT_NAME for folder name
required: false
include-username:
type: boolean
description: Append your GitHub username to the folder name
default: true
include-datetime:
type: boolean
description: Append ISO8601 date/time to folder name
default: true
pull_request:
branches:
- 'Development'
# Add any long-lived branches that need CI here.
push:
branches:
- 'Development'
# Add any long-lived branches that need CI here.
env:
GODOT_VERSION: 4.4.1
EXPORT_NAME: OpenCiv3
PROJECT_DIR: C7
jobs:
Export-C7-Windows:
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:mono-4.4.1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
submodules: true
- uses: ./.github/workflows/composite/buildSetup
- name: Windows Build
run: |
mkdir -v -p build/${FOLDER_NAME}
cd ${PROJECT_DIR}
dotnet build
godot -v --headless --export${BUILD_SUFFIX} "Windows Desktop" ../build/${FOLDER_NAME}/${EXPORT_NAME}.exe
- name: Run tests
run: |
dotnet test C7 --blame-hang-dump-type full --blame-hang-timeout 5m --logger:"console;verbosity=detailed"
- name: Upload Hang Dump
if: failure()
uses: actions/upload-artifact@v4
with:
name: hang-dump-${{ github.job }}-${{ github.run_id }}
path: |
EngineTests/TestResults/**/*.dmp
EngineTests/TestResults/**/*.xml
- name: Verify formatting (`run dotnet format C7/C7.sln whitespace` to fix)
run: |
dotnet format C7/C7.sln whitespace --verify-no-changes
- name: Copy Static Files
run: |
if cp -r ${PROJECT_DIR}/Text build/${FOLDER_NAME}/Text && \\
cp -r ${PROJECT_DIR}/Assets build/${FOLDER_NAME}/Assets && \\
cp -r ${PROJECT_DIR}/Lua build/${FOLDER_NAME}/Lua
then
echo "successfully copied static files to build"
else
echo "::warning title=Static File Copy Failed::Failed to add the static files to the build"
exit 1
fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.FOLDER_NAME }}-Windows
path: build/${{ ENV.FOLDER_NAME }}
Export-C7-Linux:
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:mono-4.4.1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
submodules: true
- uses: ./.github/workflows/composite/buildSetup
- name: Linux Build
run: |
mkdir -v -p build/${FOLDER_NAME}
cd ${PROJECT_DIR}
dotnet build
godot -v --headless --export${BUILD_SUFFIX} "Linux/X11" ../build/${FOLDER_NAME}/${EXPORT_NAME}.x86_64
- name: Run tests
run: |
dotnet test C7 --blame-hang-dump-type full --blame-hang-timeout 5m --logger:"console;verbosity=detailed"
- name: Upload Hang Dump
if: failure()
uses: actions/upload-artifact@v4
with:
name: hang-dump-${{ github.job }}-${{ github.run_id }}
path: |
EngineTests/TestResults/**/*.dmp
EngineTests/TestResults/**/*.xml
- name: Verify formatting (`run dotnet format C7/C7.sln whitespace` to fix)
run: |
dotnet format C7/C7.sln whitespace --verify-no-changes
- name: Copy Static Files
run: |
if cp -r ${PROJECT_DIR}/Text build/${FOLDER_NAME}/Text && \\
cp -r ${PROJECT_DIR}/Assets build/${FOLDER_NAME}/Assets && \\
cp -r ${PROJECT_DIR}/Lua build/${FOLDER_NAME}/Lua
then
echo "successfully copied static files to build"
else
echo "::warning title=Static File Copy Failed::Failed to add the static files to the build"
exit 1
fi
- name: Create Tar Archive
run: |
tar -C build -zcvf build/${FOLDER_NAME}.tgz ${FOLDER_NAME}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: build/${{ env.FOLDER_NAME }}.tgz
name: ${{ env.FOLDER_NAME }}-Linux-x86_64
Export-C7-Mac:
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:mono-4.4.1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
submodules: true
- uses: ./.github/workflows/composite/buildSetup
- name: Mac Build
run: |
mkdir -v -p build/${FOLDER_NAME}
cd ${PROJECT_DIR}
dotnet build
godot -v --headless --export${BUILD_SUFFIX} "macOS" ../build/${FOLDER_NAME}.zip
- name: Run tests
run: |
dotnet test C7 --blame-hang-dump-type full --blame-hang-timeout 5m --logger:"console;verbosity=detailed"
- name: Upload Hang Dump
if: failure()
uses: actions/upload-artifact@v4
with:
name: hang-dump-${{ github.job }}-${{ github.run_id }}
path: |
EngineTests/TestResults/**/*.dmp
EngineTests/TestResults/**/*.xml
- name: Verify formatting (`run dotnet format C7/C7.sln whitespace` to fix)
run: |
dotnet format C7/C7.sln whitespace --verify-no-changes
- name: Copy Static Files
run: |
cd ${PROJECT_DIR}
if zip -r ../build/${FOLDER_NAME}.zip Assets Text Lua
then
echo "successfully copied static files to build"
else
echo "::warning title=Static File Copy Failed::Failed to add the static files to the build"
exit 1
fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.FOLDER_NAME }}-Mac
path: build/${{ env.FOLDER_NAME }}.zip