From 2fee07f74a89dcdf526260934acd36ee71c9ccfa Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Wed, 19 Jul 2017 15:47:13 +0200 Subject: Make AppVeyor generate Windows package. --- appveyor.yml | 28 +++++++++++++++++----------- dev/build/windows/appveyor.sh | 8 -------- dev/ci/appveyor.bat | 35 +++++++++++++++++++++++++++++++++++ dev/ci/appveyor.sh | 9 +++++++++ 4 files changed, 61 insertions(+), 19 deletions(-) delete mode 100644 dev/build/windows/appveyor.sh create mode 100644 dev/ci/appveyor.bat create mode 100644 dev/ci/appveyor.sh diff --git a/appveyor.yml b/appveyor.yml index ea31075a6..64c1bedb5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,18 +8,24 @@ image: - Visual Studio 2017 environment: - CYGROOT: C:\cygwin64 CYGMIRROR: http://ftp.inf.tu-dresden.de/software/windows/cygwin32 - CYGCACHE: C:\cygwin64\var\cache\setup - opam_url: https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.1/opam64.tar.xz - -install: -- cmd: '%CYGROOT%\setup-x86_64.exe -qnNdO -R %CYGROOT% -l %CYGCACHE% -s - %CYGMIRROR% -P rsync -P patch -P diffutils -P make -P unzip -P m4 -P findutils -P time' -- cmd: '%CYGROOT%/bin/bash -l %APPVEYOR_BUILD_FOLDER%/dev/build/windows/appveyor.sh' + matrix: + - USEOPAM: true + ARCH: 64 + - USEOPAM: false + ARCH: 32 + - USEOPAM: false + ARCH: 64 build_script: -- cmd: '%CYGROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./configure -local && make"' +- cmd: 'call %APPVEYOR_BUILD_FOLDER%\dev\ci\appveyor.bat' + +test: off + +artifacts: + - path: 'dev\nsis\*.exe' + name: installer + + - path: 'coq-opensource-archive-*.zip' + name: opensource-archive -test_script: -- cmd: '%CYGROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER && make byte && make -C test-suite all INTERACTIVE= && make validate"' diff --git a/dev/build/windows/appveyor.sh b/dev/build/windows/appveyor.sh deleted file mode 100644 index 53f7a2346..000000000 --- a/dev/build/windows/appveyor.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -e -x -wget $opam_url -tar -xf opam64.tar.xz -bash opam64/install.sh -opam init -a mingw https://github.com/fdopen/opam-repository-mingw.git --comp 4.02.3+mingw64c --switch 4.02.3+mingw64c -eval $(opam config env) -opam install -y ocamlfind camlp5 diff --git a/dev/ci/appveyor.bat b/dev/ci/appveyor.bat new file mode 100644 index 000000000..ca6a5643c --- /dev/null +++ b/dev/ci/appveyor.bat @@ -0,0 +1,35 @@ +REM This script either runs the test suite with OPAM (if USEOPAM is true) or +REM builds the Coq binary packages for windows (if USEOPAM is false). + +if %ARCH% == 32 ( + SET ARCHLONG=i686 + SET CYGROOT=C:\cygwin + SET SETUP=setup-x86.exe +) + +if %ARCH% == 64 ( + SET ARCHLONG=x86_64 + SET CYGROOT=C:\cygwin64 + SET SETUP=setup-x86_64.exe +) + +SET CYGCACHE=%CYGROOT%\var\cache\setup +SET APPVEYOR_BUILD_FOLDER_MFMT=%APPVEYOR_BUILD_FOLDER:\=/% +SET APPVEYOR_BUILD_FOLDER_CFMT=%APPVEYOR_BUILD_FOLDER_MFMT:C:/=/cygdrive/c/% +SET DESTCOQ=C:\coq%ARCH%_inst +SET COQREGTESTING=Y + +if %USEOPAM% == false ( + call %APPVEYOR_BUILD_FOLDER%\dev\build\windows\MakeCoq_MinGW.bat -threads=1 ^ + -arch=%ARCH% -installer=Y -coqver=%APPVEYOR_BUILD_FOLDER_CFMT% ^ + -destcyg=%CYGROOT% -destcoq=%DESTCOQ% -cygcache=%CYGCACHE% ^ + -setup %CYGROOT%\%SETUP% + copy "%CYGROOT%\build\coq-local\dev\nsis\*.exe" dev\nsis + 7z a coq-opensource-archive-%ARCHLONG%.zip %CYGROOT%\build\tarballs\* +) + +if %USEOPAM% == true ( + %CYGROOT%\%SETUP% -qnNdO -R %CYGROOT% -l %CYGCACHE% -s %CYGMIRROR% ^ + -P rsync -P patch -P diffutils -P make -P unzip -P m4 -P findutils -P time + %CYGROOT%/bin/bash -l %APPVEYOR_BUILD_FOLDER%/dev/ci/appveyor.sh +) diff --git a/dev/ci/appveyor.sh b/dev/ci/appveyor.sh new file mode 100644 index 000000000..524a55a42 --- /dev/null +++ b/dev/ci/appveyor.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e -x +wget https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.1/opam64.tar.xz +tar -xf opam64.tar.xz +bash opam64/install.sh +opam init -a mingw https://github.com/fdopen/opam-repository-mingw.git --comp 4.02.3+mingw64c --switch 4.02.3+mingw64c +eval $(opam config env) +opam install -y ocamlfind camlp5 +cd $APPVEYOR_BUILD_FOLDER && ./configure -local && make && make byte && make -C test-suite all INTERACTIVE= && make validate -- cgit v1.2.3