forked from jcsteh/osara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
101 lines (91 loc) · 3.4 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
version: "2021.1pre-{build}"
branches:
only:
- master
environment:
matrix:
- job_name: Windows
appveyor_build_worker_image: Visual Studio 2019
PY_PYTHON: 3.9-32
- job_name: Mac
appveyor_build_worker_image: macos
global:
encFileKey:
secure: hN4Qfteiu6qqPajSvT+vrPfVoazOY+MFAlwUt/kZSnM=
crowdinAuthToken:
secure: 7DTljIEjNzKsCtWTf9iKT8LhRApXcEnPVzIoN1puxBeGhQlp9UcHOT/LQIp4Ddo6jU74HoZn4D9UzdjsEgRgEj34QGDv+gjpsc9HN9PevKho1TYfAZDEAVM0OZl2NaVt
init:
- ps: |
If (([regex]::Matches($env:APPVEYOR_BUILD_VERSION, "," )).count -eq 0) {
If ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
Update-AppveyorBuild -Version ("pr$env:APPVEYOR_PULL_REQUEST_NUMBER-$env:APPVEYOR_BUILD_NUMBER," + $env:APPVEYOR_REPO_COMMIT.Substring(0, 8))
} Else {
Update-AppveyorBuild -Version ("$env:APPVEYOR_BUILD_VERSION," + $env:APPVEYOR_REPO_COMMIT.Substring(0, 8))
}
}
- cmd: py -m pip --disable-pip-version-check install --no-warn-script-location scons
- sh: pip3 install --user scons
clone_depth: 1
install:
- ps: |
If (!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
cd ci
# Decrypt files.
openssl enc -aes-256-cbc -md md5 -d -pass pass:$env:encFileKey -in ssh_id_rsa.enc -out ssh_id_rsa
# Install ssh stuff.
If ($IsMacOS) {
mkdir $HOME/.ssh
chmod 700 $HOME/.ssh
}
Copy-Item ssh_id_rsa $HOME/.ssh/id_rsa
If ($IsMacOS) {
chmod 600 $HOME/.ssh/id_rsa
}
Add-Content -Path $HOME/.ssh/known_hosts -Value $(Get-Content ssh_known_hosts )
cd ..
}
- git submodule update --init
- sh: sudo xcode-select -s /Applications/Xcode-12.3.app
build_script:
- ps: If ($IsWindows) { $scons = "c:\python39\scripts\scons.exe" } Else { $scons = "/Users/appveyor/Library/Python/3.9/bin/scons" }
# We only build the pot on Windows. The choice of which OS is
# arbitrary, but there's no point in building it on both.
- ps: If ($IsWindows) { $targets = "installer", "pot" }
- ps: '& $scons version=$env:APPVEYOR_BUILD_VERSION publisher="James Teh" $targets'
artifacts:
- path: installer/*.exe
- path: installer/*.dmg
- path: locale/*.pot
deploy_script:
- ps: |
If (!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
$installer = Get-ChildItem -Name installer/*.exe, installer/*.dmg
$data = @{
os=$(If ($IsWindows) { "win" } Else { "mac" });
jobId=$env:APPVEYOR_JOB_ID;
version=$env:APPVEYOR_BUILD_VERSION;
installer=$installer
}
if ($IsWindows) { $data["pot"] = Get-ChildItem -Name locale/*.pot }
ConvertTo-Json -InputObject $data -Compress | ssh [email protected] osaraCiHook
if ($IsWindows) {
py -m pip --disable-pip-version-check install --no-warn-script-location requests
# We must explicitly specify the Python version here because
# crowdinSync has a shebang line which causes the wrong version to be
# used.
py -3.9-32 ci\crowdinSync uploadPot
}
}
notifications:
- provider: GitHubPullRequest
on_build_status_changed: false
template: |-
{{#passed}}Build succeeded!{{/passed}}{{#failed}}Build failed!{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})
{{#passed}}Downloads:{{#jobs}}
<details>
<summary>{{name}}</summary>
{{#artifacts}}
- [{{fileName}}]({{permalink}})
{{/artifacts}}
</details>
{{/jobs}}{{/passed}}