forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
57 lines (50 loc) · 3.02 KB
/
appveyor.yml
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
version: '{branch}.{build}'
shallow_clone: false
platform: x64
skip_branch_with_pr: true
clone_folder: C:\gopath\src\github.com\DataDog\datadog-agent
# environment must be set for python 64 bit
environment:
GOPATH: C:\gopath
GOVERSION: '1.14.12'
GOROOT: C:\go_1.14.12
GOLANGCI_LINT_VERSION: "1.27.0"
# Give hints to CMake to find Pythons
Python2_ROOT_DIR: C:\Python27-x64
Python3_ROOT_DIR: C:\Python37-x64
PIP3: pip3 -q
MSYS_ROOT: C:\msys64
# GLIB-URL: http://ftp.gnome.org/pub/gnome/binaries/win64/glib/2.26/glib_2.26.1-1_win64.zip
# PKG-CONFIG-URL: http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/pkg-config_0.23-2_win64.zip
# GETTEXT-URL: http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/gettext-runtime_0.18.1.1-2_win64.zip
install:
# create 'ddagentuser' user to test the secrets feature on windows
- ps: $Password = ConvertTo-SecureString "dummyPW_:-gch6Rejae9" -AsPlainText -Force; New-LocalUser -Name "ddagentuser" -Description "Test user for the secrets feature on windows." -Password $Password
- set PATH=%APPVEYOR_BUILD_FOLDER%\dev\lib;%GOPATH%\bin;%Python2_ROOT_DIR%;%Python2_ROOT_DIR%\Scripts;%Python3_ROOT_DIR%;%Python3_ROOT_DIR%\Scripts;%MSYS_ROOT%\mingw64\bin;%MSYS_ROOT%\usr\bin\;%PATH%
- "%PIP3% install codecov -r requirements.txt"
# download specific go version
- md c:\tmp
- ps: $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;(New-Object System.Net.WebClient).DownloadFile("https://dl.google.com/go/go$ENV:GOVERSION.windows-amd64.zip", "c:\tmp\godl.zip")
- ps: '& 7z -o"c:\tmp\go_$ENV:GOVERSION" x c:\tmp\godl.zip'
- move "c:\tmp\go_%GOVERSION%\go" %GOROOT%
- set PATH=%GOROOT%\bin;%PATH%
# installing golangci-lint
- ps: $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;(New-Object System.Net.WebClient).DownloadFile("https://github.com/golangci/golangci-lint/releases/download/v$ENV:GOLANGCI_LINT_VERSION/golangci-lint-$ENV:GOLANGCI_LINT_VERSION-windows-amd64.zip", "c:\tmp\golangci-lint.zip")
- ps: '& 7z -o"c:\tmp\golangci-lint\" x c:\tmp\golangci-lint.zip'
- move "c:\tmp\golangci-lint\golangci-lint.exe-%GOLANGCI_LINT_VERSION%-windows-amd64\golangci-lint.exe" %GOROOT%\bin
cache:
- '%GOPATH%\bin'
- '%LOCALAPPDATA%\pip\Cache'
- '%GOPATH%\pkg\mod'
build: off
test_script:
- inv -e deps
- inv -e rtloader.make --install-prefix=%APPVEYOR_BUILD_FOLDER%\dev --cmake-options="-G \"MSYS Makefiles\""
- inv -e rtloader.install
- inv -e rtloader.format --raise-if-changed
- inv -e rtloader.test
- inv -e test --python-runtimes 3 --coverage --profile --fail-on-fmt --python-home-2=%Python2_ROOT_DIR% --python-home-3=%Python3_ROOT_DIR%
- codecov -f profile.cov -F windows
# uncomment to debug builds
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))