forked from kanimaru/twitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.85 KB
/
Copy pathredot-compatibility.yml
File metadata and controls
52 lines (44 loc) · 1.85 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
name: Redot compatibility
on:
push:
pull_request:
permissions:
contents: read
jobs:
redot-26-2:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Download Redot 26.2
shell: bash
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/redot"
curl --fail --location --retry 3 \
--output "$RUNNER_TEMP/redot/redot.zip" \
https://github.com/Redot-Engine/redot-engine/releases/download/redot-26.2-stable/Redot_v26.2-stable_linux_x64.zip
echo "f474d890806c41af15513cf5a8600243e241882e11b68dbb95660e3465b5b1e4 $RUNNER_TEMP/redot/redot.zip" | sha256sum --check
unzip -q "$RUNNER_TEMP/redot/redot.zip" -d "$RUNNER_TEMP/redot/bin"
REDOT_BIN="$(find "$RUNNER_TEMP/redot/bin" -type f -iname 'redot*' | head -n 1)"
chmod +x "$REDOT_BIN"
echo "REDOT_BIN=$REDOT_BIN" >> "$GITHUB_ENV"
- name: Verify engine version
run: '"$REDOT_BIN" --version'
- name: Import project and compile addon
shell: bash
run: |
set -euo pipefail
"$REDOT_BIN" --headless --path . --import 2>&1 | tee "$RUNNER_TEMP/redot-import.log"
if grep -E 'SCRIPT ERROR|Parse Error|Failed to load script|Failed loading resource' "$RUNNER_TEMP/redot-import.log"; then
exit 1
fi
- name: Run compatibility probe
shell: bash
run: |
set -euo pipefail
"$REDOT_BIN" --headless --path . --script res://tests/redot_compatibility.gd 2>&1 | tee "$RUNNER_TEMP/redot-probe.log"
if grep -E 'SCRIPT ERROR|Parse Error|Failed to load script|Failed loading resource' "$RUNNER_TEMP/redot-probe.log"; then
exit 1
fi
grep -F 'Twitcher Redot compatibility probe passed' "$RUNNER_TEMP/redot-probe.log"