@@ -41,31 +41,33 @@ runs:
4141 shell : bash
4242 run : cp cabal.project.ci cabal.project
4343
44- - name : Windows quirks - Manual requires Clang version coming with GHC
44+ - name : Windows quirks - Add LLVM to PATH
4545 shell : bash
4646 if : ${{ startsWith(inputs.runner, 'windows') }}
4747 run : |
48- # Set C23 standard for Windows
49- echo "BINDGEN_EXTRA_CLANG_ARGS=${BINDGEN_EXTRA_CLANG_ARGS:+$BINDGEN_EXTRA_CLANG_ARGS }-std=c23" >> "$GITHUB_ENV"
50-
51- # Get GHC's lib directory which should contain mingw
52- GHC_LIBDIR=$(ghc --print-libdir)
53- echo "GHC libdir: $GHC_LIBDIR"
54-
55- # Try common mingw locations relative to GHC
56- for MINGW_REL in "mingw/bin" "../mingw/bin" "../../mingw/bin"; do
57- MINGW_PATH="$GHC_LIBDIR/$MINGW_REL"
58- LLVM_PATH="$GHC_LIBDIR/$MINGW_REL"
59- if [ -d "$MINGW_PATH" ]; then
60- echo "Found mingw at: $MINGW_PATH"
61- ls "$MINGW_PATH"
62- echo "$MINGW_PATH" >> "$GITHUB_PATH"
63- echo "$LLVM_PATH" >> "$GITHUB_PATH"
64- exit 0
65- fi
66- done
67-
68- echo "Warning: Could not find mingw directory for GHC ${{ inputs.ghc }}"
48+ # Set C23 standard for Windows
49+ echo "BINDGEN_EXTRA_CLANG_ARGS=${BINDGEN_EXTRA_CLANG_ARGS:+$BINDGEN_EXTRA_CLANG_ARGS }-std=c23" >> "$GITHUB_ENV"
50+
51+ # Add LLVM paths for libclang
52+ echo "$LLVM_PATH/bin" >> "$GITHUB_PATH"
53+ echo "$LLVM_PATH/lib" >> "$GITHUB_PATH"
54+
55+ # Get GHC's lib directory which should contain mingw
56+ GHC_LIBDIR=$(ghc --print-libdir)
57+ echo "GHC libdir: $GHC_LIBDIR"
58+
59+ # Try common mingw locations relative to GHC
60+ for MINGW_REL in "mingw/bin" "../mingw/bin" "../../mingw/bin"; do
61+ MINGW_PATH="$GHC_LIBDIR/$MINGW_REL"
62+ if [ -d "$MINGW_PATH" ]; then
63+ echo "Found mingw at: $MINGW_PATH"
64+ ls "$MINGW_PATH"
65+ echo "$MINGW_PATH" >> "$GITHUB_PATH"
66+ exit 0
67+ fi
68+ done
69+
70+ echo "Warning: Could not find mingw directory for GHC ${{ inputs.ghc }}"
6971
7072 - name : Dry build (for cache key)
7173 shell : bash
8587 shell : bash
8688 run : cabal build all --only-dependencies -j4
8789
88- - name : Setup tmate session
89- if : runner.os == 'Windows'
90- uses : mxschmitt/action-tmate@v3
91-
9290 - name : Build
9391 shell : bash
9492 run : cabal build all -j4
0 commit comments