From e87b3dc88c863ce631ad16d4a31e36c179d449c4 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Tue, 30 Dec 2025 19:11:55 +0530 Subject: feat: move from appveyor to github actions for testing pdf-tools --- .github/workflows/test.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++++ ci/appveyor/install.bat | 21 -------------------- ci/appveyor/pack.bat | 22 --------------------- 3 files changed, 49 insertions(+), 43 deletions(-) delete mode 100644 ci/appveyor/install.bat delete mode 100644 ci/appveyor/pack.bat diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c4fcdee..b87d140 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,3 +80,52 @@ jobs: - name: Run tests run: make test + + build-windows: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: >- + git + base-devel + autoconf + automake + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-libpng + mingw-w64-x86_64-poppler + mingw-w64-x86_64-imagemagick + mingw-w64-x86_64-zlib + mingw-w64-x86_64-openssl + mingw-w64-x86_64-emacs + + - name: Install Cask + run: git clone https://github.com/cask/cask ~/.cask + + - name: Compile epdfinfo server + run: | + export PATH="$HOME/.cask/bin:$PATH" + make autobuild + + - name: Package Windows binaries + run: | + mkdir -p pack + cp server/epdfinfo.exe pack/ + ldd server/epdfinfo.exe | grep mingw | cut -d' ' -f3 | xargs -I {} cp {} pack/ + cp /mingw64/bin/libcrypto*.dll pack/ || true + cp /mingw64/bin/libssl*.dll pack/ || true + + - name: Upload Windows artifact + uses: actions/upload-artifact@v4 + with: + name: epdfinfo-mingw64 + path: pack/ \ No newline at end of file diff --git a/ci/appveyor/install.bat b/ci/appveyor/install.bat deleted file mode 100644 index 0cd8bb0..0000000 --- a/ci/appveyor/install.bat +++ /dev/null @@ -1,21 +0,0 @@ -@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% - -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 dependencies - bash -lc "pacman -S --needed --noconfirm git base-devel automake autoconf 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 mingw-w64-x86_64-emacs" - - REM Set up Cask - bash -lc "git clone https://github.com/cask/cask ~/.cask" -) diff --git a/ci/appveyor/pack.bat b/ci/appveyor/pack.bat deleted file mode 100644 index 6ee0825..0000000 --- a/ci/appveyor/pack.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off - -cd %APPVEYOR_BUILD_FOLDER% - -REM Create a writeable PACKDIR -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/" - - REM Copy openssl dlls to pack - copy C:\%MSYS2_DIR%\%MSYSTEM%\bin\libcrypto*.dll %PACKDIR%\ - copy C:\%MSYS2_DIR%\%MSYSTEM%\bin\libssl*.dll %PACKDIR%\ - - REM Package epdfinfo.exe and all dependencies - 7z a epdfinfo.zip %PACKDIR%\*.* -) -- cgit v1.0