Skip to content

Commit 7beed63

Browse files
committed
ci: extract D:/a/_temp/msys64/clang64 to a variable
1 parent 57c0a8a commit 7beed63

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/scripts/windows-ghc-toolchain.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set(CMAKE_SYSTEM_NAME Windows)
33
set(CMAKE_C_COMPILER "$ENV{HASKELL_MINGW_PATH}/bin/cc.exe")
44
set(CMAKE_CXX_COMPILER "$ENV{HASKELL_MINGW_PATH}/bin/c++.exe")
55

6-
set(CMAKE_C_FLAGS "-idirafter D:/a/_temp/msys64/clang64/include")
7-
set(CMAKE_CXX_FLAGS "-idirafter D:/a/_temp/msys64/clang64/include")
6+
set(CMAKE_C_FLAGS "-idirafter $ENV{SYSTEM_MINGW_PATH}/include")
7+
set(CMAKE_CXX_FLAGS "-idirafter $ENV{SYSTEM_MINGW_PATH}/include")
88

99
set(CMAKE_FIND_ROOT_PATH "$ENV{HASKELL_MINGW_PATH}")
1010
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)

.github/workflows/build.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,13 @@ jobs:
159159
- name: Configure the build
160160
run: |
161161
export PATH="$HASKELL_PATHS:$PATH"
162+
export SYSTEM_MINGW_PATH="D:/a/_temp/msys64/clang64"
162163
cabal configure --disable-documentation --enable-executable-static --enable-executable-stripping \
163164
--extra-lib-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/x86_64-w64-mingw32/lib")" \
164165
--extra-lib-dirs="$(cygpath -m "$HASKELL_MINGW_PATH/lib")" \
165-
--extra-lib-dirs="D:/a/_temp/msys64/clang64/lib" \
166+
--extra-lib-dirs="$SYSTEM_MINGW_PATH/lib" \
166167
--extra-include-dirs="$HOME/.local/include" --extra-lib-dirs="$HOME/.local/lib" \
167-
--ghc-options=-pgml="$(cygpath -m "$HASKELL_MINGW_PATH/bin/clang.exe") -optc-idirafter -optcD:/a/_temp/msys64/clang64/include -optcxx-idirafter -optcxxD:/a/_temp/msys64/clang64/include" -fstatic-secp256k1 --constraint="zlib +bundled-c-zlib"
168+
--ghc-options=-pgml="$(cygpath -m "$HASKELL_MINGW_PATH/bin/clang.exe") -optc-idirafter -optc$SYSTEM_MINGW_PATH/include -optcxx-idirafter -optcxx$SYSTEM_MINGW_PATH/include" -fstatic-secp256k1 --constraint="zlib +bundled-c-zlib"
168169
cabal build --dry-run
169170
# The last step generates dist-newstyle/cache/plan.json for the cache key.
170171

0 commit comments

Comments
 (0)