pulsar/appveyor.yml

97 lines
2.5 KiB
YAML

image: Visual Studio 2015
version: "{build}"
skip_tags: true
clone_folder: c:\projects\atom
clone_depth: 10
branches:
only:
- master
- /^[0-9.]+-releases$/
platform:
- x64
- x86
environment:
global:
ATOM_DEV_RESOURCE_PATH: c:\projects\atom
TEST_JUNIT_XML_ROOT: c:\projects\junit-test-results
NODE_VERSION: 6.9.4
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 -g npm@5.3.0
build_script:
- CD %APPVEYOR_BUILD_FOLDER%
- IF NOT EXIST C:\tmp MKDIR C:\tmp
- SET SQUIRREL_TEMP=C:\tmp
- IF [%TASK%]==[installer] (
IF [%APPVEYOR_REPO_BRANCH:~-9%]==[-releases] (
ECHO Building on release branch - Creating production artifacts &&
script\build.cmd --code-sign --compress-artifacts --create-windows-installer
) ELSE (
IF [%APPVEYOR_REPO_BRANCH%]==[master] IF NOT DEFINED APPVEYOR_PULL_REQUEST_NUMBER (
ECHO Building on master 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\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)
}