wip: Test Travis CI for Windows sput/test-travis-win test-travis-01
authorManuel Nickschas <sputnick@quassel-irc.org>
Sat, 30 May 2020 17:10:36 +0000 (19:10 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 31 May 2020 12:50:52 +0000 (14:50 +0200)
.appveyor.yml [deleted file]
.craft.ini [new file with mode: 0644]
.travis.yml

diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100644 (file)
index 39aa535..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-version: '{build}'
-
-image: Visual Studio 2017
-
-init:
-- ps: |
-    function craft() {
-        & C:\python36\python.exe "C:\CraftMaster\$env:TARGET\craft\bin\craft.py" $args
-        if($LASTEXITCODE -ne 0) {exit $LASTEXITCODE}
-    }
-
-install:
-- ps: |
-    #use cmd to silence powershell behaviour for stderr
-    & cmd /C "git clone -q --depth=1 git://anongit.kde.org/craftmaster.git C:\CraftMaster\CraftMaster 2>&1"
-    & C:\python36\python.exe C:\CraftMaster\CraftMaster\CraftMaster.py --config $env:APPVEYOR_BUILD_FOLDER\.appveyor.ini --variables "APPVEYOR_BUILD_FOLDER=$env:APPVEYOR_BUILD_FOLDER" --target $env:TARGET
-    craft --add-blueprint-repository https://github.com/quassel/craft-blueprints-quassel.git
-    craft -p quassel/quassel
-    craft nsis
-    craft --install-deps quassel/quassel
-
-build_script:
-- ps: |
-    craft --no-cache --src-dir $env:APPVEYOR_BUILD_FOLDER quassel/quassel
-
-after_build:
-- ps: |
-    craft --src-dir $env:APPVEYOR_BUILD_FOLDER --package quassel/quassel
-
-test_script:
-- ps: |
-    craft --src-dir $env:APPVEYOR_BUILD_FOLDER --test quassel/quassel
-
-environment:
-    matrix:
-    - TARGET: windows-msvc2017_64-cl
-
-artifacts:
-  - path: binaries\*
diff --git a/.craft.ini b/.craft.ini
new file mode 100644 (file)
index 0000000..af07c83
--- /dev/null
@@ -0,0 +1,34 @@
+[General]
+Command = craft
+Branch = master
+ShallowClone = True
+
+# Variables defined here override the default value
+# The variable names are case sensitive
+[Variables]
+BUILD_DIR = ${Variables:Root}
+
+# Settings applicable for all Crafts matrices
+# Settings are Category/key=value
+# Category is case sensitive
+[GeneralSettings]
+Paths/Python = C:\Python38
+Paths/Python27 = C:\Python27
+ShortPath/Enabled = False
+Compile/BuildType = Release
+ContinuousIntegration/Enabled = True
+Packager/Destination = ${Variables:BUILD_DIR}/binaries
+
+# the version of the config
+Version/ConfigVersion = 6
+
+[BlueprintSettings]
+quassel/quassel.version = master
+
+binary/mysql.ignored = True
+libs/dbus.ignored = True
+libs/llvm-meta.ignored = True
+dev-utils/msys.ignored = True
+
+[windows-msvc2017_64-cl]
+General/ABI = windows-msvc2017_64-cl
index 28e76c3..ef8102e 100644 (file)
@@ -3,55 +3,7 @@ sudo: required
 services:
   - docker
 
-# Define build matrix for Linux
-os: linux
-dist: bionic
-language: generic  # No host compilation
-
-env:
-  - DIST=xenial CXX=g++     CMAKE_OPTIONS="-DWITH_KDE=OFF -DWITH_WEBKIT=OFF"
-  - DIST=xenial CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=OFF -DWITH_WEBKIT=OFF"
-  - DIST=xenial CXX=g++     CMAKE_OPTIONS="-DWITH_KDE=ON  -DWITH_WEBKIT=ON"
-  - DIST=xenial CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=ON  -DWITH_WEBKIT=ON"
-  - DIST=bionic CXX=g++     CMAKE_OPTIONS="-DWITH_KDE=ON  -DWITH_WEBKIT=ON"
-  - DIST=bionic CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=ON  -DWITH_WEBENGINE=ON"
-  - DIST=cosmic CXX=g++     CMAKE_OPTIONS="-DWITH_KDE=ON  -DWITH_WEBENGINE=ON"
-  - DIST=cosmic CXX=clang++ CMAKE_OPTIONS="-DWITH_KDE=ON  -DWITH_WEBENGINE=ON"
-
-# Set up cache
-cache:
-  directories:
-    - $TRAVIS_BUILD_DIR/ccache
-
-# Prepare
-before_install:
-  - docker pull quassel/quassel-build-env:$DIST
-  - docker images
-  - mkdir build
-
-# Build inside the docker image
-# Source, build and ccache directories are bind-mounted into the container
-script:
-  - |
-    docker run -t -w /build --rm \
-               -v "$(readlink -f .):/src" \
-               -v "$(readlink -f build):/build" \
-               -v "$(readlink -f ccache):/ccache" \
-               -e CCACHE_DIR=/ccache \
-               -e CCACHE_MAXSIZE=1G \
-               -e CXX=$CXX \
-               quassel/quassel-build-env:$DIST \
-               sh -c "cmake /src $CMAKE_OPTIONS \
-                            -GNinja \
-                            -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-                            -DBUILD_TESTING=ON \
-                            -DFATAL_WARNINGS=ON \
-                      && ninja install \
-                      && ccache -s \
-                      && ctest -VV \
-                     "
-
-# Define a separate job for OSX
+# Define a separate job for Windows
 jobs:
   include:
     - os: osx
@@ -76,16 +28,54 @@ jobs:
           cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DDEPLOY=$DEPLOY
           ninja install
         - ccache -s
-        - ctest -VV
+        - ctest
+      deploy:
+        provider: releases
+        api_key: $GH_TOKEN
+        file_glob: true
+        file: *.dmg
+        skip_cleanup: true
+        on:
+          tags: true
+          condition: $GH_TOKEN != ''
+    - os: windows
+      language: bash
+      before_install:
+        - export TARGET=windows-msvc2017_64-cl
+        #- export GITHUB_TOKEN=$GH_TOKEN
+        - |
+          function python {
+              /C/python38/python.exe "$@"
+          }
+        - |
+          function craft {
+              python /C/CraftMaster/$TARGET/craft/bin/craft.py "$@"
+          }
+        - choco install python2
+        - choco install python3
+      install:
+        - git clone --depth=1 https://invent.kde.org/kde/craftmaster.git /C/CraftMaster/CraftMaster
+        - python /C/CraftMaster/CraftMaster/CraftMaster.py --config $TRAVIS_BUILD_DIR/.craft.ini --variables "BUILD_DIR=$TRAVIS_BUILD_DIR"
+        - craft --add-blueprint-repository https://github.com/quassel/craft-blueprints-quassel.git
+        - craft -p quassel/quassel
+        - craft nsis
+        - craft --install-deps quassel/quassel
+      script:
+        - craft --no-cache --src-dir $TRAVIS_BUILD_DIR quassel/quassel
+        - craft --no-cache --src-dir $TRAVIS_BUILD_DIR --test quassel/quassel
+      after_success:
+        - craft --no-cache --src-dir $TRAVIS_BUILD_DIR --package quassel/quassel
+        - ls $TRAVIS_BUILD_DIR/*
+        - ls $TRAVIS_BUILD_DIR/binaries/*
       deploy:
         provider: releases
-        api_key: "${GH_TOKEN}"
+        api_key: $GH_TOKEN
         file_glob: true
-        file:
-          - "QuasselClient_MacOSX-x86_64_*.dmg"
-          - "QuasselCore_MacOSX-x86_64_*.dmg"
-          - "QuasselMono_MacOSX-x86_64_*.dmg"
+        file: $TRAVIS_BUILD_DIR/binaries/*
         skip_cleanup: true
         on:
           tags: true
-          condition: "$GH_TOKEN != ''"
+          condition: $GH_TOKEN != ''
+      #cache:
+      #  directories:
+      #    - $HOME/AppData/Local/Temp/chocolatey