]> danny-edel.de - dspdfviewer.git/commitdiff
migrate from travis to github-actions
authorDanny Edel <mail@danny-edel.de>
Sun, 31 Oct 2021 15:29:55 +0000 (16:29 +0100)
committerDanny Edel <mail@danny-edel.de>
Sun, 31 Oct 2021 17:02:07 +0000 (18:02 +0100)
Also, delete appveyor for now, but save the commands in a note.

.github/workflows/fixme-windows.txt [new file with mode: 0644]
.github/workflows/osx.yml [new file with mode: 0644]
.github/workflows/ubuntu.yml [new file with mode: 0644]
_travis/configure [deleted file]
_travis/test [deleted file]

diff --git a/.github/workflows/fixme-windows.txt b/.github/workflows/fixme-windows.txt
new file mode 100644 (file)
index 0000000..f17fd14
--- /dev/null
@@ -0,0 +1,66 @@
+Windows building is not configured yet.
+
+For reference, here is the .appveyor.yml that used to do windows building:
+
+-----
+
+version: '{build}'
+branches:
+  only:
+  - master
+  - /^test-.*/
+os: Visual Studio 2013
+configuration:
+  - Debug
+  - Release
+
+# Before anything else: Download and extract dependency package
+init:
+- ps: (new-object net.webclient).DownloadFile('https://github.com/projekter/dspdfviewer/releases/download/v1.14-42-g4acfb31/DependenciesDyn.rar', 'c:\dependencies.rar')
+- cmd: cd \
+- cmd: 7z x \dependencies.rar
+- cmd: cd \projects\dspdfviewer
+
+# Before build: Let CMake create the solution file
+before_build:
+    - cmd: mkdir \projects\dspdfviewer\build
+    - cmd: cd \projects\dspdfviewer\build
+    - cmd: >
+        cmake ..
+        -G "Visual Studio 12 2013" -T v120_xp
+        -DUseQtFive=ON
+        -DUsePrerenderedPDF=ON
+        -DBoostStaticLink=ON
+        -DWindowsStaticLink=OFF
+        -DRunDualScreenTests=OFF
+        -DBOOST_ROOT=\libraries\boost
+        -DBOOST_LIBRARYDIR=\libraries\boost\lib32-msvc-12.0
+
+build:
+  project: C:\projects\dspdfviewer\build\dspdfviewer.sln
+  parallel: true
+
+before_test:
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\cairo\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\expat\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\fontconfig\lib
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\freetype\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\lcms\lib\MS
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\libiconv\lib
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\libjpeg-turbo\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\libpng\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\libtiff\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\openjpeg\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\deps\zlib\bin
+    - cmd: SET PATH=%PATH%;C:\dspdf\popplerDyn\poppler\bin
+    - cmd: SET PATH=%PATH%;C:\qt\5.5\msvc2013\bin
+    - cmd: if exist Testing\Debug copy C:\dspdf\popplerDyn\poppler\bin\poppler-qt5d.dll Testing\Debug\poppler-qt5.dll
+    - cmd: if exist Testing\Debug copy C:\dspdf\popplerDyn\poppler\bin\poppler-qt5d.dll Debug\poppler-qt5.dll
+    - cmd: if exist Testing\Debug windeployqt Testing\Debug\
+    - cmd: if exist Testing\Debug windeployqt Debug\
+    - cmd: SET CTEST_OUTPUT_ON_FAILURE=1
+    - cmd: if exist Testing\Release windeployqt Testing\Release\
+    - cmd: if exist Testing\Release windeployqt Release\
+
+after_test:
+    - cmd: msbuild RUN_TESTS.vcxproj
diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml
new file mode 100644 (file)
index 0000000..bc8a3bb
--- /dev/null
@@ -0,0 +1,34 @@
+name: osx
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    if: 0 #FIXME:  brew is already on Qt6
+    strategy:
+      matrix:
+        #os: [ macos-latest, macos-10.15 ]
+        #buildtype: [ Debug, Release ]
+        os: [ macos-10.15 ]
+        buildtype: [ Debug ]
+    steps:
+      - uses: actions/checkout@v2
+      - run: brew install boost
+      - run: brew install poppler
+      - name: create build/ dir
+        run: >
+          cmake -B build/
+          -DCMAKE_VERBOSE_MAKEFILE=ON
+          -DUsePrerenderedPDF=ON
+          -DCodeCoverage=ON
+          -DUseQtFive=ON
+          -DCMAKE_BUILD_TYPE=${{matrix.buildtype}}
+          .
+      - run: cmake --build build/
+      - run: ctest --output-on-failure --timeout 60
+        working-directory: build/
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
new file mode 100644 (file)
index 0000000..acf5ad4
--- /dev/null
@@ -0,0 +1,42 @@
+name: ubuntu
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+          os: [ ubuntu-latest, ubuntu-18.04 ]
+          buildtype: [ Debug, Release ]
+    steps:
+      - uses: actions/checkout@v2
+      - run: sudo apt-get update
+      - name: Install build deps
+        run: >
+            sudo apt-get install -y
+            libboost-program-options-dev
+            libboost-test-dev
+            libpoppler-qt5-dev
+            qtbase5-dev
+            qttools5-dev
+            qttools5-dev-tools
+      - name: create build/ dir
+        run: >
+          cmake -B build/
+          -DCMAKE_VERBOSE_MAKEFILE=ON
+          -DUsePrerenderedPDF=ON
+          -DCodeCoverage=ON
+          -DUseQtFive=ON
+          -DCMAKE_BUILD_TYPE=${{matrix.buildtype}}
+          .
+      - run: cmake --build build/
+      - name: run tests within xvfb
+        working-directory: build/
+        run: >
+            xvfb-run -a -s '-screen 0 1920x1080x24 -screen 1 1920x1200x24'
+            ctest --output-on-failure --timeout 60
diff --git a/_travis/configure b/_travis/configure
deleted file mode 100755 (executable)
index f0a6f77..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-
-# Print commands as executed and fail on error
-set -ex
-
-# Test inside-git build system
-mkdir build
-cd build
-
-CMAKE_PARAMETERS="-DCMAKE_VERBOSE_MAKEFILE=ON"
-
-CMAKE_PARAMETERS+=" -DCMAKE_BUILD_TYPE=Debug"
-
-# Use prerendered PDF
-# rather than install pdflatex
-CMAKE_PARAMETERS+=" -DUsePrerenderedPDF=ON"
-
-# OSX specific stuff
-if [ "$TRAVIS_OS_NAME" = "osx" ] ; then
-       # Skip dual screen tests since we don't have
-       # xvfb-run
-       CMAKE_PARAMETERS+=" -DRunDualScreenTests=OFF"
-fi
-
-# Activate code coverage analysis
-CMAKE_PARAMETERS+=" -DCodeCoverage=ON"
-
-# Allow switching Qt version via environment variable
-if [ "$QT_VERSION" -eq 4 ] ; then
-       CMAKE_PARAMETERS+=" -DUseQtFive=OFF"
-elif [ "$QT_VERSION" -eq 5 ] ; then
-       CMAKE_PARAMETERS+=" -DUseQtFive=ON"
-       if [ "$TRAVIS_OS_NAME" = "osx" ] ; then
-               # on OSX/Homebrew, qt5 is not in default search path yet.
-               #
-               # Use brew to find the qt5 prefix and pass it to cmake.
-               QT5PATH=$(brew --prefix qt5)
-               CMAKE_PARAMETERS+=" -DCMAKE_PREFIX_PATH=$QT5PATH"
-       fi
-else
-       echo "Unknown qt version $QT_VERSION" >&2
-       false
-fi
-
-# travis/ccache hack for clang
-if [[ "$CXX" == "clang++" && -x /usr/bin/ccache ]] ; then
-       mkdir -p "$HOME/bin"
-       ln -s "/usr/bin/ccache" "$HOME/bin/clang"
-       ln -s "/usr/bin/ccache" "$HOME/bin/clang++"
-fi
-
-cmake $CMAKE_PARAMETERS ..
diff --git a/_travis/test b/_travis/test
deleted file mode 100755 (executable)
index 8aedf4b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-set -ex
-cd build
-
-# Call CTest test runner within XvFB
-if [ "$TRAVIS_OS_NAME" = "linux" ] ; then
-       xvfb-run -a -s '-screen 0 1920x1080x24 -screen 1 1920x1200x24' \
-               ctest --output-on-failure --timeout 60
-else
-       ctest --output-on-failure --timeout 60
-fi