Skip to content

Commit 1ae14cc

Browse files
committed
First push for Godot 4.x
0 parents  commit 1ae14cc

16 files changed

+13147
-0
lines changed

.github/FUNDING.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
patreon: coaguco
4+
custom: https://www.paypal.me/sithlordkyle
+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
steamworks_sdk_tag:
5+
required: true
6+
type: string
7+
godot_tag:
8+
required: true
9+
type: string
10+
binary_name:
11+
required: true
12+
type: string
13+
build_params:
14+
required: true
15+
type: string
16+
artifact_name:
17+
required: true
18+
type: string
19+
export_name:
20+
required: true
21+
type: string
22+
secrets:
23+
steamworks_sdk_repo:
24+
required: true
25+
steamworks_sdk_repo_token:
26+
required: true
27+
28+
29+
jobs:
30+
build-linux:
31+
runs-on: self-hosted
32+
33+
steps:
34+
# Checkout Godot
35+
- name: Checkout Godot
36+
uses: actions/checkout@v3
37+
with:
38+
repository: "godotengine/godot"
39+
path: "godot"
40+
ref: ${{ inputs.godot_tag }}
41+
# Checkout current source of GodotSteam
42+
- name: Checkout GodotSteam
43+
uses: actions/checkout@v3
44+
with:
45+
path: "godotsteam"
46+
- name: Copy GodotSteam Module
47+
run: |
48+
cp -r godotsteam godot/modules/godotsteam
49+
# Checkout Steamworks SDK
50+
- name: Checkout Steamworks SDK
51+
uses: actions/checkout@v3
52+
with:
53+
path: "steamworks"
54+
repository: ${{ secrets.steamworks_sdk_repo }}
55+
token: ${{ secrets.steamworks_sdk_repo_token }}
56+
ref: ${{ inputs.steamworks_sdk_tag }}
57+
- name: Copy Steamworks
58+
run: |
59+
mkdir godot/modules/godotsteam/sdk/public
60+
cp -r steamworks/public godot/modules/godotsteam/sdk
61+
cp -r steamworks/redistributable_bin godot/modules/godotsteam/sdk
62+
- name: Build Linux Binary
63+
working-directory: "godot"
64+
run: |
65+
PATH=/opt/x86_64-godot-linux-gnu_sdk-buildroot/bin:$PATH scons ${{ inputs.build_params }}
66+
mv bin/${{ inputs.binary_name }} bin/${{ inputs.export_name }}
67+
- name: Upload Linux Build
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: ${{ inputs.artifact_name }}
71+
path: godot/bin/${{ inputs.export_name }}
72+
retention-days: 1
73+
- name: Upload Linux Steam File
74+
uses: actions/upload-artifact@v3
75+
with:
76+
name: linux-libsteam-api-so
77+
path: godot/modules/godotsteam/sdk/redistributable_bin/linux64/libsteam_api.so
78+
retention-days: 1
+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
steamworks_sdk_tag:
5+
required: true
6+
type: string
7+
godot_tag:
8+
required: true
9+
type: string
10+
build_params:
11+
required: true
12+
type: string
13+
artifact_name:
14+
required: true
15+
type: string
16+
export_name:
17+
required: true
18+
type: string
19+
secrets:
20+
steamworks_sdk_repo:
21+
required: true
22+
steamworks_sdk_repo_token:
23+
required: true
24+
25+
26+
jobs:
27+
build-macos:
28+
runs-on: macos-latest
29+
30+
steps:
31+
# Checkout Godot
32+
- name: Checkout Godot
33+
uses: actions/checkout@v3
34+
with:
35+
repository: "godotengine/godot"
36+
path: "godot"
37+
ref: ${{ inputs.godot_tag }}
38+
# Checkout current source of GodotSteam
39+
- name: Checkout GodotSteam
40+
uses: actions/checkout@v3
41+
with:
42+
path: "godotsteam"
43+
- name: Copy GodotSteam Module
44+
run: |
45+
cp -r godotsteam godot/modules/godotsteam
46+
# Checkout Steamworks SDK
47+
- name: Checkout Steamworks SDK
48+
uses: actions/checkout@v3
49+
with:
50+
path: "steamworks"
51+
repository: ${{ secrets.steamworks_sdk_repo }}
52+
token: ${{ secrets.steamworks_sdk_repo_token }}
53+
ref: ${{ inputs.steamworks_sdk_tag }}
54+
- name: Copy Steamworks
55+
run: |
56+
cp -r steamworks/public godot/modules/godotsteam/sdk
57+
cp -r steamworks/redistributable_bin godot/modules/godotsteam/sdk
58+
ls -la godot/modules/godotsteam/sdk
59+
# Install the Vulkan SDK, script copied from the official Godot build scripts.
60+
- name: Install Vulkan SDK
61+
run: |
62+
set -euo pipefail
63+
IFS=$'\n\t'
64+
# Download and install the Vulkan SDK.
65+
curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg" -o /tmp/vulkan-sdk.dmg
66+
hdiutil attach /tmp/vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk
67+
/Volumes/vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan \
68+
--accept-licenses --default-answer --confirm-command install
69+
cnt=5
70+
until hdiutil detach -force /Volumes/vulkan-sdk
71+
do
72+
[[ cnt -eq "0" ]] && break
73+
sleep 1
74+
((cnt--))
75+
done
76+
rm -f /tmp/vulkan-sdk.dmg
77+
echo 'Vulkan SDK installed successfully!'
78+
- name: Install Build Tools
79+
run: |
80+
brew install scons yasm
81+
- name: Build MacOS
82+
working-directory: "godot"
83+
run: |
84+
scons ${{ inputs.build_params }}
85+
- name: Upload MacOS Build
86+
uses: actions/upload-artifact@v3
87+
with:
88+
name: ${{ inputs.artifact_name }}
89+
path: godot/bin/${{ inputs.export_name }}
90+
if-no-files-found: error
91+
retention-days: 1
92+
- name: Upload MacOS Steam Dylib
93+
uses: actions/upload-artifact@v3
94+
with:
95+
name: macos-libsteam-api-dylib
96+
path: godot/modules/godotsteam/sdk/redistributable_bin/osx/libsteam_api.dylib
97+
if-no-files-found: error
98+
retention-days: 1
99+
- name: Zip the MacOS Apps
100+
run: |
101+
pushd godot/misc/dist
102+
zip -r ./macos_tools.zip ./macos_tools.app/
103+
zip -r ./macos_template.zip ./macos_template.app/
104+
popd
105+
- name: Upload MacOS Tool App
106+
uses: actions/upload-artifact@v3
107+
with:
108+
name: macos-tool-app
109+
path: godot/misc/dist/macos_tools.zip
110+
if-no-files-found: error
111+
retention-days: 1
112+
- name: Upload MacOS Template App
113+
uses: actions/upload-artifact@v3
114+
with:
115+
name: macos-template-app
116+
path: godot/misc/dist/macos_template.zip
117+
if-no-files-found: error
118+
retention-days: 1

0 commit comments

Comments
 (0)