forked from sedwards2009/extraterm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
169 lines (163 loc) · 6.6 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: $(Date:yyyyMMdd)$(Rev:.r)_$(SourceBranchName)
variables:
nodeVersion: '18.12.1'
trigger:
branches:
include:
- master
- release/*
- bundle
tags:
include:
- v*
jobs:
- job: commands_zip
displayName: "Build commands.zip"
pool:
vmImage: 'Ubuntu-20.04'
steps:
- script: |
sudo apt-get update
sudo apt-get install pkg-config build-essential
sudo apt-get install cmake make
sudo apt-get install mesa-common-dev libglu1-mesa-dev
displayName: "Install development packages"
- script: rm -rf ~/.cache/nodegui-mini-qt-nodejs || true
- script: yarn --version
displayName: 'yarn --version'
- script: yarn install
displayName: 'yarn install'
- script: node build_scripts/azure_release_version_check.mjs $(Build.SourceBranch)
displayName: Check for tag and package.json version
- script: yarn run package-commands-zip --use-version=$(git describe --tags)
displayName: 'Run yarn package-commands-zip'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/build_tmp'
contents: '*.zip'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'commands build output'
targetPath: '$(Build.ArtifactStagingDirectory)'
- job: package_linux
displayName: "Build Linux packages"
pool:
vmImage: 'Ubuntu-20.04'
steps:
- script: |
sudo apt-get update
sudo apt-get install pkg-config build-essential
sudo apt-get install cmake make
sudo apt-get install xserver-xorg-core mesa-common-dev libglu1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0
displayName: "Install development packages"
- script: |
wget -c https://github.com/AppImageCommunity/pkg2appimage/releases/download/continuous/pkg2appimage-1807-x86_64.AppImage
chmod +x ./pkg2appimage-*.AppImage
mv pkg2appimage-*.AppImage pkg2appimage.AppImage
sudo mv pkg2appimage.AppImage /usr/local/bin
displayName: "Set up pkg2appimage"
- script: which pkg2appimage.AppImage
displayName: "which pkg2appimage.AppImage"
- script: rm -rf ~/.cache/nodegui-mini-qt-nodejs || true
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
- script: yarn --version
displayName: 'yarn --version'
- script: yarn install
displayName: "yarn install"
- script: node build_scripts/azure_release_version_check.mjs $(Build.SourceBranch)
displayName: Check for tag and package.json version
- script: "yarn run download-launcher-executable"
displayName: "Download the launcher executable"
- script: yarn run lint-strict
displayName: "yarn run lint-strict"
- script: yarn run build
displayName: "yarn run build"
- script: yarn run test
displayName: "yarn run test"
- script: git branch --show-current
displayName: "git branch --show-current"
- script: yarn run package
displayName: "yarn run package"
- script: cp $(Build.SourcesDirectory)/tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip $(Build.ArtifactStagingDirectory)
- script: cp $(Build.SourcesDirectory)/tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.deb $(Build.ArtifactStagingDirectory)
- script: cp $(Build.SourcesDirectory)/tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.AppImage $(Build.ArtifactStagingDirectory)
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Linux build output'
targetPath: '$(Build.ArtifactStagingDirectory)'
- job: package_windows
displayName: "Build Windows packages"
pool:
vmImage: 'windows-latest'
steps:
- script: choco install nsis -y
displayName: "install nsis"
- script: choco install zip -y
displayName: "install zip"
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
- script: yarn --version
displayName: 'yarn --version'
- script: yarn install
displayName: "yarn install"
- script: node build_scripts/azure_release_version_check.mjs $(Build.SourceBranch)
displayName: Check for tag and package.json version
- script: "yarn run download-launcher-executable"
displayName: "Download the launcher executable"
- script: yarn run lint-strict
displayName: "yarn run lint-strict"
- script: yarn run build
displayName: "yarn run build"
- script: yarn run test
displayName: "yarn run test"
- script: yarn run package
displayName: "yarn run package"
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/tmp-jam-pack-nodegui/jam-pack-nodegui-work'
contents: '*.zip'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/tmp-jam-pack-nodegui/jam-pack-nodegui-work'
contents: '*.exe'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Windows build output'
targetPath: '$(Build.ArtifactStagingDirectory)'
- job: package_macos
displayName: "Build macOS packages"
pool:
vmImage: 'macos-11'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
- script: yarn --version
displayName: 'yarn --version'
- script: yarn install
displayName: "yarn install"
- script: node build_scripts/azure_release_version_check.mjs $(Build.SourceBranch)
displayName: Check for tag and package.json version
- script: "yarn run download-launcher-executable"
displayName: "Download the launcher executable"
- script: yarn run lint-strict
displayName: "yarn run lint-strict"
- script: yarn run build
displayName: "yarn run build"
- script: yarn run test
displayName: "yarn run test"
- script: yarn run package
displayName: "yarn run package"
- script: |
cp $(Build.SourcesDirectory)/tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip $(Build.ArtifactStagingDirectory)
cp $(Build.SourcesDirectory)/tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.dmg $(Build.ArtifactStagingDirectory)
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'macOS build output'
targetPath: '$(Build.ArtifactStagingDirectory)'