-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
95 lines (89 loc) · 2.66 KB
/
azure-pipelines.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
trigger:
branches:
include:
- main
pr: [main]
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
parameters:
- name: publishPackage
displayName: 🚀 Publish
type: boolean
default: false
extends:
template: azure-pipelines/npm-package/pipeline.yml@templates
parameters:
npmPackages:
- name: vscode-policy-watcher
buildSteps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- script: |
set -e
includes=$(cat << 'EOF'
{
"target_defaults": {
"conditions": [
["OS=='linux'", {
'cflags_cc!': [ '-std=gnu++20' ],
'cflags_cc': [ '-std=gnu++2a' ],
}]
]
}
}
EOF
)
if [ ! -d "$HOME/.gyp" ]; then
mkdir -p "$HOME/.gyp"
fi
echo "$includes" > "$HOME/.gyp/include.gypi"
displayName: Override gnu target for older sysroot
condition: eq(variables['Agent.OS'], 'Linux')
- script: npm ci
testPlatforms:
- name: Linux
nodeVersions: [20.16.x]
- name: MacOS
nodeVersions: [20.16.x]
- name: Windows
nodeVersions: [20.16.x]
testSteps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- script: |
set -e
includes=$(cat << 'EOF'
{
"target_defaults": {
"conditions": [
["OS=='linux'", {
'cflags_cc!': [ '-std=gnu++20' ],
'cflags_cc': [ '-std=gnu++2a' ],
}]
]
}
}
EOF
)
if [ ! -d "$HOME/.gyp" ]; then
mkdir -p "$HOME/.gyp"
fi
echo "$includes" > "$HOME/.gyp/include.gypi"
displayName: Override gnu target for older sysroot
condition: eq(variables['Agent.OS'], 'Linux')
- script: npm ci
env:
npm_config_disturl: https://electronjs.org/headers
npm_config_target: 32.1.2
npm_config_runtime: electron
npm_config_build_from_source: true
apiScanSoftwareName: 'vscode-policy-watcher'
apiScanSoftwareVersion: '1.1'
publishPackage: ${{ parameters.publishPackage }}