diff --git a/.github/scripts/main/create-ocaml-cache.sh b/.github/scripts/main/create-ocaml-cache.sh deleted file mode 100755 index 25b9bcdca94..00000000000 --- a/.github/scripts/main/create-ocaml-cache.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -set -xue - -OCAML_BRANCH="$1" -PREFIX="$2" -EXE="$3" -OCAML_LOCAL="$4" -PLATFORM="$5" - -if [[ $OCAML_BRANCH -gt 407 ]]; then - make -C src_ext dune-local.stamp - cd src_ext/dune-local - ocaml boot/bootstrap.ml - cp _boot/dune.exe "$PREFIX/bin/dune$EXE" - cd ../.. - - git clean -dfX - - if [[ -n $GITHUB_BASE_REF ]]; then - git tag combak - git fetch origin $GITHUB_BASE_REF - git checkout origin/$GITHUB_BASE_REF - fi - - ./configure --with-vendored-deps - make - cp -a _build "$OCAML_LOCAL/" - rm -f "$OCAML_LOCAL/_build/log" - mv "$OCAML_LOCAL/_build/default/src_ext" "$OCAML_LOCAL/_build/" - rm -rf "$OCAML_LOCAL/_build/default"/* "$OCAML_LOCAL/_build/install" - mv "$OCAML_LOCAL/_build/src_ext" "$OCAML_LOCAL/_build/default/" - git clean -dfX - if [[ -n $GITHUB_BASE_REF ]]; then - git checkout combak - fi -fi - -# The Windows BSD tar can't cope with symlinks, so we pre-tar the archive and cache that! -if [[ $PLATFORM = 'Windows' ]]; then - tar -C "$OCAML_LOCAL" -pcf "$OCAML_LOCAL.tar" . -fi diff --git a/.github/scripts/main/main.sh b/.github/scripts/main/main.sh index bebd00bd96c..dcc5ccb8bda 100644 --- a/.github/scripts/main/main.sh +++ b/.github/scripts/main/main.sh @@ -28,10 +28,6 @@ case "$1" in CONFIGURE_PREFIX="$PREFIX";; esac -if [ -e "$OCAML_LOCAL/_build" ]; then - cp -a "$OCAML_LOCAL/_build" . -fi - ./configure --prefix $CONFIGURE_PREFIX --with-vendored-deps --with-mccs if [ "$OPAM_TEST" != "1" ]; then echo 'DUNE_PROFILE=dev' >> Makefile.config diff --git a/.github/scripts/main/ocaml-cache.sh b/.github/scripts/main/ocaml-cache.sh index c9f578dc2cc..ac94f664775 100644 --- a/.github/scripts/main/ocaml-cache.sh +++ b/.github/scripts/main/ocaml-cache.sh @@ -146,8 +146,10 @@ EOF chmod +x "$OCAML_LOCAL/bin/ocamldoc" fi -# Hand-over control to a separate script in case the branch being tested -# updates this script, which will fail on Windows (since the script is "open" -# and can't be overwritten) -cp -pf .github/scripts/main/create-ocaml-cache.sh ../create-ocaml-cache.sh -exec ../create-ocaml-cache.sh "$OCAML_BRANCH" "$PREFIX" "$EXE" "$OCAML_LOCAL" "$PLATFORM" +make -C src_ext dune-local.stamp +cd src_ext/dune-local +ocaml boot/bootstrap.ml +cp _boot/dune.exe "$PREFIX/bin/dune$EXE" +cd ../.. + +git clean -dfX diff --git a/.github/workflows/ci.ml b/.github/workflows/ci.ml index 6f753cebb8b..1d3fe06d38e 100644 --- a/.github/workflows/ci.ml +++ b/.github/workflows/ci.ml @@ -492,7 +492,7 @@ let main oc : unit = ] in let keys = [ ("archives", "archives-1-${{ hashFiles('src_ext/Makefile.dune', 'src_ext/Makefile.sources', 'src_ext/Makefile', '.github/scripts/common/preamble.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/archives-cache.sh') }}-${{ env.OPAM_REPO_SHA }}"); - ("ocaml-cache", "${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/create-ocaml-cache.sh') }}"); + ("ocaml-cache", "${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh') }}"); ("cygwin", "${{ hashFiles('.github/scripts/cygwin.cmd') }}-${{ env.CYGWIN_EPOCH }}"); ("opam-bs-cache", "${{ hashFiles('.github/scripts/main/opam-bs-cache.sh', '*.opam', '.github/scripts/main/preamble.sh') }}"); ] in diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 155edebc0e4..38a4f615181 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,8 +58,8 @@ jobs: run: | echo archives=archives-1-${{ hashFiles('src_ext/Makefile.dune', 'src_ext/Makefile.sources', 'src_ext/Makefile', '.github/scripts/common/preamble.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/archives-cache.sh') }}-${{ env.OPAM_REPO_SHA }} echo archives=archives-1-${{ hashFiles('src_ext/Makefile.dune', 'src_ext/Makefile.sources', 'src_ext/Makefile', '.github/scripts/common/preamble.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/archives-cache.sh') }}-${{ env.OPAM_REPO_SHA }} >> $GITHUB_OUTPUT - echo ocaml-cache=${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/create-ocaml-cache.sh') }} - echo ocaml-cache=${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh', '.github/scripts/main/create-ocaml-cache.sh') }} >> $GITHUB_OUTPUT + echo ocaml-cache=${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh') }} + echo ocaml-cache=${{ hashFiles('src_ext/Makefile.dune', '.github/scripts/main/ocaml-cache.sh', '.github/scripts/main/preamble.sh') }} >> $GITHUB_OUTPUT echo cygwin=${{ hashFiles('.github/scripts/cygwin.cmd') }}-${{ env.CYGWIN_EPOCH }} echo cygwin=${{ hashFiles('.github/scripts/cygwin.cmd') }}-${{ env.CYGWIN_EPOCH }} >> $GITHUB_OUTPUT echo opam-bs-cache=${{ hashFiles('.github/scripts/main/opam-bs-cache.sh', '*.opam', '.github/scripts/main/preamble.sh') }}