@@ -15,36 +15,42 @@ jobs:
1515 steps :
1616 - name : Checkout repository
1717 uses : actions/checkout@v4
18+ with :
19+ submodules : true
1820
1921 - name : Set up Haskell
2022 uses : haskell-actions/setup@v2
2123 with :
2224 ghc-version : " 9.8.4"
2325 cabal-version : " latest"
2426
25- - name : Clone SDL3 headers for binding validation
27+ - name : Set up SDL3 headers from submodule
2628 run : |
27- echo "Cloning SDL3 headers for binding checker ..."
29+ echo "Setting up SDL3 headers from submodule ..."
2830
29- # Clone SDL3 source to get headers (using specific commit e1a623f129e75ad532315852d656fb26c80382a6 for SDL3 3.3.0 pre-release)
30- git clone https://github.com/libsdl-org/SDL.git /tmp/SDL3-headers
31- cd /tmp/SDL3-headers
32- git checkout e1a623f129e75ad532315852d656fb26c80382a6
33- cd -
31+ # Source config to get the expected commit
32+ source .github/config.sh
3433
35- # Create include directory structure that binding checker expects
36- sudo mkdir -p /usr/local/include/SDL3
34+ # Verify submodule is at expected commit
35+ cd SDL3
36+ current_commit=$(git rev-parse HEAD)
37+ echo "SDL3 submodule at commit: $current_commit"
38+ if [ "$current_commit" != "$SDL_HEADER_COMMIT" ]; then
39+ echo "⚠️ Warning: Submodule commit ($current_commit) differs from config ($SDL_HEADER_COMMIT)"
40+ fi
41+ cd ..
3742
38- # Copy all SDL3 headers
39- sudo cp /tmp/SDL3-headers/include/SDL3/*.h /usr/local/include/SDL3/
43+ # Create symlink to system include path for compatibility
44+ sudo mkdir -p /usr/local/include
45+ sudo ln -sf "$(pwd)/SDL3/include/SDL3" /usr/local/include/SDL3
4046
4147 # Verify headers are available
4248 echo "Verifying SDL3 headers..."
43- header_count=$(find /usr/local /include/SDL3 -name "SDL_*.h" | wc -l)
44- echo "✅ Found $header_count SDL3 headers in /usr/local /include/SDL3"
49+ header_count=$(find SDL3 /include/SDL3 -name "SDL_*.h" | wc -l)
50+ echo "✅ Found $header_count SDL3 headers in SDL3 /include/SDL3"
4551
4652 # List first few headers for verification
47- ls /usr/local /include/SDL3/SDL_*.h | head -5
53+ ls SDL3 /include/SDL3/SDL_*.h | head -5
4854
4955 - name : Cache Cabal packages
5056 uses : actions/cache@v4
0 commit comments