aboutsummaryrefslogtreecommitdiff
path: root/azure-pipelines.yml
blob: b5077168f9abbfe3caa7c185642d0aac81239a51 (plain)
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
# Azure DevOps Pipelines YAML schema
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema

# build number format
name: $(Date:yyyyMMdd)$(Rev:.r) # https://docs.microsoft.com/en-us/azure/devops/pipelines/build/options?view=azure-devops&tabs=yaml#build-number-format

trigger:
  batch: true # batch changes if true, start a new build for every push if false
  branches:
    include:
      - master
      - macos-build
    exclude:
      - refs/tags/*

pr: none # disable PR triggers

# we use only one stage, so we can directly define its jobs

# jobs run in parallel unless dependsOn is set in job
# TODO: it would be nice to build automatically for Linux and Windows, too
jobs:

  - job: build_macos
    displayName: Build for macOS
    pool:
      # see all available images on Microsoft-hosted VMs
      # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
      vmImage: 'macos-10.14'
    # tasks catalog: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/?view=azure-devops
    steps:
      # bash is shortcut for task Bash@3
      # docs: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/bash?view=azure-devops
      - bash: brew install qt libelf
        displayName: Install Qt and libelf using brew
      - bash: echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.bash_profile
        displayName: Add Qt to the path
      - task: Bash@3
        displayName: Print qmake version
        inputs:
          targetType: inline
          script: qmake --version
          noProfile: false
          noRc: false
      - task: Bash@3
        displayName: Run build script
        inputs:
          targetType: file
          filePath: ./build-macos.sh
          noProfile: false
          noRc: false
      # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-pipeline-artifact?view=azure-devops
      - task: PublishPipelineArtifact@0
        inputs:
          artifactName: 'qtmips'
          targetPath: build/qtmips.zip