Skip to content

Commit c4b31c8

Browse files
committed
Fix smoke test: use .sdz archive and create minimal test map
Major fixes based on local testing: 1. Replace symlink with .sdz archive (scanning 285ms vs hanging) 2. Remove map download (blocked with 403 Forbidden) 3. Create minimal test map with mapinfo.lua instead 4. Update script.txt to use Test Blank 8x8 map The symlink approach caused Spring's archive scanner to hang while scanning 1700+ files. Creating a .sdz archive is much faster. Map downloads from springfiles.springrts.com are blocked, so we create our own minimal map with just a mapinfo.lua file.
1 parent 570d584 commit c4b31c8

File tree

1 file changed

+62
-10
lines changed

1 file changed

+62
-10
lines changed

.github/workflows/smoke-test.yml

Lines changed: 62 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,16 @@ jobs:
4848
chmod +x spring-dedicated || true
4949
ls -lah | head -20
5050
51-
- name: Put SpringBoard in engine's games folder
51+
- name: Create SpringBoard archive for engine
5252
run: |
53-
# SpringBoard-Core is already a valid Spring archive
54-
# Just symlink it into the engine's games/ folder
53+
# Create .sdz archive instead of symlink (much faster to scan)
54+
# Exclude unnecessary directories to keep archive small
5555
mkdir -p games
56-
ln -s "$(pwd)" "games/SpringBoard Core.sdd"
56+
zip -q -r "games/SpringBoard Core.sdz" . \
57+
-x ".git/*" "test-engine/*" ".github/*" "build/*" \
58+
"doc/*" "model/*" "issues/*" "dist_cfg/*"
5759
ls -lah games/
60+
echo "SpringBoard archive size: $(du -h 'games/SpringBoard Core.sdz' | cut -f1)"
5861
5962
- name: Create Spring config to disable audio
6063
run: |
@@ -68,22 +71,71 @@ jobs:
6871
cat test-data/springsettings.cfg
6972
echo "Sound subsystem disabled via Sound = 0 config"
7073
74+
- name: Create minimal test map
75+
run: |
76+
# Create a minimal 8x8 Spring map for testing
77+
# Map downloads are blocked (403), so we create our own minimal map
78+
mkdir -p maps/test_blank.sdd
79+
80+
# Create mapinfo.lua with minimal required fields
81+
cat > maps/test_blank.sdd/mapinfo.lua << 'MAPINFOEOF'
82+
local mapinfo = {
83+
name = "Test Blank 8x8",
84+
shortname = "test_blank_8x8",
85+
description = "Minimal test map for CI",
86+
author = "CI Auto-generated",
87+
version = "v1",
88+
mapfile = "",
89+
modtype = 3,
90+
depend = {"Map Helper v1"},
91+
replace = {},
92+
93+
maphardness = 100,
94+
notDeformable = true,
95+
gravity = 130,
96+
tidalStrength = 0,
97+
maxMetal = 0.02,
98+
extractorRadius = 64.0,
99+
voidWater = false,
100+
autoShowMetal = true,
101+
102+
smf = {
103+
minheight = 0,
104+
maxheight = 200,
105+
smtFileName0 = "",
106+
smtFileName1 = "",
107+
smtFileName2 = "",
108+
smtFileName3 = "",
109+
smtFileName4 = "",
110+
smtFileName5 = "",
111+
smtFileName6 = "",
112+
smtFileName7 = "",
113+
},
114+
115+
resources = {},
116+
custom = {},
117+
teams = {},
118+
}
119+
return mapinfo
120+
MAPINFOEOF
121+
122+
# Spring can work with just mapinfo.lua for basic testing
123+
ls -lah maps/test_blank.sdd/
124+
echo "Minimal test map created"
125+
71126
- name: Create Spring script.txt
72127
run: |
73-
# Use generated blank map (how SpringBoard editor normally starts)
74-
echo "Using generated blank map (10x8)"
128+
# Use minimal test map created above
129+
echo "Using test map: Test Blank 8x8"
75130
cat > script.txt << 'SCRIPTEND'
76131
[GAME]
77132
{
78133
GameType=SpringBoard Core;
79-
MapName=sb_initial_blank_10x8;
134+
MapName=Test Blank 8x8;
80135
IsHost=1;
81136
MyPlayerName=TestPlayer;
82137
[MODOPTIONS]
83138
{
84-
MapSeed=42;
85-
new_map_x=10;
86-
new_map_y=8;
87139
}
88140
[PLAYER0]
89141
{

0 commit comments

Comments
 (0)