File: appveyor.yml

package info (click to toggle)
kodi 2:17.6+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 87,148 kB
  • sloc: cpp: 588,459; xml: 58,591; ansic: 42,735; sh: 12,932; makefile: 4,785; python: 2,803; objc: 1,075; perl: 1,041; cs: 624; java: 500; asm: 294; sed: 16
file content (119 lines) | stat: -rw-r--r-- 4,312 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
os: Visual Studio 2015

shallow_clone: true

environment:
  CONFIG: Release
  matrix:
    - BUILD: Kodi
    # - ADDONS: adsp
    # - ADDONS: audiodecoder
    # - ADDONS: audioencoder
    # - ADDONS: pvr
    # - ADDONS: screensaver
    # - ADDONS: visualization

init:
  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

install:
  - SET PATH=C:\Program Files (x86)\CMake\bin;C:\msys64\bin;C:\msys64\usr\bin;%PATH%
  - bash -lc "pacman --needed --noconfirm -Sy"
  - mklink /j %APPVEYOR_BUILD_FOLDER%\project\BuildDependencies\msys64 C:\msys64

build_script:
  # Setup Visual Studio compiler environment 
  - ps: $ErrorActionPreference= 'silentlycontinue'
  
  # Setup Visual Studio compiler environment 
  - call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat"
  
  #
  # Build Kodi
  #
  - ps: |
      if ($env:BUILD -eq "Kodi") {
        # Download dependencies
        cd $env:APPVEYOR_BUILD_FOLDER\project\BuildDependencies
        & .\DownloadBuildDeps.bat
        
        # We are using AppVeyor's already installed msys64 environment,
        # no need to install msys/mingw environment.
        
        # Download precompiled mingw32 libraries
        # To run make-mingwlibs.bat on AppVeyor takes too long, 
        # we must use precompiled libs to speed up build
        bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-ffmpeg-3.1.1-1-any.pkg.tar.xz | tar xJv"
        bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdcss-1.4.0-1-any.pkg.tar.xz | tar xJv"
        bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdnav-5.0.3-1-any.pkg.tar.xz | tar xJv"
        bash -c "wget -O - http://repo.msys2.org/mingw/i686/mingw-w64-i686-libdvdread-5.0.3-1-any.pkg.tar.xz | tar xJv"
        # Rename all precompiled lib*.dll.a -> *.lib, so MSVC will find them
        Get-ChildItem mingw32\lib\lib*.dll.a | %{
          $new_name = $_.Name.SubString(3) -replace ".dll.a", ".lib"
          $new_fullname = Join-Path $_.DirectoryName $new_name
          Rename-Item $_.FullName $new_fullname
        }
        # Copy all libs and includes under Kodi's dependencies folder
        xcopy /s /y mingw32\*.* .
        xcopy /s /y mingw32\bin\*.dll $env:APPVEYOR_BUILD_FOLDER\system\
        # Build  
        mkdir $env:APPVEYOR_BUILD_FOLDER\kodi-build
        cd $env:APPVEYOR_BUILD_FOLDER\kodi-build
        cmd /c 'cmake -G "Visual Studio 14" ..\project\cmake 2>&1'
        cmd /c 'cmake --build . --target all_build --config RelWithDebInfo 2>&1'
      }
  
  #
  # Build Addons
  #
  - ps: |
      if ($env:ADDONS.length -ne 0 -and $env:BUILD -ne "Kodi") {
        # Bootstrap
        cd $env:APPVEYOR_BUILD_FOLDER\tools\buildsteps\win32
        & .\bootstrap-addons.bat
        
        # Create build folder
        md -Force $env:APPVEYOR_BUILD_FOLDER\build | out-null
        cd $env:APPVEYOR_BUILD_FOLDER\build
        # Configure
        cmake -DADDONS_TO_BUILD="$env:ADDONS".* `
              -G "NMake Makefiles" `
              -DCMAKE_BUILD_TYPE="$env:CONFIG" `
              -DCMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER"\addons `
              $env:APPVEYOR_BUILD_FOLDER\project\cmake\addons
        # Build selected addons one by one
        $addons_success=""
        $addons_failed=""
        nmake supported_addons | %{
          if ($_ -like "ALL_ADDONS_BUILDING: *") {
            $_.SubString(21).Split(" ") | %{
              Write-Host "Building " $_
              nmake $_
              if ($LASTEXITCODE -eq 0) {
                $addons_success += $_ + " "
              } else {
                $addons_failed += $_  + " "
              }
            }
          }
        }
        # Print succesful and failed addons
        Write-Host "--------------------------------------------------"
        if ($addons_success -ne "") {
          $addons_success.Split(" ") | %{
            if ($_ -ne "") { 
              Write-Host [SUCCESS] $_ -ForegroundColor Green 
            }
          }
        }
        if ($addons_failed -ne "") {
          $addons_failed.Split(" ") | %{
            if ($_ -ne "") { 
              Write-Host [ ERROR ] $_ -ForegroundColor Red
            }
          } 
          exit 1
        }
      }

test: off