Unverified Commit 671b2446 by Edward Thomson Committed by GitHub

Merge pull request #4804 from libgit2/ethomson/qemu-build

ci: arm docker builds
parents 7c791f3d 7c557169
...@@ -6,53 +6,53 @@ trigger: ...@@ -6,53 +6,53 @@ trigger:
- maint/* - maint/*
jobs: jobs:
- job: linux_trusty_gcc_openssl - job: linux_amd64_trusty_gcc_openssl
displayName: 'Linux (Trusty; GCC; OpenSSL)' displayName: 'Linux (amd64; Trusty; GCC; OpenSSL)'
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: ci/docker.yml - template: azure-pipelines/docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-openssl:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
CC=gcc CC=gcc
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
LEAK_CHECK=valgrind LEAK_CHECK=valgrind
- job: linux_trusty_gcc_mbedtls - job: linux_amd64_trusty_gcc_mbedtls
displayName: 'Linux (Trusty; GCC; mbedTLS)' displayName: 'Linux (amd64; Trusty; GCC; mbedTLS)'
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: ci/docker.yml - template: azure-pipelines/docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-mbedtls:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
CC=gcc CC=gcc
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS
LEAK_CHECK=valgrind LEAK_CHECK=valgrind
- job: linux_trusty_clang_openssl - job: linux_amd64_trusty_clang_openssl
displayName: 'Linux (Trusty; Clang; OpenSSL)' displayName: 'Linux (amd64; Trusty; Clang; OpenSSL)'
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: ci/docker.yml - template: azure-pipelines/docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-openssl:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
CC=clang CC=clang
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
LEAK_CHECK=valgrind LEAK_CHECK=valgrind
- job: linux_trusty_clang_mbedtls - job: linux_amd64_trusty_clang_mbedtls
displayName: 'Linux (Trusty; Clang; mbedTLS)' displayName: 'Linux (amd64; Trusty; Clang; mbedTLS)'
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
steps: steps:
- template: ci/docker.yml - template: azure-pipelines/docker.yml
parameters: parameters:
imageName: 'libgit2/trusty-mbedtls:latest' imageName: 'libgit2/trusty-amd64:latest'
environmentVariables: | environmentVariables: |
CC=clang CC=clang
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS
...@@ -65,7 +65,7 @@ jobs: ...@@ -65,7 +65,7 @@ jobs:
steps: steps:
- bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh' - bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
displayName: Setup displayName: Setup
- template: ci/bash.yml - template: azure-pipelines/bash.yml
parameters: parameters:
environmentVariables: environmentVariables:
TMPDIR: $(Agent.TempDirectory) TMPDIR: $(Agent.TempDirectory)
...@@ -74,25 +74,25 @@ jobs: ...@@ -74,25 +74,25 @@ jobs:
CMAKE_OPTIONS: -G Ninja CMAKE_OPTIONS: -G Ninja
- job: windows_vs_amd64 - job: windows_vs_amd64
displayName: 'Windows (Visual Studio; amd64)' displayName: 'Windows (amd64; Visual Studio)'
pool: Hosted pool: Hosted
steps: steps:
- template: ci/powershell.yml - template: azure-pipelines/powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64" CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64"
- job: windows_vs_x86 - job: windows_vs_x86
displayName: 'Windows (Visual Studio; x86)' displayName: 'Windows (x86; Visual Studio)'
pool: Hosted pool: Hosted
steps: steps:
- template: ci/powershell.yml - template: azure-pipelines/powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013" CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013"
- job: windows_mingw_amd64 - job: windows_mingw_amd64
displayName: 'Windows (MinGW; amd64)' displayName: 'Windows (amd64; MinGW)'
pool: Hosted pool: Hosted
steps: steps:
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1' - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
...@@ -100,14 +100,14 @@ jobs: ...@@ -100,14 +100,14 @@ jobs:
env: env:
TEMP: $(Agent.TempDirectory) TEMP: $(Agent.TempDirectory)
ARCH: amd64 ARCH: amd64
- template: ci/powershell.yml - template: azure-pipelines/powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -G"MinGW Makefiles" CMAKE_OPTIONS: -G"MinGW Makefiles"
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 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 - job: windows_mingw_x86
displayName: 'Windows (MinGW; x86)' displayName: 'Windows (x86; MinGW)'
pool: Hosted pool: Hosted
steps: steps:
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1' - powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
...@@ -116,7 +116,7 @@ jobs: ...@@ -116,7 +116,7 @@ jobs:
env: env:
TEMP: $(Agent.TempDirectory) TEMP: $(Agent.TempDirectory)
ARCH: x86 ARCH: x86
- template: ci/powershell.yml - template: azure-pipelines/powershell.yml
parameters: parameters:
environmentVariables: environmentVariables:
CMAKE_OPTIONS: -G"MinGW Makefiles" CMAKE_OPTIONS: -G"MinGW Makefiles"
......
# These are the steps used in a container-based build in VSTS. # These are the steps used in a container-based build in VSTS.
steps: steps:
- ${{ if eq(parameters.qemu, 'true') }}:
- script: docker run --rm --privileged multiarch/qemu-user-static:register --reset
displayName: 'Register Docker QEMU'
- task: docker@0 - task: docker@0
displayName: Build displayName: Build
inputs: inputs:
......
resources:
- repo: self
jobs:
- job: linux_x86_bionic_gcc_openssl
displayName: 'Linux (x86; Bionic; GCC; OpenSSL)'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: docker.yml
parameters:
qemu: 'true'
imageName: 'libgit2/bionic-x86:test'
environmentVariables: |
CC=gcc
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
LEAK_CHECK=valgrind
- job: linux_x86_bionic_clang_openssl
displayName: 'Linux (x86; Bionic; Clang; OpenSSL)'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: docker.yml
parameters:
qemu: 'true'
imageName: 'libgit2/bionic-x86:test'
environmentVariables: |
CC=clang
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
LEAK_CHECK=valgrind
- job: linux_arm32_bionic_gcc_openssl
displayName: 'Linux (arm32; Bionic; GCC; OpenSSL)'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: docker.yml
parameters:
qemu: 'true'
imageName: 'libgit2/bionic-arm32:test'
environmentVariables: |
CC=gcc
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
SKIP_PROXY_TESTS=true
- job: linux_arm64_bionic_gcc_openssl
displayName: 'Linux (arm64; Bionic; GCC; OpenSSL)'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: docker.yml
parameters:
qemu: 'true'
imageName: 'libgit2/bionic-arm64:test'
environmentVariables: |
CC=gcc
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
SKIP_PROXY_TESTS=true
- job: coverity
displayName: 'Coverity'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Docker@0
displayName: Build
inputs:
action: 'Run an image'
imageName: 'libgit2/trusty-openssl:latest'
volumes: |
$(Build.SourcesDirectory):/src
$(Build.BinariesDirectory):/build
envVars: |
COVERITY_TOKEN=$(COVERITY_TOKEN)
workDir: '/build'
containerCommand: '/src/ci/coverity.sh'
detached: false
resources:
- repo: self
jobs:
- job: coverity
displayName: 'Coverity'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Docker@0
displayName: Build
inputs:
action: 'Run an image'
imageName: 'libgit2/trusty-openssl:latest'
volumes: |
$(Build.SourcesDirectory):/src
$(Build.BinariesDirectory):/build
envVars: |
COVERITY_TOKEN=$(COVERITY_TOKEN)
workDir: '/build'
containerCommand: '/src/ci/coverity.sh'
detached: false
...@@ -73,8 +73,8 @@ fi ...@@ -73,8 +73,8 @@ fi
if [ -z "$SKIP_PROXY_TESTS" ]; then if [ -z "$SKIP_PROXY_TESTS" ]; then
echo "Starting HTTP proxy..." echo "Starting HTTP proxy..."
curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar >poxyproxy.jar curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.2.0/poxyproxy-0.2.0.jar >poxyproxy.jar
java -jar poxyproxy.jar -d --port 8080 --credentials foo:bar >/dev/null 2>&1 & java -jar poxyproxy.jar -d --address 127.0.0.1 --port 8080 --credentials foo:bar >/dev/null 2>&1 &
fi fi
if [ -z "$SKIP_SSH_TESTS" ]; then if [ -z "$SKIP_SSH_TESTS" ]; then
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
} }
{ {
ignore-libssh2-gcrypt-leak ignore-libssh2-gcrypt-control-leak
Memcheck:Leak Memcheck:Leak
... ...
fun:gcry_control fun:gcry_control
...@@ -64,6 +64,46 @@ ...@@ -64,6 +64,46 @@
} }
{ {
ignore-libssh2-gcrypt-mpinew-leak
Memcheck:Leak
...
fun:gcry_mpi_new
obj:*libssh2.so*
}
{
ignore-libssh2-gcrypt-mpiscan-leak
Memcheck:Leak
...
fun:gcry_mpi_scan
obj:*libssh2.so*
}
{
ignore-libssh2-gcrypt-randomize-leak
Memcheck:Leak
...
fun:gcry_randomize
obj:*libssh2.so*
}
{
ignore-libssh2-gcrypt-sexpfindtoken-leak
Memcheck:Leak
...
fun:gcry_sexp_find_token
obj:*libssh2.so*
}
{
ignore-libssh2-gcrypt-pksign-leak
Memcheck:Leak
...
fun:gcry_pk_sign
obj:*libssh2.so*
}
{
ignore-noai6ai_cached-double-free ignore-noai6ai_cached-double-free
Memcheck:Free Memcheck:Free
fun:free fun:free
......
...@@ -11,12 +11,8 @@ ...@@ -11,12 +11,8 @@
*/ */
#if defined(GIT_ARCH_64) && defined(__linux__) #if defined(GIT_ARCH_64) && defined(__linux__)
# define TOOBIG 0x0fffffffffffffff # define TOOBIG 0x0fffffffffffffff
#elif defined(__linux__)
# define TOOBIG 0x0fffffff
#elif defined(GIT_ARCH_64) #elif defined(GIT_ARCH_64)
# define TOOBIG 0xffffffffffffff00 # define TOOBIG 0xffffffffffffff00
#else
# define TOOBIG 0xffffff00
#endif #endif
/** /**
...@@ -25,13 +21,18 @@ ...@@ -25,13 +21,18 @@
* will fail. And because the git_buf_grow() wrapper always * will fail. And because the git_buf_grow() wrapper always
* sets mark_oom, the code in git_buf_try_grow() will free * sets mark_oom, the code in git_buf_try_grow() will free
* the internal buffer and set it to git_buf__oom. * the internal buffer and set it to git_buf__oom.
* *
* We initialized the internal buffer to (the static variable) * We initialized the internal buffer to (the static variable)
* git_buf__initbuf. The purpose of this test is to make sure * git_buf__initbuf. The purpose of this test is to make sure
* that we don't try to free the static buffer. * that we don't try to free the static buffer.
*
* Skip this test entirely on 32-bit platforms; a buffer large enough
* to guarantee malloc failures is so large that valgrind considers
* it likely to be an error.
*/ */
void test_buf_oom__grow(void) void test_buf_oom__grow(void)
{ {
#ifdef GIT_ARCH_64
git_buf buf = GIT_BUF_INIT; git_buf buf = GIT_BUF_INIT;
git_buf_clear(&buf); git_buf_clear(&buf);
...@@ -40,6 +41,9 @@ void test_buf_oom__grow(void) ...@@ -40,6 +41,9 @@ void test_buf_oom__grow(void)
cl_assert(git_buf_oom(&buf)); cl_assert(git_buf_oom(&buf));
git_buf_dispose(&buf); git_buf_dispose(&buf);
#else
cl_skip();
#endif
} }
void test_buf_oom__grow_by(void) void test_buf_oom__grow_by(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment