From b23abfbf7ec1549c242b631722539c17595922ac Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Sat, 20 Jan 2018 21:56:26 -0800 Subject: Add appveyor support --- appveyor.yml | 26 ++++++++++++++++++++++++++ ci/appveyor/install.bat | 30 ++++++++++++++++++++++++++++++ ci/appveyor/pack.bat | 18 ++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 appveyor.yml create mode 100644 ci/appveyor/install.bat create mode 100644 ci/appveyor/pack.bat diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..a049989 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,26 @@ +version: 1.0.{build} + +environment: + matrix: + - COMPILER: msys2 + PLATFORM: x64 + MSYS2_ARCH: x86_64 + MSYS2_DIR: msys64 + MSYSTEM: MINGW64 + BIT: 64 + +install: + # running under CI + - '%APPVEYOR_BUILD_FOLDER%\ci\appveyor\install.bat' + - 'echo End intall at: & time /t' + +build_script: + - 'pushd %APPVEYOR_BUILD_FOLDER%' + - 'make -f %APPVEYOR_BUILD_FOLDER%\Makefile' + +after_build: + - '%APPVEYOR_BUILD_FOLDER%\ci\appveyor\pack.bat' + +artifacts: + - path: '*.zip' + - path: '*.tar' diff --git a/ci/appveyor/install.bat b/ci/appveyor/install.bat new file mode 100644 index 0000000..307682a --- /dev/null +++ b/ci/appveyor/install.bat @@ -0,0 +1,30 @@ +@echo off + +cd %APPVEYOR_BUILD_FOLDER% + +echo Compiler: %COMPILER% +echo Architecture: %MSYS2_ARCH% +echo Platform: %PLATFORM% +echo MSYS2 directory: %MSYS2_DIR% +echo MSYS2 system: %MSYSTEM% +echo Bits: %BIT% + +REM Create a writeable TMPDIR +mkdir %APPVEYOR_BUILD_FOLDER%\tmp +set TMPDIR=%APPVEYOR_BUILD_FOLDER%\tmp + +IF %COMPILER%==msys2 ( + @echo on + SET "PATH=C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;C:\%MSYS2_DIR%\home\appveyor\.cask\bin;%PATH%" + + bash -lc "pacman -S --needed --noconfirm git" + + REM dependencies + bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-zlib mingw-w64-x86_64-libpng mingw-w64-x86_64-poppler mingw-w64-x86_64-imagemagick openssl mingw-w64-x86_64-openssl" + + REM Set up emacs + bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-emacs" + + REM Set up Cask + bash -lc "curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python" +) diff --git a/ci/appveyor/pack.bat b/ci/appveyor/pack.bat new file mode 100644 index 0000000..7077f26 --- /dev/null +++ b/ci/appveyor/pack.bat @@ -0,0 +1,18 @@ +@echo off + +cd %APPVEYOR_BUILD_FOLDER% + +REM Create a writeable TMPDIR +mkdir %APPVEYOR_BUILD_FOLDER%\pack +set PACKDIR=%APPVEYOR_BUILD_FOLDER%\pack + +IF %COMPILER%==msys2 ( + @echo on + SET "PATH=C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;C:\%MSYS2_DIR%\home\appveyor\.cask\bin;%PATH%" + + REM Copy epdfinfo.exe and all dependencies + bash -lc "pushd /c/projects/pdf-tools; ldd server/epdfinfo.exe | grep mingw | cut -d' ' -f 3 | xargs -I {} cp {} ./pack/; cp server/epdfinfo.exe ./pack/; cp /mingw64/bin/*eay32.dll ./pack/" + + REM Package epdfinfo.exe and all dependencies + 7z a epdfinfo.zip %PACKDIR%\*.* +) -- cgit v1.0 From 5fbea71a7b598172a12ebd8a7af5132c3297d617 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Mon, 22 Jan 2018 22:19:00 -0800 Subject: Make autobuild target for now Appveyor build times out at `cask package .` step when `make all`. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a049989..3736fba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,7 +16,7 @@ install: build_script: - 'pushd %APPVEYOR_BUILD_FOLDER%' - - 'make -f %APPVEYOR_BUILD_FOLDER%\Makefile' + - 'make autobuild -f %APPVEYOR_BUILD_FOLDER%\Makefile' after_build: - '%APPVEYOR_BUILD_FOLDER%\ci\appveyor\pack.bat' -- cgit v1.0