From 0408333c95dc2d614537d9be41ffa54522541f79 Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 16 Feb 2022 12:28:40 +0100 Subject: [PATCH 1/2] rm appveyor --- appveyor.yml | 55 ------------ appveyor_build.cmd | 209 --------------------------------------------- appveyor_test.sh | 7 -- 3 files changed, 271 deletions(-) delete mode 100644 appveyor.yml delete mode 100644 appveyor_build.cmd delete mode 100755 appveyor_test.sh diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index f7e9b61b4aa..00000000000 --- a/appveyor.yml +++ /dev/null @@ -1,55 +0,0 @@ -platform: - - x64 - -matrix: - fast_finish: true - -image: Visual Studio 2019 - -environment: - global: - CYG_ROOT: cygwin64 - CYG_ARCH: x86_64 - CYGWIN: winsymlinks:native - OCAML_PORT: - CYG_CACHE: C:/cygwin/var/cache/setup - CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ - DEP_MODE: lib-ext - # These should be identical to the values in .github/workflows/*.yml - OPAM_REPO: https://github.com/ocaml/opam-repository.git - OPAM_REPO_SHA: fd4405c83bcd23f91373978b45479694079a8c79 - OPAM_TEST_REPO_SHA: fd4405c83bcd23f91373978b45479694079a8c79 - matrix: - - CYG_ROOT: cygwin - CYG_ARCH: x86 - - CYG_ROOT: cygwin64 - CYG_ARCH: x86_64 - DEP_MODE: lib-pkg - - appveyor_build_worker_image: Visual Studio 2017 - OCAML_PORT: msvc - DEP_MODE: lib-pkg - GIT_FOR_WINDOWS: 1 - - appveyor_build_worker_image: Visual Studio 2017 - OCAML_PORT: msvc64 - - OCAML_PORT: mingw - - OCAML_PORT: mingw64 - DEP_MODE: lib-pkg - GIT_FOR_WINDOWS: 1 - -cache: - - C:\projects\opam\bootstrap - - C:\projects\opam\src_ext\archives - -install: - - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" install - -build_script: - - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" build - -test_script: - - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" test - -# Uncomment this to enable Remote Desktop on the build worker at the end of the -# build. The worker is available for the remainder of the allocated hour. -#on_finish: -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) diff --git a/appveyor_build.cmd b/appveyor_build.cmd deleted file mode 100644 index bc6208c3d0a..00000000000 --- a/appveyor_build.cmd +++ /dev/null @@ -1,209 +0,0 @@ -@rem *********************************************************************** -@rem * * -@rem * opam * -@rem * * -@rem * David Allsopp, OCaml Labs, Cambridge. * -@rem * * -@rem * Copyright 2018 MetaStack Solutions Ltd. * -@rem * * -@rem * All rights reserved. This file is distributed under the terms of * -@rem * the GNU Lesser General Public License version 2.1, with the * -@rem * special exception on linking described in the file LICENSE. * -@rem * * -@rem *********************************************************************** - -@rem BE CAREFUL ALTERING THIS FILE TO ENSURE THAT ERRORS PROPAGATE -@rem IF A COMMAND SHOULD FAIL IT PROBABLY NEEDS TO END WITH -@rem || exit /b 1 -@rem BASICALLY, DO THE TESTING IN BASH... - -@rem Do not call setlocal! -@echo off - -goto %1 - -goto :EOF - -:CheckPackage -"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %1" | findstr %1 > nul -if %ERRORLEVEL% equ 0 goto :EOF -set PKG=%1 -if "%PKG%" equ "flexdll" set PKG=flexdll=0.39-1 -echo Cygwin package %PKG% will be installed -set CYGWIN_INSTALL_PACKAGES=%CYGWIN_INSTALL_PACKAGES%,%PKG% -goto :EOF - -:UpgradeCygwin -if %CYGWIN_UPGRADE_REQUIRED% equ 1 ( - echo Cygwin package upgrade required - please go and drink coffee - set CYGWIN_UPGRADE_FLAG=--upgrade-also - SET CYGWIN_UPGRADE_REQUIRED=0 -) else ( - set CYGWIN_UPGRADE_FLAG= -) -if "%CYGWIN_INSTALL_PACKAGES%" neq "" set CYGWIN_INSTALL_PACKAGES=--packages %CYGWIN_INSTALL_PACKAGES:~1% -if "%CYGWIN_INSTALL_PACKAGES%%FLAG%" equ "" goto UpgradeCygwin_next -"%CYG_ROOT%\setup-%CYG_ARCH%.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" %CYGWIN_INSTALL_PACKAGES% %CYGWIN_UPGRADE_FLAG% > nul -set CYGWIN_INSTALL_PACKAGES= -:UpgradeCygwin_next -if "%CYGWIN_UPGRADE_FLAG%" equ "" for %%P in (%CYGWIN_COMMANDS%) do "%CYG_ROOT%\bin\bash.exe" -lc "%%P --help" > nul || set CYGWIN_UPGRADE_REQUIRED=1 -"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%" -if "%CYGWIN_UPGRADE_REQUIRED%%CYGWIN_UPGRADE_FLAG%" equ "1" call :UpgradeCygwin -goto :EOF - -:install -echo Build Worker Image: %APPVEYOR_BUILD_WORKER_IMAGE% -systeminfo 2>nul | findstr /B /C:"OS Name" /C:"OS Version" -echo System architecture: %PLATFORM% -set CYG_ROOT=C:\%CYG_ROOT% - -cd "%APPVEYOR_BUILD_FOLDER%" - -:: if "%OCAML_PORT%" equ "" ( -:: rem Need unreleased Cygwin 3.1.7 for bugfix in acl_get_tag_type and acl_get_permset -:: appveyor DownloadFile "https://cygwin.com/snapshots/x86/cygwin1-20200710.dll.xz" -FileName "cygwin1.dll.xz" || exit /b 1 -:: "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER ; unxz cygwin1.dll.xz ; chmod +x cygwin1.dll" -:: move cygwin1.dll %CYG_ROOT%\bin\cygwin1.dll -:: ) - -rem CYGWIN_PACKAGES is the list of required Cygwin packages (cygwin is included -rem in the list just so that the Cygwin version is always displayed on the log). -rem CYGWIN_COMMANDS is a corresponding command to run with --version to test -rem whether the package works. This is used to verify whether the installation -rem needs upgrading. -set CYGWIN_PACKAGES=cygwin make patch curl diffutils tar unzip git -set CYGWIN_COMMANDS=cygcheck make patch curl diff tar unzip git - -if "%OCAML_PORT%" equ "mingw" ( - set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-i686-gcc-g++ - set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% i686-w64-mingw32-g++ -) -if "%OCAML_PORT%" equ "mingw64" ( - set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-x86_64-gcc-g++ - set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% x86_64-w64-mingw32-g++ -) -if "%OCAML_PORT%" equ "" ( - set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% gcc-g++ flexdll - set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% g++ flexlink -) - -set CYGWIN_INSTALL_PACKAGES= -set CYGWIN_UPGRADE_REQUIRED=0 - -rem Check that all packages are installed -for %%P in (%CYGWIN_PACKAGES%) do call :CheckPackage %%P - -rem Check that Cygwin is at least 3.1.7 -for /f "tokens=2,3,4 delims=-. " %%a in ('%CYG_ROOT%\bin\bash.exe -lc "cygcheck -dc cygwin" ^| findstr cygwin') do ( - set CYG_MAJOR=%%a - set CYG_MINOR=%%b - set CYG_REV=%%c -) -set /a CYG_VER=%CYG_MAJOR%*10000+%CYG_MINOR%*100+%CYG_REV% -if %CYG_VER% lss 30107 ( - if "%OCAML_PORT%" equ "" ( - echo Cygwin version %CYG_MAJOR%.%CYG_MINOR%.%CYG_REV% installed; opam requires 3.1.7 or later - set CYGWIN_UPGRADE_REQUIRED=1 - ) -) - -rem Upgrade/install packages as necessary -call :UpgradeCygwin - -set INSTALLED_URL= -for /f "tokens=3" %%U in ('findstr /C:"URL_ocaml = " src_ext\Makefile') do set OCAML_URL=%%U -for /f "tokens=3" %%U in ('findstr /C:"URL_flexdll = " src_ext\Makefile') do set FLEXDLL_URL=%%U -if exist bootstrap\ocaml\lib\stdlib.cmxa ( - echo Deleting out-of-date bootstrap compiler - rd /s/q bootstrap -) -if exist bootstrap\installed-tarball for /f "delims=" %%U in ('type bootstrap\installed-tarball') do set INSTALLED_URL=%%U - -if "%INSTALLED_URL%" neq "%OCAML_URL% %FLEXDLL_URL% %DEP_MODE%" if exist bootstrap\nul ( - echo Required: %OCAML_URL% %FLEXDLL_URL% %DEP_MODE% - echo Compiled: %INSTALLED_URL% - echo Re-building bootstrap compiler - rd /s/q bootstrap - if exist src_ext\archives\nul rd /s/q src_ext\archives -) - -if "%DEP_MODE%" equ "lib-pkg" "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext lib-pkg-urls | head -n -1 | sort | uniq" > current-lib-pkg-list -if not exist bootstrap\installed-packages goto SkipCheck - -fc bootstrap\installed-packages current-lib-pkg-list > nul -if %ERRORLEVEL% equ 1 ( - echo lib-pkg packages changed: - "%CYG_ROOT%\bin\diff.exe" bootstrap/installed-packages current-lib-pkg-list | "%CYG_ROOT%\bin\sed.exe" -ne "s//Add/p" | "%CYG_ROOT%\bin\gawk.exe" "BEGIN{FS="" ""}$2!=k{if(k!="""")print o==f?w:o;w=$0;k=$2;f=o=$2"" ""$3;next}{o=""Switch ""o"" --> ""$3}END{print o==f?w:o}" - echo lib-pkg will be re-built - "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext reset-lib-pkg" - del bootstrap\installed-packages -) else ( - del current-lib-pkg-list -) - -:SkipCheck - -"%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext cache-archives" || exit /b 1 - -if not exist bootstrap\nul ( - "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make compiler" || exit /b 1 - for /f "delims=" %%U in ('type bootstrap\installed-tarball') do echo %%U %DEP_MODE%> bootstrap\installed-tarball - if exist bootstrap\ocaml-*.tar.gz del bootstrap\ocaml-*.tar.gz - if "%OCAML_PORT%" neq "" if exist bootstrap\flexdll-*.tar.gz del bootstrap\flexdll-*.tar.gz - del bootstrap\ocaml\bin\*.byte.exe - del bootstrap\ocaml\lib\ocaml\expunge.exe - for /f %%D in ('dir /b/ad bootstrap\ocaml-*') do ( - rd /s/q bootstrap\%%D - rem Directory needs to exist, as the Cygwin bootstraps OCAMLLIB refers to it - rem and bootstrap-ocaml.sh assumes it will exist even when regenerating the - rem config. - md bootstrap\%%D - ) -) else ( - if not exist bootstrap\installed-packages "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make --no-print-directory -C src_ext reset-lib-pkg" - if exist current-lib-pkg-list "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && GEN_CONFIG_ONLY=1 shell/bootstrap-ocaml.sh %OCAML_PORT%" || exit /b 1 -) - -if exist current-lib-pkg-list ( - "%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make lib-pkg" || exit /b 1 - move current-lib-pkg-list bootstrap\installed-packages -) - -goto :EOF - -:build -if "%OCAML_PORT%" equ "" ( - rem make install doesn't yet work for the native Windows builds - set POST_COMMAND=^&^& make opam-installer install -) -set LIB_EXT= -if "%DEP_MODE%" equ "lib-ext" set VENDORED_DEPS=--with-vendored-deps -set PRIVATE_RUNTIME= -if "%OCAML_PORT:~0,5%" equ "mingw" set PRIVATE_RUNTIME=--with-private-runtime -set WITH_MCCS=--with-mccs -if "%DEP_MODE%" equ "lib-pkg" set WITH_MCCS= -"%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER %LIB_PKG% && ./configure %VENDORED_DEPS% %PRIVATE_RUNTIME% %WITH_MCCS% %LIB_EXT%" || exit /b 1 -"%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && echo DUNE_PROFILE=dev >> Makefile.config" || exit /b 1 -"%CYG_ROOT%\bin\bash.exe" -lc "cd $APPVEYOR_BUILD_FOLDER && make opam %POST_COMMAND%" || exit /b 1 -goto :EOF - -:test -rem Configure Git for Windows (for the testsuite, this isn't strictly necessary -rem as Git-for-Windows will pick up $HOME/.gitconfig for Cygwin's git) -git config --global user.email travis@example.com -git config --global user.name Travis -rem Configure Cygwin's Git -"%CYG_ROOT%\bin\bash.exe" -lc "git config --global user.email travis@example.com" -"%CYG_ROOT%\bin\bash.exe" -lc "git config --global user.name Travis" -set OPAMCOLOR=always -set PATH_SHIM= -if "%OCAML_PORT%" neq "" if "%GIT_FOR_WINDOWS%" equ "1" ( - set PATH_SHIM=PATH=/cygdrive/c/Program\ Files/Git/cmd:$PATH - "C:\Program Files\Git\cmd\git.exe" config --global core.autocrlf - "C:\Program Files\Git\cmd\git.exe" config --global core.autocrlf true - "C:\Program Files\Git\cmd\git.exe" config --global core.autocrlf -) -"%CYG_ROOT%\bin\bash.exe" -lc "%PATH_SHIM% make -C $APPVEYOR_BUILD_FOLDER tests" || exit /b 1 -rem Can't yet do an opam init with the native Windows builds -if "%OCAML_PORT%" equ "" "%CYG_ROOT%\bin\bash.exe" -lc "make -C $APPVEYOR_BUILD_FOLDER run-appveyor-test" || exit /b 1 -goto :EOF diff --git a/appveyor_test.sh b/appveyor_test.sh deleted file mode 100755 index b642a5c1f24..00000000000 --- a/appveyor_test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -COLD_OCAML="$(sed -ne 's/URL_ocaml = .*ocaml-.*ocaml-\(.*\)\.tar\.gz/ocaml.\1/p' src_ext/Makefile)" -# This is supposed to be able to select ocaml-system using the bootstrap compiler -opam init -y -a --compiler=$COLD_OCAML git+$OPAM_REPO#$OPAM_TEST_REPO_SHA -eval $(opam config env) -opam install -y -v ocamlfind From 34ee9a8b1d4fc359171280107e15145915053bd5 Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 16 Feb 2022 17:47:05 +0100 Subject: [PATCH 2/2] change configure but no generation --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index b91e37bb66e..9fe19b1e40a 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,11 @@ AC_ARG_WITH([private_runtime], [For a mingw-w64 build, manifest the runtime DLLs locally in Opam.Runtime.arch]),,[with_private_runtime=no] ) +AC_ARG_ENABLE([frozen_check], + AC_HELP_STRING([--enable-frozen-check], + [Fail on some check necessary for make frozen]),[FROZEN_CHECK=yes],[] +) + AC_ARG_ENABLE([cold_check], AC_HELP_STRING([--enable-cold-check], [Fail on some check necessary for make cold]),[COLD_CHECK=yes],[]