From c694e337a419f2b1585e462226ce9556c289745b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 4 Mar 2025 18:52:17 +0100 Subject: [PATCH 1/2] ci: use `ubuntu-latest` Ubuntu 20.04 LTS runner will be removed on 2025-04-01. This change should have no effect as we use an Alpine container to perform the build itself. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 756de78e3..d77b53b24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: include: - - os: ubuntu-20.04 + - os: ubuntu-latest shell: bash container: "{\"image\": \"elopeztob/alpine-haskell-stack-echidna:ghc-9.6.5\", \"options\": \"--user 1001\"}" - os: macos-13 # x86_64 macOS From d84aae6c3e83088ce0e8f846599dc886b92b1ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 4 Mar 2025 20:17:26 +0100 Subject: [PATCH 2/2] ci: windows: use GHC-provided headers first We need the system headers in the lookup path to find dependencies such as gmp. By re-including the system headers with `-I` or `extra-include-dirs`, they are used before the GHC-bundled headers, causing issues. Use `-idirafter` instead so they are used only as a last resort. --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d77b53b24..53e260799 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,11 +74,6 @@ jobs: GHC_MINGW_PATH="${{ (runner.os == 'Windows' && '$(cygpath -m "$GHC_BIN_PATH/../mingw")') || '' }}" mkdir -p "$STACK_ROOT" { echo "extra-include-dirs:"; - if [ ! "$GHC_MINGW_PATH" = "" ]; then - echo "- $GHC_MINGW_PATH/x86_64-w64-mingw32/include"; - echo "- $GHC_MINGW_PATH/include"; - echo "- D:/a/_temp/msys64/clang64/include"; - fi; echo "- $HOME/.local/include"; echo; echo "extra-lib-dirs:"; @@ -91,7 +86,7 @@ jobs: echo; echo "ghc-options:"; echo ' "$locals": -Werror' - "$REPLACE_LINKER_WIN" && echo ' "$everything": -pgml='$(cygpath -m "$GHC_MINGW_PATH/bin/clang.exe"); + "$REPLACE_LINKER_WIN" && echo ' "$everything": -pgml='$(cygpath -m "$GHC_MINGW_PATH/bin/clang.exe") -optc-idirafter -optc'D:/a/_temp/msys64/clang64/include' -optcxx-idirafter -optcxx'D:/a/_temp/msys64/clang64/include'; echo; "$SKIP_MSYS" && echo "skip-msys: true" || true echo "system-ghc: true";