forked from atom/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
107 lines (94 loc) · 2.97 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
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
image: Visual Studio 2015
version: "{build}"
skip_tags: true
clone_folder: c:\projects\atom
clone_depth: 10
branches:
only:
- master
- /^[0-9.]+-releases$/
- /^electron-[0-9.]+$/
platform:
- x64
- x86
environment:
global:
ATOM_DEV_RESOURCE_PATH: c:\projects\atom
ATOM_JASMINE_REPORTER: list
TEST_JUNIT_XML_ROOT: c:\projects\junit-test-results
NODE_VERSION: 8.9.3
matrix:
- TASK: test
- TASK: installer
matrix:
fast_finish: true
exclude:
- platform: x86
TASK: test
install:
- IF NOT EXIST %TEST_JUNIT_XML_ROOT% MKDIR %TEST_JUNIT_XML_ROOT%
- SET PATH=C:\Program Files\Atom\resources\cli;%PATH%
- ps: Install-Product node $env:NODE_VERSION $env:PLATFORM
- npm install --global [email protected]
build_script:
- CD %APPVEYOR_BUILD_FOLDER%
- IF NOT EXIST C:\tmp MKDIR C:\tmp
- SET SQUIRREL_TEMP=C:\tmp
- IF [%APPVEYOR_REPO_BRANCH:~-9%]==[-releases] SET IS_RELEASE_BRANCH=true
- IF [%APPVEYOR_REPO_BRANCH%]==[master] IF NOT DEFINED APPVEYOR_PULL_REQUEST_NUMBER SET IS_SIGNED_ZIP_BRANCH=true
- IF [%APPVEYOR_REPO_BRANCH:~0,9%]==[electron-] SET IS_SIGNED_ZIP_BRANCH=true
- IF [%TASK%]==[installer] (
IF [%IS_RELEASE_BRANCH%]==[true] (
ECHO Building on release branch - Creating production artifacts &&
script\build.cmd --code-sign --compress-artifacts --create-windows-installer
) ELSE (
IF [%IS_SIGNED_ZIP_BRANCH%]==[true] (
ECHO Building on %APPVEYOR_REPO_BRANCH% branch - Creating signed zips &&
script\build.cmd --code-sign --compress-artifacts
) ELSE (
ECHO Skipping installer build for non-release/non-master branch
)
)
) ELSE (
ECHO Test build only - Not creating artifacts &&
script\build.cmd
)
test_script:
- IF [%TASK%]==[test] (
script\lint.cmd &&
script\test.cmd
) ELSE (
ECHO Skipping tests on installer build matrix row
)
deploy: off
artifacts:
- path: out\AtomSetup.exe
name: AtomSetup.exe
- path: out\atom-windows.zip
name: atom-windows.zip
- path: out\RELEASES
name: RELEASES
- path: out\AtomSetup-x64.exe
name: AtomSetup-x64.exe
- path: out\atom-x64-windows.zip
name: atom-x64-windows.zip
- path: out\RELEASES-x64
name: RELEASES-x64
- path: out\atom-*-delta.nupkg
name: atom-delta.nupkg
- path: out\atom-*-full.nupkg
name: atom-full.nupkg
cache:
- '%APPVEYOR_BUILD_FOLDER%\electron'
- '%USERPROFILE%\.atom\.apm'
- '%USERPROFILE%\.atom\compile-cache'
on_finish:
- ps: |
$wc = New-Object 'System.Net.WebClient'
$endpoint = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
Write-Output "Searching for JUnit XML output beneath $($env:TEST_JUNIT_XML_ROOT)"
Get-ChildItem -Path $env:TEST_JUNIT_XML_ROOT -Recurse -File -Name -Include "*.xml" | ForEach-Object {
$full = "$($env:TEST_JUNIT_XML_ROOT)\$($_)"
Write-Output "Uploading JUnit XML file $($full)"
$wc.UploadFile($endpoint, $full)
}