Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows CI builds #4590

Merged
merged 1 commit into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/cabal.project.local.ci.Linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package cardano-crypto-praos
flags: -external-libsodium-vrf

package HsOpenSSL
flags: +use-pkg-config
23 changes: 23 additions & 0 deletions .github/workflows/cabal.project.local.ci.MINGW64_NT-10.0-20348
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package cardano-crypto-praos
flags: -external-libsodium-vrf

package HsOpenSSL
extra-include-dirs: D:/a/_temp/msys64/mingw64/include
extra-lib-dirs: D:/a/_temp/msys64/mingw64/lib
flags: +use-pkg-config

package secp256k1-haskell
extra-include-dirs: D:/a/_temp/msys64/mingw64/include
extra-lib-dirs: D:/a/_temp/msys64/mingw64/lib

package basement
extra-include-dirs: D:/a/_temp/msys64/mingw64/include
extra-lib-dirs: D:/a/_temp/msys64/mingw64/lib

package cardano-crypto-class
extra-include-dirs: D:/a/_temp/msys64/mingw64/include
extra-lib-dirs: D:/a/_temp/msys64/mingw64/lib

package cardano-crypto-praos
extra-include-dirs: D:/a/_temp/msys64/mingw64/include
extra-lib-dirs: D:/a/_temp/msys64/mingw64/lib
Copy link
Contributor Author

@newhoggy newhoggy Nov 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any Haskell packages that fails to build because the system installation directory is missing will need an entry here. This ought to only happen with packages that have C bindings to system libraries that are only installed in the alternate package installation directory.

2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
sed -i 's|tests: False|tests: True|g' cabal.project
fi

cp .github/workflows/cabal.project.local.ci cabal.project.local
cp ".github/workflows/cabal.project.local.ci.$(uname -s)" cabal.project.local
Copy link
Contributor Author

@newhoggy newhoggy Nov 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Windows only, we need to pass extra flags so that gcc and ld (which ghc invokes) can find the libraries and header files.

This is necessary because unfortunately the 3rdparty msys2 system we use installs packages into D:/a/_temp/msys64/mingw64 instead of the system C:\msys64\mingw64. This applies also the secp256k1.

It's unclear why gcc and ld invoked by ghc is unable to see this alternate installation directory.

To make it easy so treat Windows differently, we have OS specific cabal.project.local.ci.* files which are copied to cabal.project.local.

The additional flags to make this work on Windows can then be put into cabal.project.local.ci.MINGW64_NT-10.0-20348

Please see the linked issue for more information.


echo "# cabal.project.local"
cat cabal.project.local
Expand Down