Skip to content

Commit

Permalink
GHA: Add OCaml 5.3 to the build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Jan 8, 2025
1 parent 79ef05a commit 45936c5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 19 deletions.
9 changes: 8 additions & 1 deletion .github/scripts/main/ocaml-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ case "$HOST" in
esac

FLEXDLL_VERSION=0.43
MINGW_W64_VERSION=12.0.0

curl -sLO "https://github.com/ocaml/ocaml/archive/refs/tags/${OCAML_VERSION}.tar.gz"
if [[ $PLATFORM = 'Windows' ]] ; then
curl -sLO "https://github.com/ocaml/flexdll/archive/refs/tags/$FLEXDLL_VERSION.tar.gz"
curl -sLO "https://github.com/mingw-w64/mingw-w64/archive/refs/tags/v${MINGW_W64_VERSION}.tar.gz"
fi

tar -xzf "$OCAML_VERSION.tar.gz"
Expand All @@ -72,6 +74,11 @@ if [[ $PLATFORM = 'Windows' ]] ; then
tar -xzf ../$FLEXDLL_VERSION.tar.gz
rm -rf flexdll
mv "flexdll-$FLEXDLL_VERSION" flexdll

tar -xzf "../v${MINGW_W64_VERSION}.tar.gz"
rm -rf winpthreads
mv "mingw-w64-${MINGW_W64_VERSION}/mingw-w64-libraries/winpthreads" winpthreads
rm -rf "mingw-w64-${MINGW_W64_VERSION}"
fi

if [[ $PLATFORM = 'macOS' ]]; then
Expand Down Expand Up @@ -115,7 +122,7 @@ if [[ $OPAM_TEST -ne 1 ]] ; then
fi
fi

if ! ./configure --prefix "$PREFIX"$HOST --with-vendored-deps ${CONFIGURE_SWITCHES:-} ; then
if ! ./configure --prefix "$PREFIX"$HOST ${CONFIGURE_SWITCHES:-} ; then
echo
echo -e "[\e[31mERROR\e[0m] OCaml's configure script failed"
(set +x ; echo -en "::group::config.log contents\r") 2>/dev/null
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
open Lib

let latest_ocaml4 = "4.14.2"
let latest_ocaml5 = "5.2.0" (* Add this number to ocamls below when the next version comes out *)
let latest_ocaml5 = "5.3.0" (* Add this number to ocamls below when the next version comes out *)
let ocamls = [
(* Fully supported versions *)
"4.08.1"; "4.09.1"; "4.10.2"; "4.11.2"; "4.12.1"; "4.13.1";
"5.0.0"; "5.1.1";
"5.0.0"; "5.1.1"; "5.2.0";

(* The last elements of the list after 4.14 will be used as default versions *)
latest_ocaml4; latest_ocaml5;
Expand Down Expand Up @@ -312,8 +312,9 @@ let main_build_job ~analyse_job ~cygwin_job ?section runner start_version ~oc ~w
"x86_64-pc-windows"
] in
let ocaml5 = [
"x86_64-pc-cygwin";
"x86_64-w64-mingw32";
(* "x86_64-pc-windows"; 5.3 needed *)
"x86_64-pc-windows";
] in
let matrix_elem ocamlv hosts =
let elem ocaml host =
Expand Down Expand Up @@ -526,7 +527,7 @@ let main oc : unit =
(* These should be identical to the values in appveyor.yml *)
("OPAM_REPO", "https://github.com/ocaml/opam-repository.git");
("OPAM_TEST_REPO_SHA", "dff745994c64d083a6ba3ddc5a9c28ed0ad0f40a");
("OPAM_REPO_SHA", "6eee105e52e098e36949a584c053a18bcb9b2f6b");
("OPAM_REPO_SHA", "f93eb7cb02fb91bfd11535b3ce693d313341dd60");
("SOLVER", "");
(* Cygwin configuration *)
("CYGWIN_MIRROR", "http://mirrors.kernel.org/sourceware/cygwin/");
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ let find_need need = Hashtbl.find jobs need
let emit_runs_on ~oc runs_on =
let runner_of_platform (type a) (platform : a platform) =
match platform with
| Windows -> "windows-2019"
| Windows -> "windows-2022"
| MacOS
| Linux as platform -> os_name_of_platform platform ^ "-latest"
| Specific (platform, version) -> os_name_of_platform platform ^ "-" ^ version
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
OPAM12CACHE: ~/.cache/opam1.2/cache
OPAM_REPO: https://github.com/ocaml/opam-repository.git
OPAM_TEST_REPO_SHA: dff745994c64d083a6ba3ddc5a9c28ed0ad0f40a
OPAM_REPO_SHA: 6eee105e52e098e36949a584c053a18bcb9b2f6b
OPAM_REPO_SHA: f93eb7cb02fb91bfd11535b3ce693d313341dd60
SOLVER:
CYGWIN_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
CYGWIN_ROOT: D:\cygwin
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
run: bash -exu .github/scripts/main/archives-cache.sh

