1
1
name : Prepare testing
2
2
description : Set up environment for testing purposes.
3
3
4
+ inputs :
5
+ arch :
6
+ description : Architecture to use for testing.
7
+ required : true
8
+
4
9
runs :
5
10
using : " composite"
6
11
steps :
@@ -25,24 +30,56 @@ runs:
25
30
26
31
- name : Set up Godot
27
32
shell : bash
33
+ env :
34
+ # Set pre-release version status here (e.g. "beta1");
35
+ # for release version, set to "stable".
36
+ RELEASE_STATUS : stable
37
+ ARCH : ${{ inputs.arch }}
28
38
run : |
29
- version=$(sed -n 's/compatibility_minimum = "\([^"]*\)"/\1-stable/p' project/addons/sentry/sentry.gdextension)
39
+ major_minor=$(sed -n 's/compatibility_minimum = "\([^"]*\)"/\1/p' project/addons/sentry/sentry.gdextension)
40
+ version=${major_minor}-${RELEASE_STATUS}
41
+
30
42
if [[ "$RUNNER_OS" == "Windows" ]]; then
31
- suffix=win64.exe
43
+ if [[ "$ARCH" == "x86_32" ]]; then
44
+ suffix=win32.exe
45
+ elif [[ "$ARCH" == "x86_64" ]]; then
46
+ suffix=win64.exe
47
+ elif [[ "$ARCH" == "arm64" ]]; then
48
+ suffix=windows_arm64.exe
49
+ else
50
+ echo "Unexpected Windows architecture: $ARCH"
51
+ exit 1
52
+ fi
32
53
elif [[ "$RUNNER_OS" == "Linux" ]]; then
33
- suffix=linux.x86_64
54
+ if [[ "$ARCH" == "x86_32" ]]; then
55
+ suffix=linux.x86_32
56
+ elif [[ "$ARCH" == "x86_64" ]]; then
57
+ suffix=linux.x86_64
58
+ elif [[ "$ARCH" == "arm64" ]]; then
59
+ suffix=linux_arm64
60
+ else
61
+ echo "Unexpected Linux architecture: $ARCH"
62
+ exit 1
63
+ fi
34
64
elif [[ "$RUNNER_OS" == "macOS" ]]; then
35
- suffix=macos.universal
65
+ if [[ "$ARCH" == "universal" ]]; then
66
+ suffix=macos.universal
67
+ else
68
+ echo "Unexpected macOS architecture: $ARCH"
69
+ exit 1
70
+ fi
36
71
fi
72
+
37
73
archive_file=Godot_v${version}_${suffix}.zip
38
- url=https://github.com/godotengine/godot/releases/download/${version}/${archive_file}
74
+ url=https://github.com/godotengine/godot-builds /releases/download/${version}/${archive_file}
39
75
if [[ "$RUNNER_OS" == "macOS" ]]; then
40
76
bin=${GITHUB_WORKSPACE}/godot/Godot.app/Contents/MacOS/Godot
41
77
else
42
78
bin=${GITHUB_WORKSPACE}/godot/Godot_v${version}_${suffix}
43
79
fi
44
80
mkdir godot/
45
81
cd godot/
82
+ echo "Downloading ${url}"
46
83
curl -L -o godot.zip "${url}"
47
84
unzip godot.zip
48
85
rm godot.zip
0 commit comments