Skip to content

Commit 82b1d1d

Browse files
authored
Merge pull request libgit2#5141 from pks-t/pks/azure-drop-powershell
azure: drop powershell
2 parents 9085819 + 415ee61 commit 82b1d1d

23 files changed

+144
-315
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ OPTION(USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON)
5757
OPTION(USE_SHA1 "Enable SHA1. Can be set to CollisionDetection(ON)/HTTPS/Generic" ON)
5858
OPTION(USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF)
5959
OPTION(USE_STANDALONE_FUZZERS "Enable standalone fuzzers (compatible with gcc)" OFF)
60+
OPTION(USE_LEAK_CHECKER "Run tests with leak checker" OFF)
6061
OPTION(VALGRIND "Configure build for valgrind" OFF)
6162
OPTION(DEBUG_POOL "Enable debug pool allocator" OFF)
6263
OPTION(ENABLE_WERROR "Enable compilation with -Werror" OFF)

azure-pipelines.yml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
imageName: 'libgit2/trusty-amd64:latest'
1717
environmentVariables: |
1818
CC=gcc
19-
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON
20-
LEAK_CHECK=valgrind
19+
CMAKE_GENERATOR=Unix Makefiles
20+
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
2121
2222
- job: linux_amd64_trusty_gcc_mbedtls
2323
displayName: 'Linux (amd64; Trusty; GCC; mbedTLS)'
@@ -29,8 +29,8 @@ jobs:
2929
imageName: 'libgit2/trusty-amd64:latest'
3030
environmentVariables: |
3131
CC=gcc
32-
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON
33-
LEAK_CHECK=valgrind
32+
CMAKE_GENERATOR=Unix Makefiles
33+
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
3434
3535
- job: linux_amd64_trusty_clang_openssl
3636
displayName: 'Linux (amd64; Trusty; Clang; OpenSSL)'
@@ -42,8 +42,8 @@ jobs:
4242
imageName: 'libgit2/trusty-amd64:latest'
4343
environmentVariables: |
4444
CC=clang
45-
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON
46-
LEAK_CHECK=valgrind
45+
CMAKE_GENERATOR=Unix Makefiles
46+
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
4747
4848
- job: linux_amd64_trusty_clang_mbedtls
4949
displayName: 'Linux (amd64; Trusty; Clang; mbedTLS)'
@@ -55,73 +55,81 @@ jobs:
5555
imageName: 'libgit2/trusty-amd64:latest'
5656
environmentVariables: |
5757
CC=clang
58-
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON
59-
LEAK_CHECK=valgrind
58+
CMAKE_GENERATOR=Unix Makefiles
59+
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
6060
6161
- job: macos
6262
displayName: 'macOS'
6363
pool:
6464
vmImage: 'macOS 10.13'
6565
steps:
66-
- bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
66+
- bash: . '$(Build.SourcesDirectory)/azure-pipelines/setup-osx.sh'
6767
displayName: Setup
6868
- template: azure-pipelines/bash.yml
6969
parameters:
7070
environmentVariables:
7171
TMPDIR: $(Agent.TempDirectory)
7272
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
73-
LEAK_CHECK: leaks
74-
CMAKE_OPTIONS: -G Ninja -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON
73+
CMAKE_GENERATOR: Ninja
74+
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks
7575
SKIP_SSH_TESTS: true
7676

7777
- job: windows_vs_amd64
7878
displayName: 'Windows (amd64; Visual Studio)'
7979
pool: Hosted
8080
steps:
81-
- template: azure-pipelines/powershell.yml
81+
- template: azure-pipelines/bash.yml
8282
parameters:
8383
environmentVariables:
84-
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64" -DDEPRECATE_HARD=ON
84+
CMAKE_GENERATOR: Visual Studio 12 2013 Win64
85+
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON
86+
SKIP_SSH_TESTS: true
8587

8688
- job: windows_vs_x86
8789
displayName: 'Windows (x86; Visual Studio)'
8890
pool: Hosted
8991
steps:
90-
- template: azure-pipelines/powershell.yml
92+
- template: azure-pipelines/bash.yml
9193
parameters:
9294
environmentVariables:
93-
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013" -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS
95+
CMAKE_GENERATOR: Visual Studio 12 2013
96+
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS
97+
SKIP_SSH_TESTS: true
9498

9599
- job: windows_mingw_amd64
96100
displayName: 'Windows (amd64; MinGW)'
97101
pool: Hosted
98102
steps:
99-
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
103+
- bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
100104
displayName: Setup
101105
env:
102106
TEMP: $(Agent.TempDirectory)
103107
ARCH: amd64
104-
- template: azure-pipelines/powershell.yml
108+
- template: azure-pipelines/bash.yml
105109
parameters:
106110
environmentVariables:
107-
CMAKE_OPTIONS: -G"MinGW Makefiles" -DDEPRECATE_HARD=ON
108-
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
111+
BUILD_PATH: $(Agent.TempDirectory)\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
112+
CMAKE_GENERATOR: MinGW Makefiles
113+
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
114+
SKIP_SSH_TESTS: true
109115

