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

Update GHA CI and build scripts #1082

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Update GHA CI and build scripts #1082

merged 6 commits into from
Nov 13, 2024

Commits on Nov 13, 2024

  1. Do a bytecode build if native compiler not found

    Instead of requiring the user to specify NATIVE=false, automatically do
    a bytecode-only build if the native compiler is not found.
    tleedjarv committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    2c2b1fc View commit details
    Browse the repository at this point in the history
  2. Use more reliable tool prefixes for mingw builds

    Improve detection of tool prefixes by consulting the OCaml compiler's
    configuration, in order to increase compatibility with various mingw
    setups/system configurations. This is a more generic solution; the
    previous setup appears to have relied more on a specific (cross
    compilation) environment being correctly set up.
    tleedjarv committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    e7a6d08 View commit details
    Browse the repository at this point in the history
  3. Fix bytecode build option detection

    Automatically detecting supported compiler options by simply executing
    the compiler with no input is no longer possible since OCaml 5.2.0.
    Using '-version' instead of supplying an input seems to work well so far
    and can be used as a workaround.
    tleedjarv committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    76fdbac View commit details
    Browse the repository at this point in the history
  4. GHA: Migrate to setup-ocaml v3

    This is mainly required for building in Windows and for enabling OCaml 5
    builds in Windows. Building in Windows has always been a bit tricky. For
    many years, a separate opam repository with patched compilers (and
    packages), together with (optional) pre-compiled compiler binaries was
    used to make these builds possible. That separate repository, however,
    was created and maintained by a single person who decided to retire it
    as of August 2021.
    
    After a while, a migration path was proposed, which started with a
    compatibility mechanism in the upstream opam repository and concluded
    with a recent release of opam 2.2.0, a version which supports Windows
    natively. setup-ocaml v3 makes use of opam 2.2+ and is thus required to
    complete the migration of Windows build environments.
    
    Use of opam 2.2 and the upstream opam repository requires a few changes
    in the CI build process:
    
     - The depext mechanism is no longer available in Windows. Not sure if
       this is permanent or not, but since Unison builds were not relying on
       it heavily anyway (just for GTK), work around this by explicitly
       installing GTK before the GUI builds.
    
     - Many (likely most) opam packages are not compatible with Windows,
       often in just missing little things in the build process. Luckily,
       Unison does not rely on packages other than lablgtk and its
       dependencies, which just require a workaround for pkg-config (see
       further comments in the build script).
    
     - ocaml-env is no longer required nor available. Any invocations can
       simply be removed from the build script.
    tleedjarv committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    8a01568 View commit details
    Browse the repository at this point in the history
  5. GHA: Add Windows MSVC builds

    lablgtk and/or cairo do not build with MSVC, so no GUI builds with MSVC.
    tleedjarv committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    084267b View commit details
    Browse the repository at this point in the history
  6. GHA: Upgrade macOS runners

    macOS 12 GHA runners are deprecated and will be shut down soon. Increase
    the macOS target version as with older target versions the builds are
    starting to fail with newer runner images and OCaml compiler versions.
    tleedjarv committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    0ec31df View commit details
    Browse the repository at this point in the history