Skip to content

Commit 60e0c62

Browse files
committed
ci: Run unit tests with x86_32 builds
1 parent a6fd73e commit 60e0c62

File tree

3 files changed

+53
-8
lines changed

3 files changed

+53
-8
lines changed

.github/actions/prepare-testing/action.yml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Prepare testing
22
description: Set up environment for testing purposes.
33

4+
inputs:
5+
arch:
6+
description: Architecture to use for testing.
7+
required: true
8+
49
runs:
510
using: "composite"
611
steps:
@@ -25,24 +30,56 @@ runs:
2530
2631
- name: Set up Godot
2732
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 }}
2838
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+
3042
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
3253
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
3464
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
3671
fi
72+
3773
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}
3975
if [[ "$RUNNER_OS" == "macOS" ]]; then
4076
bin=${GITHUB_WORKSPACE}/godot/Godot.app/Contents/MacOS/Godot
4177
else
4278
bin=${GITHUB_WORKSPACE}/godot/Godot_v${version}_${suffix}
4379
fi
4480
mkdir godot/
4581
cd godot/
82+
echo "Downloading ${url}"
4683
curl -L -o godot.zip "${url}"
4784
unzip godot.zip
4885
rm godot.zip

.github/workflows/static_checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515

1616
- name: Prepare testing
1717
uses: ./.github/actions/prepare-testing
18+
with:
19+
arch: x86_64
1820

1921
- name: Check code style
2022
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

.github/workflows/unit_tests.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ jobs:
1212
matrix:
1313
include:
1414
- runner: windows-latest
15-
godot-suffix: win64.exe
15+
arch: x86_64
16+
- runner: windows-latest
17+
arch: x86_32
18+
- runner: ubuntu-latest
19+
arch: x86_64
1620
- runner: ubuntu-latest
17-
godot-suffix: linux.x86_64
21+
arch: x86_32
1822
- runner: macos-latest
19-
godot-suffix: macos.universal
23+
arch: universal
2024
steps:
2125
- name: Checkout repo
2226
uses: actions/checkout@v4
@@ -25,6 +29,8 @@ jobs:
2529

2630
- name: Prepare testing
2731
uses: ./.github/actions/prepare-testing
32+
with:
33+
arch: ${{ matrix.arch }}
2834

2935
- name: Run tests
3036
shell: bash

0 commit comments

Comments
 (0)