forked from Biswa96/wslbridge2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
62 lines (48 loc) · 1.49 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
# This file is part of wslbridge2 project
# Licensed under the GNU General Public License version 3
# Copyright (C) Biswapriyo Nath
# Build image
image:
- Ubuntu
- Visual Studio 2019
# Version format
version: "0.{build}"
# Start builds on tags only
skip_non_tags: true
# Only build the master branch
branches:
only:
- master
# Only build for X86_64 architecture
platform: x64
environment:
backendJob: 'image: Ubuntu'
before_build:
- sh: |
make -s RELEASE=1
- cmd: |
set PATH=C:\cygwin64;C:\cygwin64\bin;C:\cygwin64\usr\bin;%PATH%
make -s RELEASE=1
build_script:
- ps: |
if ($env:APPVEYOR_JOB_NAME -eq $env:backendJob)
{
Get-ChildItem .\bin\wslbridge2-backend | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
}
if ($env:APPVEYOR_JOB_NAME -ne $env:backendJob)
{
$headers = @{ "Content-type" = "application/json" }
$ProjectUri="https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG"
$project = Invoke-RestMethod -Uri $ProjectUri -Headers $headers -Method GET
$jobToWaitJson = $project.build.jobs | where {$_.name -eq $env:backendJob}
$jobToWaitId = $jobToWaitJson.jobId;
Start-FileDownload "https://ci.appveyor.com/api/buildjobs/$jobToWaitId/artifacts/wslbridge2-backend"
Move-Item -path .\wslbridge2-backend .\bin
}
after_build:
- cmd: |
del bin\*.obj bin\*.o
dir /b bin
7z a -mx9 wslbridge2.zip bin\ > NUL
artifacts:
- path: wslbridge2.zip