Cygwin:
runs-on: windows-2019
runs-on: windows-2022
needs: Analyse
steps:
- name: Cygwin64 Cache
Expand All @@ -106,7 +106,7 @@ jobs:
needs: Analyse
strategy:
matrix:
ocamlv: [ 4.08.1, 4.09.1, 4.10.2, 4.11.2, 4.12.1, 4.13.1, 5.0.0, 5.1.1, 4.14.2, 5.2.0 ]
ocamlv: [ 4.08.1, 4.09.1, 4.10.2, 4.11.2, 4.12.1, 4.13.1, 5.0.0, 5.1.1, 5.2.0, 4.14.2, 5.3.0 ]
fail-fast: true
steps:
- name: Install bubblewrap
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
run: bash -exu .github/scripts/main/test.sh

Build-Windows:
runs-on: windows-2019
runs-on: windows-2022
needs: [ Analyse, Cygwin ]
strategy:
matrix:
Expand All @@ -159,9 +159,15 @@ jobs:
- host: x86_64-pc-windows
build: x86_64-pc-cygwin
ocamlv: 4.14.2
- host: x86_64-pc-cygwin
build: x86_64-pc-cygwin
ocamlv: 5.3.0
- host: x86_64-w64-mingw32
build: x86_64-pc-cygwin
ocamlv: 5.2.0
ocamlv: 5.3.0
- host: x86_64-pc-windows
build: x86_64-pc-cygwin
ocamlv: 5.3.0
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -244,7 +250,7 @@ jobs:
needs: Analyse
strategy:
matrix:
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: true
steps:
- name: Install GNU patch
Expand Down Expand Up @@ -282,7 +288,7 @@ jobs:
needs: [ Analyse, Build-Linux ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: false
env:
OPAM_TEST: 1
Expand Down Expand Up @@ -339,7 +345,7 @@ jobs:
needs: Analyse
strategy:
matrix:
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: false
env:
OPAM_TEST: 1
Expand Down Expand Up @@ -428,7 +434,7 @@ jobs:
needs: [ Analyse, Build-Linux ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: false
env:
OPAM_DOC: 1
Expand Down Expand Up @@ -485,7 +491,7 @@ jobs:
strategy:
matrix:
solver: [ z3, 0install ]
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: false
env:
SOLVER: ${{ matrix.solver }}
Expand Down Expand Up @@ -535,7 +541,7 @@ jobs:
strategy:
matrix:
solver: [ z3, 0install ]
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: false
env:
SOLVER: ${{ matrix.solver }}
Expand Down Expand Up @@ -583,7 +589,7 @@ jobs:
needs: [ Analyse, Build-Linux ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: false
steps:
- name: Install bubblewrap
Expand Down Expand Up @@ -618,7 +624,7 @@ jobs:
needs: [ Analyse, Build-macOS ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.2.0 ]
ocamlv: [ 4.14.2, 5.3.0 ]
fail-fast: false
steps:
- name: Checkout tree
Expand Down
2 changes: 2 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ users)
* Update the github action scripts now that homebrew renamed the GNU patch binary to gpatch [#6296 @kit-ty-kate]
* Add branch scheme `username/branch` for opam-rt specific branch to use [#6274 @rjbou]
* Check `shell/install.sh` using `shellcheck` [#6313 @kit-ty-kate]
* Add OCaml 5.3 to the build matrix [#6192 @kit-ty-kate]
* Add OCaml 5.3/Cygwin and OCaml 5.3/MSVC to the build matrix [#6192 @kit-ty-kate]

## Doc
* Update the command to install opam to point to the new simplified url on opam.ocaml.org [#6226 @kit-ty-kate]
Expand Down

0 comments on commit 45936c5

Please sign in to comment.