110116
- job: windows_mingw_x86
111117
displayName: 'Windows (x86; MinGW)'
112118
pool: Hosted
113119
steps:
114-
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
120+
- bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
115121
displayName: Setup
116122
workingDirectory: '$(Build.BinariesDirectory)'
117123
env:
118124
TEMP: $(Agent.TempDirectory)
119125
ARCH: x86
120-
- template: azure-pipelines/powershell.yml
126+
- template: azure-pipelines/bash.yml
121127
parameters:
122128
environmentVariables:
123-
CMAKE_OPTIONS: -G"MinGW Makefiles" -DDEPRECATE_HARD=ON
124-
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
129+
BUILD_PATH: $(Agent.TempDirectory)\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
130+
CMAKE_GENERATOR: MinGW Makefiles
131+
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
132+
SKIP_SSH_TESTS: true
125133

126134
- job: documentation
127135
displayName: 'Generate Documentation'

azure-pipelines/bash.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# These are the steps used for building on machines with bash.
22
steps:
3-
- bash: . '$(Build.SourcesDirectory)/ci/build.sh'
3+
- bash: . '$(Build.SourcesDirectory)/azure-pipelines/build.sh'
44
displayName: Build
55
workingDirectory: '$(Build.BinariesDirectory)'
66
env: ${{ parameters.environmentVariables }}
7-
- bash: . '$(Build.SourcesDirectory)/ci/test.sh'
7+
- bash: . '$(Build.SourcesDirectory)/azure-pipelines/test.sh'
88
displayName: Test
99
workingDirectory: '$(Build.BinariesDirectory)'
1010
env: ${{ parameters.environmentVariables }}

ci/build.sh renamed to azure-pipelines/build.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ set -e
99

1010
SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )}
1111
BUILD_DIR=$(pwd)
12-
CC=${CC:-cc}
12+
BUILD_PATH=${BUILD_PATH:=$PATH}
13+
CMAKE=$(which cmake)
1314

1415
indent() { sed "s/^/ /"; }
1516

@@ -31,21 +32,24 @@ echo "Kernel version:"
3132
uname -a 2>&1 | indent
3233

3334
echo "CMake version:"
34-
cmake --version 2>&1 | indent
35-
echo "Compiler version:"
36-
$CC --version 2>&1 | indent
35+
env PATH="$BUILD_PATH" "$CMAKE" --version 2>&1 | indent
36+
37+
if test -n "$CC"; then
38+
echo "Compiler version:"
39+
"$CC" --version 2>&1 | indent
40+
fi
3741
echo ""
3842

3943
echo "##############################################################################"
4044
echo "## Configuring build environment"
4145
echo "##############################################################################"
4246

43-
echo cmake ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON ${CMAKE_OPTIONS}
44-
cmake ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON ${CMAKE_OPTIONS}
47+
echo cmake ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_OPTIONS}
48+
env PATH="$BUILD_PATH" "$CMAKE" ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G "${CMAKE_GENERATOR}" ${CMAKE_OPTIONS}
4549

4650
echo ""
4751
echo "##############################################################################"
4852
echo "## Building libgit2"
4953
echo "##############################################################################"
5054

51-
cmake --build .
55+
env PATH="$BUILD_PATH" "$CMAKE" --build .

azure-pipelines/coverity.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
envVars: |
1919
COVERITY_TOKEN=$(COVERITY_TOKEN)
2020
workDir: '/build'
21-
containerCommand: '/src/ci/coverity-build.sh'
21+
containerCommand: '/src/azure-pipelines/coverity-build.sh'
2222
detached: false
2323
- task: Docker@0
2424
displayName: Publish
@@ -31,6 +31,6 @@ jobs:
3131
envVars: |
3232
COVERITY_TOKEN=$(COVERITY_TOKEN)
3333
workDir: '/build'
34-
containerCommand: '/src/ci/coverity-publish.sh'
34+
containerCommand: '/src/azure-pipelines/coverity-publish.sh'
3535
detached: false
3636
continueOnError: true

azure-pipelines/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ steps:
1414
$(Build.BinariesDirectory):/build
1515
envVars: ${{ parameters.environmentVariables }}
1616
workDir: '/build'
17-
containerCommand: '/src/ci/build.sh'
17+
containerCommand: '/src/azure-pipelines/build.sh'
1818
detached: false
1919
- task: docker@0
2020
displayName: Test
@@ -26,7 +26,7 @@ steps:
2626
$(Build.BinariesDirectory):/build
2727
envVars: ${{ parameters.environmentVariables }}
2828
workDir: '/build'
29-
containerCommand: '/src/ci/test.sh'
29+
containerCommand: '/src/azure-pipelines/test.sh'
3030
detached: false
3131
- task: publishtestresults@2
3232
displayName: Publish Test Results

0 commit comments

Comments
 (0)