File: appveyor.yml

package info (click to toggle)
freelan 2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,868 kB
  • sloc: cpp: 37,251; ansic: 4,038; python: 436; sh: 327; makefile: 22
file content (69 lines) | stat: -rw-r--r-- 2,227 bytes parent folder | download
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
version: 2.2.{build}

shallow_clone: true

image: Visual Studio 2017

environment:
  matrix:
    - platform: x64
      ARCH_BITS: 64
      INSTALLER_BITS: amd64
    - platform: x86
      ARCH_BITS: 32
      INSTALLER_BITS: x86

configuration:
  - Release
  - Debug

init:
  - '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%'

install:
  - cinst cmake
  # Install python wheels, necessary to install SCons via pip
  - python -m pip install wheel
  # Install SCons
  - python -m pip install scons==2.5.1
  - scons --version

before_build:
  - vcpkg install libiconv --triplet %PLATFORM%-windows-static
  - vcpkg install boost-asio boost-thread boost-system boost-program-options boost-filesystem boost-iostreams boost-random boost-foreach --triplet %PLATFORM%-windows-static
  - vcpkg install curl --triplet %PLATFORM%-windows-static
  - vcpkg install openssl --triplet %PLATFORM%-windows-static
  # Updates vcpkg packages to have miniupnpc.
  # As appveyor previously cache builds for all ports (boost, openssl...), we
  # do that now to avoid to rebuild everything.
  - cd C:\Tools\vcpkg
  - git pull
  - .\bootstrap-vcpkg.bat
  - cd %APPVEYOR_BUILD_FOLDER%
  - vcpkg install miniupnpc --triplet %PLATFORM%-windows-static

build_script:
  - 'nmake -f Makefile.windows build_%CONFIGURATION%_%PLATFORM%'

after_build:
  - 7z a BuildArtifacts.zip install\*
  - ps: >-
          $gitHash = $env:APPVEYOR_REPO_COMMIT.Substring(0, 8);
          $zipFile   = "freelan-binary-$env:platform-$gitHash.zip";
          Push-AppveyorArtifact "BuildArtifacts.zip" -FileName $zipFile;

          If ($env:Configuration -Match "Release") {
            scons -C packaging\windows --arch=%INSTALLER_BITS%

            $setupFile = "freelan-setup-$env:platform-$gitHash.exe";
            $installerFile = Get-ChildItem -Path .\packaging\windows\ -Filter *.exe | Select-Object -First 1;
            Push-AppveyorArtifact $installerFile.FullName -FileName $setupFile;
          }

branches:
    only:
        - master

on_failure:
#  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))