Commit c7e5eca6a300138121d844908faec44a12ddc307

Edward Thomson 2019-02-28T10:46:26

Revert "foo" This reverts commit 1fe3fa5e59818c851d50efc6563db5f8a5d7ae9b.

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 7386eb5..957dd27 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -6,164 +6,152 @@ trigger:
 - maint/*
 
 jobs:
-- job: freebsd
-  displayName: 'FreeBSD (amd64; 12.0)'
+- job: linux_amd64_trusty_gcc_openssl
+  displayName: 'Linux (amd64; Trusty; GCC; OpenSSL)'
   pool:
     vmImage: 'Ubuntu 16.04'
   steps:
-  - template: azure-pipelines/ssh.yml
+  - template: azure-pipelines/docker.yml
+    parameters:
+      imageName: 'libgit2/trusty-amd64:latest'
+      environmentVariables: |
+       CC=gcc
+       CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON
+       LEAK_CHECK=valgrind
+
+- job: linux_amd64_trusty_gcc_mbedtls
+  displayName: 'Linux (amd64; Trusty; GCC; mbedTLS)'
+  pool:
+    vmImage: 'Ubuntu 16.04'
+  steps:
+  - template: azure-pipelines/docker.yml
+    parameters:
+      imageName: 'libgit2/trusty-amd64:latest'
+      environmentVariables: |
+       CC=gcc
+       CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DDEPRECATE_HARD=ON
+       LEAK_CHECK=valgrind
+
+- job: linux_amd64_trusty_clang_openssl
+  displayName: 'Linux (amd64; Trusty; Clang; OpenSSL)'
+  pool:
+    vmImage: 'Ubuntu 16.04'
+  steps:
+  - template: azure-pipelines/docker.yml
+    parameters:
+      imageName: 'libgit2/trusty-amd64:latest'
+      environmentVariables: |
+       CC=clang
+       CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON
+       LEAK_CHECK=valgrind
+
+- job: linux_amd64_trusty_clang_mbedtls
+  displayName: 'Linux (amd64; Trusty; Clang; mbedTLS)'
+  pool:
+    vmImage: 'Ubuntu 16.04'
+  steps:
+  - template: azure-pipelines/docker.yml
+    parameters:
+      imageName: 'libgit2/trusty-amd64:latest'
+      environmentVariables: |
+       CC=clang
+       CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DDEPRECATE_HARD=ON
+       LEAK_CHECK=valgrind
+
+- job: macos
+  displayName: 'macOS'
+  pool:
+    vmImage: 'macOS 10.13'
+  steps:
+  - bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
+    displayName: Setup
+  - template: azure-pipelines/bash.yml
     parameters:
-      remoteHost: 'build@13.92.132.220'
       environmentVariables:
-        CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
+        TMPDIR: $(Agent.TempDirectory)
+        PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
+        LEAK_CHECK: leaks
+        CMAKE_OPTIONS: -G Ninja -DDEPRECATE_HARD=ON
         SKIP_SSH_TESTS: true
 
-#- job: linux_amd64_trusty_gcc_openssl
-#  displayName: 'Linux (amd64; Trusty; GCC; OpenSSL)'
-#  pool:
-#    vmImage: 'Ubuntu 16.04'
-#  steps:
-#  - template: azure-pipelines/docker.yml
-#    parameters:
-#      imageName: 'libgit2/trusty-amd64:latest'
-#      environmentVariables: |
-#       CC=gcc
-#       CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON
-#       LEAK_CHECK=valgrind
-#
-#- job: linux_amd64_trusty_gcc_mbedtls
-#  displayName: 'Linux (amd64; Trusty; GCC; mbedTLS)'
-#  pool:
-#    vmImage: 'Ubuntu 16.04'
-#  steps:
-#  - template: azure-pipelines/docker.yml
-#    parameters:
-#      imageName: 'libgit2/trusty-amd64:latest'
-#      environmentVariables: |
-#       CC=gcc
-#       CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DDEPRECATE_HARD=ON
-#       LEAK_CHECK=valgrind
-#
-#- job: linux_amd64_trusty_clang_openssl
-#  displayName: 'Linux (amd64; Trusty; Clang; OpenSSL)'
-#  pool:
-#    vmImage: 'Ubuntu 16.04'
-#  steps:
-#  - template: azure-pipelines/docker.yml
-#    parameters:
-#      imageName: 'libgit2/trusty-amd64:latest'
-#      environmentVariables: |
-#       CC=clang
-#       CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON
-#       LEAK_CHECK=valgrind
-#
-#- job: linux_amd64_trusty_clang_mbedtls
-#  displayName: 'Linux (amd64; Trusty; Clang; mbedTLS)'
-#  pool:
-#    vmImage: 'Ubuntu 16.04'
-#  steps:
-#  - template: azure-pipelines/docker.yml
-#    parameters:
-#      imageName: 'libgit2/trusty-amd64:latest'
-#      environmentVariables: |
-#       CC=clang
-#       CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DDEPRECATE_HARD=ON
-#       LEAK_CHECK=valgrind
-#
-#- job: macos
-#  displayName: 'macOS'
-#  pool:
-#    vmImage: 'macOS 10.13'
-#  steps:
-#  - bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
-#    displayName: Setup
-#  - template: azure-pipelines/bash.yml
-#    parameters:
-#      environmentVariables:
-#        TMPDIR: $(Agent.TempDirectory)
-#        PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
-#        LEAK_CHECK: leaks
-#        CMAKE_OPTIONS: -G Ninja -DDEPRECATE_HARD=ON
-#        SKIP_SSH_TESTS: true
-#
-#- job: windows_vs_amd64
-#  displayName: 'Windows (amd64; Visual Studio)'
-#  pool: Hosted
-#  steps:
-#  - template: azure-pipelines/powershell.yml
-#    parameters:
-#      environmentVariables:
-#        CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64" -DDEPRECATE_HARD=ON
-#
-#- job: windows_vs_x86
-#  displayName: 'Windows (x86; Visual Studio)'
-#  pool: Hosted
-#  steps:
-#  - template: azure-pipelines/powershell.yml
-#    parameters:
-#      environmentVariables:
-#        CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013" -DDEPRECATE_HARD=ON
-#
-#- job: windows_mingw_amd64
-#  displayName: 'Windows (amd64; MinGW)'
-#  pool: Hosted
-#  steps:
-#  - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
-#    displayName: Setup
-#    env:
-#      TEMP: $(Agent.TempDirectory)
-#      ARCH: amd64
-#  - template: azure-pipelines/powershell.yml
-#    parameters:
-#      environmentVariables:
-#        CMAKE_OPTIONS: -G"MinGW Makefiles" -DDEPRECATE_HARD=ON
-#        PATH: $(Agent.TempDirectory)\mingw64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\CMake\bin
-#
-#- job: windows_mingw_x86
-#  displayName: 'Windows (x86; MinGW)'
-#  pool: Hosted
-#  steps:
-#  - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
-#    displayName: Setup
-#    workingDirectory: '$(Build.BinariesDirectory)'
-#    env:
-#      TEMP: $(Agent.TempDirectory)
-#      ARCH: x86
-#  - template: azure-pipelines/powershell.yml
-#    parameters:
-#      environmentVariables:
-#        CMAKE_OPTIONS: -G"MinGW Makefiles" -DDEPRECATE_HARD=ON
-#        PATH: $(Agent.TempDirectory)\mingw32\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\CMake\bin
-#
-#- job: documentation
-#  displayName: 'Generate Documentation'
-#  pool:
-#    vmImage: 'Ubuntu 16.04'
-#  steps:
-#  - script: |
-#      git config user.name 'Documentation Generation'
-#      git config user.email 'libgit2@users.noreply.github.com'
-#      git branch gh-pages origin/gh-pages
-#      docker run --rm -v $(Build.SourcesDirectory):/src -w /src libgit2/docurium:latest cm doc api.docurium
-#      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'
-#    condition: eq(variables['Build.Reason'], 'IndividualCI')
+- job: windows_vs_amd64
+  displayName: 'Windows (amd64; Visual Studio)'
+  pool: Hosted
+  steps:
+  - template: azure-pipelines/powershell.yml
+    parameters:
+      environmentVariables:
+        CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64" -DDEPRECATE_HARD=ON
+
+- job: windows_vs_x86
+  displayName: 'Windows (x86; Visual Studio)'
+  pool: Hosted
+  steps:
+  - template: azure-pipelines/powershell.yml
+    parameters:
+      environmentVariables:
+        CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013" -DDEPRECATE_HARD=ON
+
+- job: windows_mingw_amd64
+  displayName: 'Windows (amd64; MinGW)'
+  pool: Hosted
+  steps:
+  - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
+    displayName: Setup
+    env:
+      TEMP: $(Agent.TempDirectory)
+      ARCH: amd64
+  - template: azure-pipelines/powershell.yml
+    parameters:
+      environmentVariables:
+        CMAKE_OPTIONS: -G"MinGW Makefiles" -DDEPRECATE_HARD=ON
+        PATH: $(Agent.TempDirectory)\mingw64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\CMake\bin
+
+- job: windows_mingw_x86
+  displayName: 'Windows (x86; MinGW)'
+  pool: Hosted
+  steps:
+  - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
+    displayName: Setup
+    workingDirectory: '$(Build.BinariesDirectory)'
+    env:
+      TEMP: $(Agent.TempDirectory)
+      ARCH: x86
+  - template: azure-pipelines/powershell.yml
+    parameters:
+      environmentVariables:
+        CMAKE_OPTIONS: -G"MinGW Makefiles" -DDEPRECATE_HARD=ON
+        PATH: $(Agent.TempDirectory)\mingw32\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\CMake\bin
+
+- job: documentation
+  displayName: 'Generate Documentation'
+  pool:
+    vmImage: 'Ubuntu 16.04'
+  steps:
+  - script: |
+      git config user.name 'Documentation Generation'
+      git config user.email 'libgit2@users.noreply.github.com'
+      git branch gh-pages origin/gh-pages
+      docker run --rm -v $(Build.SourcesDirectory):/src -w /src libgit2/docurium:latest cm doc api.docurium
+      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'
+    condition: eq(variables['Build.Reason'], 'IndividualCI')
diff --git a/azure-pipelines/ssh.yml b/azure-pipelines/ssh.yml
deleted file mode 100644
index 7addb02..0000000
--- a/azure-pipelines/ssh.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-# These are the steps used for ssh'ing into a remote host to build and test.
-steps:
-- task: SSH@0
-  displayName: 'Create Build Directory'
-  inputs:
-    sshEndpoint: freebsd
-    commands: |
-     set -e
-     REMOTE_BASEDIR=$(mktemp -d -t build)
-     REMOTE_SOURCEDIR="${REMOTE_BASEDIR}/src"
-     REMOTE_OUTPUTDIR="${REMOTE_BASEDIR}/build"
-     mkdir "${REMOTE_SOURCEDIR}"
-     mkdir "${REMOTE_OUTPUTDIR}"
-     echo "##vso[task.setvariable variable=Remote.BaseDir]${REMOTE_BASEDIR}"
-     echo "##vso[task.setvariable variable=Remote.SourceDir]${REMOTE_SOURCEDIR}"
-     echo "##vso[task.setvariable variable=Remote.OutputDir]${REMOTE_OUTPUTDIR}"
-
-- task: CopyFilesOverSSH@0
-  displayName: 'Securely copy files to the remote machine'
-  inputs:
-    sshEndpoint: freebsd
-    sourceFolder: '$(Build.SourcesDirectory)'
-    targetFolder: '$(Remote.SourceDir)'
-
-- task: SSH@0
-  displayName: 'Create Build Directory'
-  inputs:
-    sshEndpoint: freebsd
-    commands: |
-     set -e
-     cd $(Remote.OutputDir)
-     $(Remote.SourceDir)/ci/build.sh