/
azure-pipelines.yml
77 lines (64 loc) · 2.15 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# specific tag
trigger:
tags:
include:
- '*'
jobs:
- job:
displayName: 'Linux'
pool:
vmImage: 'Ubuntu-16.04'
steps:
- script: git submodule update --init --recursive
displayName: 'Fetch third party dependency'
- script: |
sudo add-apt-repository ppa:beineri/opt-qt-5.12.0-xenial -y
sudo apt-get update -qq
sudo apt-get -y install qt512base libgl1-mesa-dev qt512svg qt512imageformats
source /opt/qt*/bin/qt*-env.sh
- task: CMake@1
displayName: 'Generate make-files'
inputs:
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=Release'
- script: cd $(Build.SourcesDirectory)/build && make -j 8
displayName: 'Make'
- script: |
source /opt/qt*/bin/qt*-env.sh
cd $(Build.SourcesDirectory)/build
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage
export VERSION=`git describe --tags`
mv ../.ci/linux/default.desktop . && mv ../.ci/linux/icon.png .
./linuxdeployqt*.AppImage ./CPEditor -appimage
displayName: 'Package to AppImage'
- task: GitHubRelease@1
inputs:
gitHubConnection: github.com_coder3101
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
title: 'CP Editor'
isPreRelease: endsWith(variables['Build.SourceBranch'], 'dev'))
assets: $(Build.SourcesDirectory)/build/CP_*
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
- job:
displayName: 'Windows'
pool:
vmImage: 'vs2017-win2016'
steps:
- script: |
git submodule update --recursive --init
displayName: 'Fetch dependencies'
- task: CMake@1
inputs:
cmakeArgs: '.. $(CMakeArgs) -DCMAKE_BUILD_TYPE=Release'
- task: MSBuild@1
displayName: 'Build solution build/CPEditor.sln'
inputs:
solution: build/CPEditor.sln
msbuildArguments: '/m /p:Configuration=Release'