From 32b3b3674e397c2afd1255715c6b85b58588f7dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Sat, 7 Dec 2024 21:39:49 +0100 Subject: [PATCH] GHA: Work around pkgconf issues (part 2) A recent dune release uncovered issues with pkgconf (required by cairo2 and lablgtk3) which break some builds. In the current workflow, builds on ubuntu-20.04 and with MSVC are affected. Since we don't rely on pkgconf, we can just remove it and let dune fall back to pkg-config. For MSVC builds we can go even further and try to remove Cygwin from the build environment as much as possible. --- .github/workflows/CI.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5c69fec13..9cdb38290 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -262,6 +262,16 @@ jobs: if: ${{ runner.os == 'Windows' && contains(matrix.job.ocaml-version, 'msvc') }} shell: pwsh run: | + # Prevent Cygwin env messing up the Windows build (opam will add Cygwin + # back to PATH, but still...) + # [2024-12] Somehow this was not required before a dune update that + # switched from using pkg-config to pkgconf, but doing this should not + # hurt in any case. + rm D:\cygwin\bin\pkgconf* + rm D:\cygwin\bin\pkg-config* + "PKG_CONFIG=D:\gtk\bin\pkgconf.exe" >> "${env:GITHUB_ENV}" + $env:Path = (${env:Path} -split ';' | Where-Object { $_ -Notlike "*cygwin*" }) -join ";" + ## "PATH=D:\gtk\bin;${env:Path}" >> "${env:GITHUB_ENV}" "LIB=D:\gtk\lib;${env:LIB}" >> "${env:GITHUB_ENV}" "INCLUDE=D:\gtk\include;D:\gtk\include\cairo;D:\gtk\include\glib-2.0;D:\gtk\include\gobject-introspection-1.0;D:\gtk\lib\glib-2.0\include;${env:INCLUDE}" >> "${env:GITHUB_ENV}"