Browse Source

switch to GitHub Actions

Ashish Kulkarni 4 years ago
parent
commit
6e5fe32932
3 changed files with 98 additions and 58 deletions
  1. 71 0
      .github/workflows/official.yml
  2. 27 0
      .github/workflows/unpatched.yml
  3. 0 58
      .travis.yml

+ 71 - 0
.github/workflows/official.yml

@@ -0,0 +1,71 @@
+name: Official
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  linux:
+    name: Qt 4.8 on Linux
+    runs-on: ubuntu-20.04
+    steps:
+      - name: checkout source
+        uses: actions/checkout@v2
+        with:
+          path: wkhtmltopdf
+          submodules: true
+      - name: checkout packaging
+        uses: actions/checkout@v2
+        with:
+          repository: wkhtmltopdf/packaging
+          path: packaging
+      - name: build
+        run: cd packaging && python3 ./build package-docker buster-amd64 ../wkhtmltopdf
+
+  macos:
+    name: Qt 4.8 on macOS
+    runs-on: macos-10.15
+    steps:
+      - name: checkout source
+        uses: actions/checkout@v2
+        with:
+          path: wkhtmltopdf
+          submodules: true
+      - name: checkout packaging
+        uses: actions/checkout@v2
+        with:
+          repository: wkhtmltopdf/packaging
+          path: packaging
+      - name: setup build environment
+        run: |
+          brew install conan
+          pip3 install pyyaml
+          sudo gem install fpm --no-document
+          sudo xcode-select --switch /Library/Developer/CommandLineTools
+          sed -i -e 's/CFLAGS CXXFLAGS LDFLAGS/CFLAGS CXXFLAGS OBJECTIVE_CFLAGS LDFLAGS/g' wkhtmltopdf/qt/configure
+          sed -i -e 's/compiler.version=9.0/compiler.version=11.0/g' packaging/.conan/profiles/macos-cocoa
+      - name: build
+        run: cd packaging && MACOSX_DEPLOYMENT_TARGET=10.7 python3 ./build vagrant macos-cocoa --clean --version - - ../wkhtmltopdf
+
+  windows:
+    name: Qt 4.8 on Windows
+    runs-on: windows-2019
+    steps:
+      - name: checkout source
+        uses: actions/checkout@v2
+        with:
+          path: wkhtmltopdf
+          submodules: true
+      - name: checkout packaging
+        uses: actions/checkout@v2
+        with:
+          repository: wkhtmltopdf/packaging
+          path: packaging
+      - name: setup build environment
+        run: |
+          choco install -yr --no-progress vcbuildtools -ia "/Full"
+          pip install -q conan
+          cmd /c attrib "C:\Program Files (x86)\Windows Kits\10\include\wdf" +H
+      - name: build
+        run: cd packaging && python ./build vagrant msvc2015-win64 --clean --version - - ../wkhtmltopdf

+ 27 - 0
.github/workflows/unpatched.yml

@@ -0,0 +1,27 @@
+name: Unpatched
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  qt4:
+    name: Qt 4.8 on Linux
+    runs-on: ubuntu-18.04
+    steps:
+      - uses: actions/checkout@v2
+      - name: install packages
+        run: sudo apt-get install -y libqtwebkit-dev
+      - name: build
+        run: qmake-qt4 CONFIG+=silent && make
+
+  qt5:
+    name: Qt 5.12 on Linux
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+      - name: install packages
+        run: sudo apt-get install -y libqt5webkit5-dev libqt5xmlpatterns5-dev libqt5svg5-dev
+      - name: build
+        run: qmake CONFIG+=silent && make

+ 0 - 58
.travis.yml

@@ -1,58 +0,0 @@
-language: cpp
-dist:     xenial
-notifications:
-  email:  false
-services:
-  - docker
-
-matrix:
-  include:
-    - os:         linux
-      env:        TARGET=system-qt4-linux
-      addons:
-        apt:
-          packages:
-          - libqtwebkit-dev
-
-    - os:         linux
-      env:        TARGET=system-qt5-linux
-      addons:
-        apt:
-          packages:
-          - libqt5webkit5-dev
-          - libqt5xmlpatterns5-dev
-          - libqt5svg5-dev
-
-    - os:         linux
-      env:        TARGET=custom-qt4-linux
-
-    - os:         osx
-      osx_image:  xcode9.3
-      env:        TARGET=custom-qt4-macos
-
-    - os:         windows
-      env:        TARGET=custom-qt4-windows
-
-install:
-- sed -i -e 's/quiet = 0/quiet = 1/g' qt/bin/syncqt
-- test -n "$CC"  && unset CC
-- test -n "$CXX" && unset CXX
-- git clone https://github.com/wkhtmltopdf/packaging.git ../packaging
-
-script:
-- >
-    if   [[ $TARGET == "system-qt4-linux"   ]]; then qmake-qt4 CONFIG+=silent && make;
-    elif [[ $TARGET == "system-qt5-linux"   ]]; then /usr/lib/x86_64-linux-gnu/qt5/bin/qmake CONFIG+=silent && make;
-    elif [[ $TARGET == "custom-qt4-linux"   ]]; then ../packaging/build compile-docker stretch-amd64   $PWD ../build;
-    elif [[ $TARGET == "custom-qt4-windows" ]]; then
-        choco install -yr --no-progress python2 nsis vcbuildtools && \
-        choco install -yr --no-progress cmake --installargs 'ADD_CMAKE_TO_PATH=System' && \
-        export PATH="$(powershell -Command '("Process", "Machine" | % { [Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", "" } | Select -Unique | % { cygpath $_ }) -Join ":"')" && \
-        C:/Python27/Scripts/pip install -q conan && \
-        sed -i 's/-W3/-w/g' qt/mkspecs/win32-msvc2015/qmake.conf && \
-        C:/Python27/python ../packaging/build vagrant msvc2015-win64 --version - - $PWD;
-    elif [[ $TARGET == "custom-qt4-macos"   ]]; then
-        brew install conan && sudo -H pip install pyyaml --ignore-installed six && sudo gem install fpm --no-ri --no-rdoc && \
-        sudo xcode-select --switch /Library/Developer/CommandLineTools && \
-        MACOSX_DEPLOYMENT_TARGET=10.7 ../packaging/build vagrant macos-cocoa --clean --version - - $PWD;
-    fi