From f05d632217fe1cc0fb429faa0a216d229d4bd47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Sat, 23 Nov 2024 17:48:59 +0100 Subject: [PATCH 1/6] Update Makefile with minor improvements --- src/Makefile.OCaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile.OCaml b/src/Makefile.OCaml index 97a129313..a08003d5d 100644 --- a/src/Makefile.OCaml +++ b/src/Makefile.OCaml @@ -128,7 +128,7 @@ ifeq ($(OSARCH),Win32) endif ifeq ($(shell $(OCAMLC) -config-var ccomp_type),msvc) OUTPUT_SEL=-Fo - CLIBS+=-cclib shell32.lib -cclib user32.lib -cclib "-link win32rc/unison.res" + CLIBS+=-cclib user32.lib -cclib "-link win32rc/unison.res" buildexecutable: win32rc/unison.res else OUTPUT_SEL=-o @@ -494,10 +494,10 @@ clean:: -$(RM) win32rc/unison.res win32rc/unison.res.lib -$(RM) fsmonitor/*.cm[iox] fsmonitor/*.o fsmonitor/*.obj fsmonitor/*~ ifdef FSMDIR - -$(RM) $(FSMDIR)/*.cm[iox] $(FSMDIR)/*.o $(FSMDIR)/*~ + -$(RM) $(FSMDIR)/*.cm[iox] $(FSMDIR)/*.o $(FSMDIR)/*.obj $(FSMDIR)/*~ endif -$(RM) .depend.dot.tmp DEPENDENCIES.ps - -$(RM) ubase/*.cm[ioxa] ubase/*.cmxa ubase/*.a ubase/*.o ubase/*~ ubase/*.bak + -$(RM) ubase/*.cm[ioxa] ubase/*.cmxa ubase/*.a ubase/*.o ubase/*.obj ubase/*~ ubase/*.bak -$(RM) lwt/*.cm[ioxa] lwt/*.cmxa lwt/*.a lwt/*.o lwt/*.obj lwt/*~ lwt/*.bak -$(RM) lwt/generic/*.cm[ioxa] lwt/generic/*.cmxa lwt/generic/*.a lwt/generic/*.o lwt/generic/*.obj lwt/generic/*~ lwt/generic/*.bak -$(RM) lwt/win/*.cm[ioxa] lwt/win/*.cmxa lwt/win/*.a lwt/win/*.o lwt/win/*.obj lwt/win/*~ lwt/win/*.bak From b595667e7131d00f031873103f7cff31b471bf63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Sat, 23 Nov 2024 17:53:42 +0100 Subject: [PATCH 2/6] Improve ocamlfind query format This protects the query output from unwanted shell processing later on and prevents potential breakage of spaces and backslashes, for example. --- src/Makefile.OCaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.OCaml b/src/Makefile.OCaml index a08003d5d..b4e918230 100644 --- a/src/Makefile.OCaml +++ b/src/Makefile.OCaml @@ -287,8 +287,8 @@ INCLFLAGS_MAC+=-I +threads ifndef OCAMLFIND CAMLFLAGS_GUI+=-I +lablgtk3 -I +cairo2 else - CAMLFLAGS_GUI+=$(shell $(OCAMLFIND) query -i-format lablgtk3 ) - CAMLFLAGS_GUI+=$(shell $(OCAMLFIND) query -i-format cairo2 ) + CAMLFLAGS_GUI+=$(shell $(OCAMLFIND) query -format "-I '%d'" lablgtk3 ) + CAMLFLAGS_GUI+=$(shell $(OCAMLFIND) query -format "-I '%d'" cairo2 ) endif OCAMLOBJS_GUI+=pixmaps.cmo uigtk3.cmo linkgtk3.cmo OCAMLLIBS_GUI+=lablgtk3.cma cairo.cma From cd6889d4bd1b716eb4e4ead809faaf8b913d5e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Sat, 23 Nov 2024 18:01:17 +0100 Subject: [PATCH 3/6] GHA: Simplify compiler versioning in the workflow This allows automatically picking up new micro releases, in addition to just simplifying the workflow definition. --- .github/workflows/CI.yml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2bfa3f3cd..7b45bbbe3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -46,16 +46,16 @@ jobs: fail-fast: false matrix: job: - - { os: macos-14 , ocaml-version: 5.2.0 } - - { os: macos-14 , ocaml-version: 4.14.2 , publish: true , fnsuffix: -macos-arm64 } - - { os: macos-13 , ocaml-version: 4.14.2 , publish: true , fnsuffix: -macos-x86_64 } - - { os: ubuntu-22.04 , ocaml-version: 5.2.0 } - - { os: ubuntu-22.04 , ocaml-version: 4.14.2 } - - { os: ubuntu-20.04 , ocaml-version: 4.14.2 } - - { os: windows-2022 , ocaml-version: "4.14.2,system-mingw" , publish: true , fnsuffix: -windows-x86_64 } - - { os: windows-2019 , ocaml-version: "4.14.2,system-mingw,arch-x86_32" , publish: true , fnsuffix: -windows-i386 } - - { os: windows-2022 , ocaml-version: "4.14.2,system-msvc" } - - { os: windows-2019 , ocaml-version: "4.14.2,system-msvc,arch-x86_32" } + - { os: macos-14 , ocaml-version: 5.2.x } + - { os: macos-14 , ocaml-version: 4.14.x , publish: true , fnsuffix: -macos-arm64 } + - { os: macos-13 , ocaml-version: 4.14.x , publish: true , fnsuffix: -macos-x86_64 } + - { os: ubuntu-22.04 , ocaml-version: 5.2.x } + - { os: ubuntu-22.04 , ocaml-version: 4.14.x } + - { os: ubuntu-20.04 , ocaml-version: 4.14.x } + - { os: windows-2022 , ocaml-version: "ocaml.4.14.2,system-mingw" , publish: true , fnsuffix: -windows-x86_64 } + - { os: windows-2019 , ocaml-version: "ocaml.4.14.2,system-mingw,arch-x86_32" , publish: true , fnsuffix: -windows-i386 } + - { os: windows-2022 , ocaml-version: "ocaml.4.14.2,system-msvc" } + - { os: windows-2019 , ocaml-version: "ocaml.4.14.2,system-msvc,arch-x86_32" } runs-on: ${{ matrix.job.os }} @@ -79,14 +79,6 @@ jobs: shell: bash run: | outputs() { for var in "$@" ; do echo steps.vars.outputs.${var}="${!var}"; echo "${var}=${!var}" >> $GITHUB_OUTPUT ; done; } - # normalize to pre-compiled ocaml compiler variants for windows/Cygwin (decreases OCaml install time by 50%) - case '${{ matrix.job.ocaml-version }}' in - *+*) OCAML_COMPILER='ocaml-variants.${{ matrix.job.ocaml-version }}' ;; - *) OCAML_COMPILER='ocaml-base-compiler.${{ matrix.job.ocaml-version }}' ;; - esac - OCAML_VARIANT='${{ matrix.job.ocaml-version }}' - OCAML_VARIANT="${OCAML_VARIANT/+options/}" - outputs OCAML_VARIANT OCAML_COMPILER # architecture/platform vars EXE_suffix='' ; case '${{ matrix.job.os }}' in windows-*) EXE_suffix=".exe" ;; esac MinGW_ARCH='x86_64' ; case '${{ matrix.job.ocaml-version }}' in *x86_32*) MinGW_ARCH='i686' ;; *mingw*) MinGW_ARCH='x86_64' ;; esac @@ -133,7 +125,7 @@ jobs: - name: Use OCaml ${{ matrix.job.ocaml-version }} uses: ocaml/setup-ocaml@v3 with: - ocaml-compiler: "${{ steps.vars.outputs.OCAML_COMPILER }}" + ocaml-compiler: "${{ matrix.job.ocaml-version }}" opam-pin: false # setup-ocaml can prepare the build environment from unison.opam # We're not relying on that capability here, to make sure the builds From a43533824836ffcb1687f116cf24451f5b5ee3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Sat, 23 Nov 2024 18:04:56 +0100 Subject: [PATCH 4/6] GHA: Fix test run conditions for Windows --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7b45bbbe3..ed88f7f01 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -162,7 +162,7 @@ jobs: ## That remains intentionally so that someone could turn it on if ## desired. - name: Run self-tests over RPC - if: runner.os == 'Windows' && !contains(matrix.job.ocaml-version, '4.14') + if: runner.os == 'Windows' && !contains(matrix.job.ocaml-version, '4.14') && !contains(matrix.job.ocaml-version, '5.') shell: bash run: | # Separate backup dir must be set for server instance so that the central @@ -174,7 +174,7 @@ jobs: - name: Run self-tests over local socket # Recent Windows versions do support Unix domain sockets # but at least OCaml 4.14 is required to use that support - if: runner.os != 'Windows' || contains(matrix.job.ocaml-version, '4.14') + if: runner.os != 'Windows' || contains(matrix.job.ocaml-version, '4.14') || contains(matrix.job.ocaml-version, '5.') shell: bash run: | mkdir localsocket From ab475841e5ef583b21780c237387a08fdce49160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Sat, 23 Nov 2024 18:06:18 +0100 Subject: [PATCH 5/6] GHA: Update RPC ABI check versions --- .github/workflows/CI.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ed88f7f01..6372caa53 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -377,16 +377,16 @@ jobs: # This list is intended to balance good enough coverage and # limited resource usage. job: - - { os: ubuntu-22.04 , ocaml-version: 5.2.x , ref: v2.53.5 } - - { os: ubuntu-22.04 , ocaml-version: 4.14.x , ref: v2.53.5 } + - { os: ubuntu-22.04 , ocaml-version: 5.2.x , ref: v2.53.7 } + - { os: ubuntu-22.04 , ocaml-version: 4.14.x , ref: v2.53.7 } - { os: ubuntu-22.04 , ocaml-version: 4.14.x , ref: v2.52.1 , oldmake: true } - { os: ubuntu-22.04 , ocaml-version: 4.14.x , ref: v2.51.5 , oldmake: true } - { os: ubuntu-22.04 , ocaml-version: 4.08.x , ref: v2.51.5 , oldmake: true } - { os: ubuntu-22.04 , ocaml-version: 4.08.x , ref: v2.51.2 , oldmake: true } - - { os: windows-2019 , ocaml-version: ocaml-variants.4.14.0+mingw64c , ref: v2.53.5 } + - { os: windows-2019 , ocaml-version: ocaml-variants.4.14.0+mingw64c , ref: v2.53.7 } - { os: windows-2019 , ocaml-version: ocaml-variants.4.14.0+mingw64c , ref: v2.52.1 , oldmake: true } - { os: windows-2019 , ocaml-version: ocaml-variants.4.08.1+mingw32c , ref: v2.51.5 , oldmake: true } - - { os: macos-13 , ocaml-version: 4.14.x , ref: v2.53.5 } + - { os: macos-13 , ocaml-version: 4.14.x , ref: v2.53.7 } - { os: macos-13 , ocaml-version: 4.14.x , ref: v2.52.1 , oldmake: true } - { os: macos-13 , ocaml-version: 4.08.x , ref: v2.51.2 , oldmake: true } From 96ec0972b0d73d65a1a63176601a93a2e286a44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5ivo=20Leedj=C3=A4rv?= Date: Sat, 23 Nov 2024 18:10:51 +0100 Subject: [PATCH 6/6] GHA: Remove MSYS hack that is no longer needed --- .github/workflows/CI.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6372caa53..85a441e65 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -63,14 +63,6 @@ jobs: - if: contains(matrix.job.os, 'ubuntu') run: sudo apt-get update - - if: runner.os == 'Windows' - name: "Windows: Stash away the default MSYS installation" - continue-on-error: true - shell: cmd - # This conflicts with Cygwin installed by setup-ocaml - # Adjusting PATH alone does not seem to work - run: rename C:\msys64 dmsys64 - - name: Checkout code uses: actions/checkout@v4