Browse Source

Merge pull request #3345 from nextcloud/ci/testAppveyor

Ci/test appveyor
Matthieu Gallien 4 years ago
parent
commit
45538857cf
2 changed files with 49 additions and 42 deletions
  1. 26 18
      appveyor.ini
  2. 23 24
      appveyor.yml

+ 26 - 18
appveyor.ini

@@ -1,7 +1,6 @@
 [General]
 Branch = master
 ShallowClone = True
-Command=craft
 
 # Variables defined here override the default value
 # The variable names are casesensitive
@@ -13,33 +12,42 @@ CreateCache = False
 # Settings applicable for all Crafts matrices
 # Settings are Category/key=value
 # Category is case sensitive
-
 [GeneralSettings]
-General/EMERGE_PKGDSTDIR=${Variables:APPVEYOR_BUILD_FOLDER}/binaries
-Paths/python = C:\Python36
-Paths/python27 = C:\Python27
+
+## This is the location of your python installation.
+## This value must be set.
+Paths/Python = C:\Python39-x64
+Paths/Python27 = C:\Python27-x64
+
+Compile/BuildType = RelWithDebInfo
+
+Compile/UseNinja = True
+
 Paths/downloaddir = ${Variables:Root}\downloads
 ShortPath/Enabled = False
 ShortPath/EnableJunctions = True
 ShortPath/JunctionDir = C:\CM-SP\
-Packager/CacheDir = ${Variables:Root}\cache
-Packager/UseCache = ${Variables:UseCache}
-Packager/CreateCache = ${Variables:CreateCache}
+
 ; Packager/RepositoryUrl = https://files.kde.org/craft/
-Packager/PackageType = PortablePackager
+Packager/PackageType = NullsoftInstallerPackager
 Packager/RepositoryUrl = http://ftp.acc.umu.se/mirror/kde.org/files/craft/master/
-Compile/BuildType = RelWithDebInfo
+
 ContinuousIntegration/Enabled = True
 
+## This option can be used to override the default make program
+## change the value to the path of the executable you want to use instead.
+Compile/MakeProgram = jom
+
+Packager/UseCache = ${Variables:UseCache}
+Packager/CreateCache = ${Variables:CreateCache}
+Packager/CacheDir = ${Variables:Root}\cache
+
 [BlueprintSettings]
 # don't try to pip install on the ci
 python-modules.ignored = True
+nextcloud-client.buildTests = True
+binary/mysql.useMariaDB = False
 
-libs/qt5.version = 5.9.3
-craft/craft-core.version = master
-
-[windows-msvc2017_64-cl]
-General/ABI = windows-msvc2017_64-cl
-
-[windows-msvc2017_32-cl]
-General/ABI = windows-msvc2017_32-cl
+[windows-msvc2019_64-cl]
+QtSDK/Compiler = msvc2019_64
+General/ABI = windows-msvc2019_64-cl

+ 23 - 24
appveyor.yml

@@ -1,50 +1,49 @@
 version: '{build}-{branch}'
 
+image: Visual Studio 2019
+
 branches:
   only:
     - master
 
-clone_depth: 50
-
+clone_depth: 1
 
 init:
 - ps: |
-    function craft($target) {
-        & 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 $target -c $args
+    function craft() {
+        cmd /C "echo %PATH%"
+        & "C:\Python39-x64\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 -c $args
         if($LASTEXITCODE -ne 0) {exit $LASTEXITCODE}
     }
+    function crafttests() {
+        cmd /C "echo %PATH%"
+        & "C:\Python39-x64\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 -c $args
+    }
 
 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"
-
-    craft $env:TARGET -i craft
-    craft $env:TARGET --install-deps owncloud-client
+    & cmd /C "git clone -q --depth=1 https://invent.kde.org/packaging/craftmaster.git C:\CraftMaster\CraftMaster 2>&1"
+    craft --add-blueprint-repository [git]https://github.com/nextcloud/desktop-client-blueprints.git
+    craft craft
+    craft --install-deps nextcloud-client
+    craft nsis
 
 build_script:
 - ps: |
-    craft $env:TARGET --no-cache --src-dir $env:APPVEYOR_BUILD_FOLDER owncloud-client
-
-after_build:
-- ps: |
-    craft $env:TARGET --src-dir $env:APPVEYOR_BUILD_FOLDER --package owncloud-client
-
-
-on_finish:
-- ps: |
-    Get-ChildItem $env:USERPROFILE\.craft\* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
+    craft --src-dir $env:APPVEYOR_BUILD_FOLDER nextcloud-client
+    craft --package --src-dir $env:APPVEYOR_BUILD_FOLDER nextcloud-client
+    cp C:\CraftMaster\windows-msvc2019_64-cl\tmp\*.7z $env:APPVEYOR_BUILD_FOLDER
+    cp C:\CraftMaster\windows-msvc2019_64-cl\tmp\*.exe $env:APPVEYOR_BUILD_FOLDER
 
 test_script:
 - ps: |
-   craft $env:TARGET --src-dir $env:APPVEYOR_BUILD_FOLDER --test owncloud-client
+    crafttests --test --src-dir $env:APPVEYOR_BUILD_FOLDER nextcloud-client
 
 environment:
     matrix:
-    - TARGET: windows-msvc2017_32-cl
-      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
-    - TARGET: windows-msvc2017_64-cl
-      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+    - TARGET: windows-msvc2019_64-cl
 
 artifacts:
-  - path: binaries/*
+  - path: '*.7z'
+  - path: '*.exe'