azure-pipelines.yml 6.31 KB
Newer Older
1 2 3
resources:
- repo: self

4 5 6 7
trigger:
- master
- maint/*

David Staheli committed
8
jobs:
9 10
- job: linux_amd64_xenial_gcc_openssl
  displayName: 'Linux (amd64; Xenial; GCC; OpenSSL)'
11
  pool:
12
    vmImage: 'ubuntu-18.04'
13
  steps:
Edward Thomson committed
14 15
  - template: azure-pipelines/docker.yml
    parameters:
16
      docker:
17 18
        image: xenial
        base: ubuntu:xenial
Edward Thomson committed
19 20
      environmentVariables: |
       CC=gcc
21
       CMAKE_GENERATOR=Ninja
22
       CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
23
       GITTEST_NEGOTIATE_PASSWORD=${{ variables.GITTEST_NEGOTIATE_PASSWORD }}
Edward Thomson committed
24

25 26
- job: linux_amd64_xenial_gcc_mbedtls
  displayName: 'Linux (amd64; Xenial; GCC; mbedTLS)'
Edward Thomson committed
27
  pool:
28
    vmImage: 'ubuntu-18.04'
Edward Thomson committed
29 30 31
  steps:
  - template: azure-pipelines/docker.yml
    parameters:
32
      docker:
33 34
        image: xenial
        base: ubuntu:xenial
Edward Thomson committed
35 36
      environmentVariables: |
       CC=gcc
37
       CMAKE_GENERATOR=Ninja
38
       CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
39
       GITTEST_NEGOTIATE_PASSWORD=${{ variables.GITTEST_NEGOTIATE_PASSWORD }}
Edward Thomson committed
40

41 42
- job: linux_amd64_xenial_clang_openssl
  displayName: 'Linux (amd64; Xenial; Clang; OpenSSL)'
Edward Thomson committed
43
  pool:
44
    vmImage: 'ubuntu-18.04'
Edward Thomson committed
45 46 47
  steps:
  - template: azure-pipelines/docker.yml
    parameters:
48
      docker:
49 50
        image: xenial
        base: ubuntu:xenial
Edward Thomson committed
51 52
      environmentVariables: |
       CC=clang
53
       CMAKE_GENERATOR=Ninja
54
       CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
55
       GITTEST_NEGOTIATE_PASSWORD=${{ variables.GITTEST_NEGOTIATE_PASSWORD }}
Edward Thomson committed
56

57 58
- job: linux_amd64_xenial_clang_mbedtls
  displayName: 'Linux (amd64; Xenial; Clang; mbedTLS)'
Edward Thomson committed
59
  pool:
60
    vmImage: 'ubuntu-18.04'
Edward Thomson committed
61 62 63
  steps:
  - template: azure-pipelines/docker.yml
    parameters:
64
      docker:
65 66
        image: xenial
        base: ubuntu:xenial
Edward Thomson committed
67 68
      environmentVariables: |
       CC=clang
69
       CMAKE_GENERATOR=Ninja
70
       CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
71
       GITTEST_NEGOTIATE_PASSWORD=${{ variables.GITTEST_NEGOTIATE_PASSWORD }}
Edward Thomson committed
72 73

- job: macos
74
  displayName: 'macOS (amd64; 10.15)'
Edward Thomson committed
75
  pool:
76
    vmImage: 'macOS-10.15'
Edward Thomson committed
77
  steps:
78
  - bash: . '$(Build.SourcesDirectory)/azure-pipelines/setup-osx.sh'
Edward Thomson committed
79 80
    displayName: Setup
  - template: azure-pipelines/bash.yml
81 82
    parameters:
      environmentVariables:
Edward Thomson committed
83 84
        TMPDIR: $(Agent.TempDirectory)
        PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
85
        CMAKE_GENERATOR: Ninja
86
        CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
87
        SKIP_SSH_TESTS: true
88
        GITTEST_NEGOTIATE_PASSWORD: ${{ variables.GITTEST_NEGOTIATE_PASSWORD }}
89

Edward Thomson committed
90 91
- job: windows_vs_amd64
  displayName: 'Windows (amd64; Visual Studio)'
92 93
  pool:
    vmImage: 'vs2017-win2016'
Edward Thomson committed
94
  steps:
95
  - template: azure-pipelines/bash.yml
Edward Thomson committed
96 97
    parameters:
      environmentVariables:
98 99
        CMAKE_GENERATOR: Visual Studio 15 2017
        CMAKE_OPTIONS: -A x64 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON
100
        SKIP_SSH_TESTS: true
101
        SKIP_NEGOTIATE_TESTS: true
Edward Thomson committed
102 103 104

- job: windows_vs_x86
  displayName: 'Windows (x86; Visual Studio)'
105 106
  pool:
    vmImage: 'vs2017-win2016'
Edward Thomson committed
107
  steps:
108
  - template: azure-pipelines/bash.yml
Edward Thomson committed
109 110
    parameters:
      environmentVariables:
111 112
        CMAKE_GENERATOR: Visual Studio 15 2017
        CMAKE_OPTIONS: -A Win32 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS
113
        SKIP_SSH_TESTS: true
114
        SKIP_NEGOTIATE_TESTS: true
Edward Thomson committed
115 116 117

- job: windows_mingw_amd64
  displayName: 'Windows (amd64; MinGW)'
118 119
  pool:
    vmImage: 'vs2017-win2016'
Edward Thomson committed
120
  steps:
121
  - bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
Edward Thomson committed
122 123 124 125
    displayName: Setup
    env:
      TEMP: $(Agent.TempDirectory)
      ARCH: amd64
126
  - template: azure-pipelines/bash.yml
Edward Thomson committed
127 128
    parameters:
      environmentVariables:
129
        BUILD_PATH: $(Agent.TempDirectory)\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
130 131
        CMAKE_GENERATOR: MinGW Makefiles
        CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
132
        SKIP_SSH_TESTS: true
133
        SKIP_NEGOTIATE_TESTS: true
Edward Thomson committed
134 135 136

- job: windows_mingw_x86
  displayName: 'Windows (x86; MinGW)'
137 138
  pool:
    vmImage: 'vs2017-win2016'
Edward Thomson committed
139
  steps:
140
  - bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
Edward Thomson committed
141 142 143 144 145
    displayName: Setup
    workingDirectory: '$(Build.BinariesDirectory)'
    env:
      TEMP: $(Agent.TempDirectory)
      ARCH: x86
146
  - template: azure-pipelines/bash.yml
Edward Thomson committed
147 148
    parameters:
      environmentVariables:
149
        BUILD_PATH: $(Agent.TempDirectory)\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
150 151
        CMAKE_GENERATOR: MinGW Makefiles
        CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
152
        SKIP_SSH_TESTS: true
153
        SKIP_NEGOTIATE_TESTS: true
Edward Thomson committed
154 155 156 157

- job: documentation
  displayName: 'Generate Documentation'
  pool:
158
    vmImage: 'ubuntu-18.04'
Edward Thomson committed
159 160
  steps:
  - script: |
161 162 163 164
      cd $(Build.SourcesDirectory)/azure-pipelines/docker
      docker build -t libgit2/docurium --build-arg BASE=ubuntu:trusty -f docurium .
    displayName: 'Build Docker image'
  - script: |
Edward Thomson committed
165 166 167
      git config user.name 'Documentation Generation'
      git config user.email 'libgit2@users.noreply.github.com'
      git branch gh-pages origin/gh-pages
168
      docker run --rm -v $(Build.SourcesDirectory):/home/libgit2/source -w /home/libgit2/source libgit2/docurium:latest cm doc api.docurium
Edward Thomson committed
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
      git checkout gh-pages
      cp -R * '$(Build.BinariesDirectory)'
    displayName: 'Generate Documentation'
  - task: archivefiles@2
    displayName: 'Archive Documentation'
    inputs:
      rootFolderOrFile: '$(Build.BinariesDirectory)'
      includeRootFolder: false
      archiveFile: '$(Build.ArtifactStagingDirectory)/api-documentation.zip'
  - task: publishbuildartifacts@1
    displayName: 'Upload Documentation Artifact'
    inputs:
      pathToPublish: '$(Build.ArtifactStagingDirectory)'
      artifactName: 'docs'
  - script: |
      git remote -v
      echo 'machine github.com' > ~/.netrc
      echo 'login $(GITHUB_USERNAME)' >> ~/.netrc
      echo 'password $(GITHUB_PAT)' >> ~/.netrc
      git push origin gh-pages
    displayName: 'Publish Documentation'
190
    condition: and(eq(variables['Build.Repository.Name'], 'libgit2/libgit2'), eq(variables['Build.Reason'], 'IndividualCI'))