Skip to content

Commit 671b244

Browse files
authored
Merge pull request libgit2#4804 from libgit2/ethomson/qemu-build
ci: arm docker builds
2 parents 7c791f3 + 7c55716 commit 671b244

File tree

9 files changed

+159
-55
lines changed

9 files changed

+159
-55
lines changed

azure-pipelines.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,53 @@ trigger:
66
- maint/*
77

88
jobs:
9-
- job: linux_trusty_gcc_openssl
10-
displayName: 'Linux (Trusty; GCC; OpenSSL)'
9+
- job: linux_amd64_trusty_gcc_openssl
10+
displayName: 'Linux (amd64; Trusty; GCC; OpenSSL)'
1111
pool:
1212
vmImage: 'Ubuntu 16.04'
1313
steps:
14-
- template: ci/docker.yml
14+
- template: azure-pipelines/docker.yml
1515
parameters:
16-
imageName: 'libgit2/trusty-openssl:latest'
16+
imageName: 'libgit2/trusty-amd64:latest'
1717
environmentVariables: |
1818
CC=gcc
1919
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
2020
LEAK_CHECK=valgrind
2121
22-
- job: linux_trusty_gcc_mbedtls
23-
displayName: 'Linux (Trusty; GCC; mbedTLS)'
22+
- job: linux_amd64_trusty_gcc_mbedtls
23+
displayName: 'Linux (amd64; Trusty; GCC; mbedTLS)'
2424
pool:
2525
vmImage: 'Ubuntu 16.04'
2626
steps:
27-
- template: ci/docker.yml
27+
- template: azure-pipelines/docker.yml
2828
parameters:
29-
imageName: 'libgit2/trusty-mbedtls:latest'
29+
imageName: 'libgit2/trusty-amd64:latest'
3030
environmentVariables: |
3131
CC=gcc
3232
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS
3333
LEAK_CHECK=valgrind
3434
35-
- job: linux_trusty_clang_openssl
36-
displayName: 'Linux (Trusty; Clang; OpenSSL)'
35+
- job: linux_amd64_trusty_clang_openssl
36+
displayName: 'Linux (amd64; Trusty; Clang; OpenSSL)'
3737
pool:
3838
vmImage: 'Ubuntu 16.04'
3939
steps:
40-
- template: ci/docker.yml
40+
- template: azure-pipelines/docker.yml
4141
parameters:
42-
imageName: 'libgit2/trusty-openssl:latest'
42+
imageName: 'libgit2/trusty-amd64:latest'
4343
environmentVariables: |
4444
CC=clang
4545
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
4646
LEAK_CHECK=valgrind
4747
48-
- job: linux_trusty_clang_mbedtls
49-
displayName: 'Linux (Trusty; Clang; mbedTLS)'
48+
- job: linux_amd64_trusty_clang_mbedtls
49+
displayName: 'Linux (amd64; Trusty; Clang; mbedTLS)'
5050
pool:
5151
vmImage: 'Ubuntu 16.04'
5252
steps:
53-
- template: ci/docker.yml
53+
- template: azure-pipelines/docker.yml
5454
parameters:
55-
imageName: 'libgit2/trusty-mbedtls:latest'
55+
imageName: 'libgit2/trusty-amd64:latest'
5656
environmentVariables: |
5757
CC=clang
5858
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS
@@ -65,7 +65,7 @@ jobs:
6565
steps:
6666
- bash: . '$(Build.SourcesDirectory)/ci/setup-osx.sh'
6767
displayName: Setup
68-
- template: ci/bash.yml
68+
- template: azure-pipelines/bash.yml
6969
parameters:
7070
environmentVariables:
7171
TMPDIR: $(Agent.TempDirectory)
@@ -74,40 +74,40 @@ jobs:
7474
CMAKE_OPTIONS: -G Ninja
7575

7676
- job: windows_vs_amd64
77-
displayName: 'Windows (Visual Studio; amd64)'
77+
displayName: 'Windows (amd64; Visual Studio)'
7878
pool: Hosted
7979
steps:
80-
- template: ci/powershell.yml
80+
- template: azure-pipelines/powershell.yml
8181
parameters:
8282
environmentVariables:
8383
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64"
8484

8585
- job: windows_vs_x86
86-
displayName: 'Windows (Visual Studio; x86)'
86+
displayName: 'Windows (x86; Visual Studio)'
8787
pool: Hosted
8888
steps:
89-
- template: ci/powershell.yml
89+
- template: azure-pipelines/powershell.yml
9090
parameters:
9191
environmentVariables:
9292
CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013"
9393

9494
- job: windows_mingw_amd64
95-
displayName: 'Windows (MinGW; amd64)'
95+
displayName: 'Windows (amd64; MinGW)'
9696
pool: Hosted
9797
steps:
9898
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
9999
displayName: Setup
100100
env:
101101
TEMP: $(Agent.TempDirectory)
102102
ARCH: amd64
103-
- template: ci/powershell.yml
103+
- template: azure-pipelines/powershell.yml
104104
parameters:
105105
environmentVariables:
106106
CMAKE_OPTIONS: -G"MinGW Makefiles"
107107
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
108108

109109
- job: windows_mingw_x86
110-
displayName: 'Windows (MinGW; x86)'
110+
displayName: 'Windows (x86; MinGW)'
111111
pool: Hosted
112112
steps:
113113
- powershell: . '$(Build.SourcesDirectory)\ci\setup-mingw.ps1'
@@ -116,7 +116,7 @@ jobs:
116116
env:
117117
TEMP: $(Agent.TempDirectory)
118118
ARCH: x86
119-
- template: ci/powershell.yml
119+
- template: azure-pipelines/powershell.yml
120120
parameters:
121121
environmentVariables:
122122
CMAKE_OPTIONS: -G"MinGW Makefiles"
File renamed without changes.

ci/docker.yml renamed to azure-pipelines/docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# These are the steps used in a container-based build in VSTS.
22
steps:
3+
- ${{ if eq(parameters.qemu, 'true') }}:
4+
- script: docker run --rm --privileged multiarch/qemu-user-static:register --reset
5+
displayName: 'Register Docker QEMU'
6+
37
- task: docker@0
48
displayName: Build
59
inputs:

azure-pipelines/nightly.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
resources:
2+
- repo: self
3+
4+
jobs:
5+
- job: linux_x86_bionic_gcc_openssl
6+
displayName: 'Linux (x86; Bionic; GCC; OpenSSL)'
7+
pool:
8+
vmImage: 'Ubuntu 16.04'
9+
steps:
10+
- template: docker.yml
11+
parameters:
12+
qemu: 'true'
13+
imageName: 'libgit2/bionic-x86:test'
14+
environmentVariables: |
15+
CC=gcc
16+
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
17+
LEAK_CHECK=valgrind
18+
19+
- job: linux_x86_bionic_clang_openssl
20+
displayName: 'Linux (x86; Bionic; Clang; OpenSSL)'
21+
pool:
22+
vmImage: 'Ubuntu 16.04'
23+
steps:
24+
- template: docker.yml
25+
parameters:
26+
qemu: 'true'
27+
imageName: 'libgit2/bionic-x86:test'
28+
environmentVariables: |
29+
CC=clang
30+
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
31+
LEAK_CHECK=valgrind
32+
33+
- job: linux_arm32_bionic_gcc_openssl
34+
displayName: 'Linux (arm32; Bionic; GCC; OpenSSL)'
35+
pool:
36+
vmImage: 'Ubuntu 16.04'
37+
steps:
38+
- template: docker.yml
39+
parameters:
40+
qemu: 'true'
41+
imageName: 'libgit2/bionic-arm32:test'
42+
environmentVariables: |
43+
CC=gcc
44+
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
45+
SKIP_PROXY_TESTS=true
46+
47+
- job: linux_arm64_bionic_gcc_openssl
48+
displayName: 'Linux (arm64; Bionic; GCC; OpenSSL)'
49+
pool:
50+
vmImage: 'Ubuntu 16.04'
51+
steps:
52+
- template: docker.yml
53+
parameters:
54+
qemu: 'true'
55+
imageName: 'libgit2/bionic-arm64:test'
56+
environmentVariables: |
57+
CC=gcc
58+
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL
59+
SKIP_PROXY_TESTS=true
60+
61+
- job: coverity
62+
displayName: 'Coverity'
63+
pool:
64+
vmImage: 'Ubuntu 16.04'
65+
steps:
66+
- task: Docker@0
67+
displayName: Build
68+
inputs:
69+
action: 'Run an image'
70+
imageName: 'libgit2/trusty-openssl:latest'
71+
volumes: |
72+
$(Build.SourcesDirectory):/src
73+
$(Build.BinariesDirectory):/build
74+
envVars: |
75+
COVERITY_TOKEN=$(COVERITY_TOKEN)
76+
workDir: '/build'
77+
containerCommand: '/src/ci/coverity.sh'
78+
detached: false

ci/nightly.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

ci/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ fi
7373

7474
if [ -z "$SKIP_PROXY_TESTS" ]; then
7575
echo "Starting HTTP proxy..."
76-
curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar >poxyproxy.jar
77-
java -jar poxyproxy.jar -d --port 8080 --credentials foo:bar >/dev/null 2>&1 &
76+
curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.2.0/poxyproxy-0.2.0.jar >poxyproxy.jar
77+
java -jar poxyproxy.jar -d --address 127.0.0.1 --port 8080 --credentials foo:bar >/dev/null 2>&1 &
7878
fi
7979

8080
if [ -z "$SKIP_SSH_TESTS" ]; then

libgit2_clar.supp

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,53 @@
5656
}
5757

5858
{
59-
ignore-libssh2-gcrypt-leak
59+
ignore-libssh2-gcrypt-control-leak
6060
Memcheck:Leak
6161
...
6262
fun:gcry_control
6363
obj:*libssh2.so*
6464
}
6565

66+
{
67+
ignore-libssh2-gcrypt-mpinew-leak
68+
Memcheck:Leak
69+
...
70+
fun:gcry_mpi_new
71+
obj:*libssh2.so*
72+
}
73+
74+
{
75+
ignore-libssh2-gcrypt-mpiscan-leak
76+
Memcheck:Leak
77+
...
78+
fun:gcry_mpi_scan
79+
obj:*libssh2.so*
80+
}
81+
82+
{
83+
ignore-libssh2-gcrypt-randomize-leak
84+
Memcheck:Leak
85+
...
86+
fun:gcry_randomize
87+
obj:*libssh2.so*
88+
}
89+
90+
{
91+
ignore-libssh2-gcrypt-sexpfindtoken-leak
92+
Memcheck:Leak
93+
...
94+
fun:gcry_sexp_find_token
95+
obj:*libssh2.so*
96+
}
97+
98+
{
99+
ignore-libssh2-gcrypt-pksign-leak
100+
Memcheck:Leak
101+
...
102+
fun:gcry_pk_sign
103+
obj:*libssh2.so*
104+
}
105+
66106
{
67107
ignore-noai6ai_cached-double-free
68108
Memcheck:Free

tests/buf/oom.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@
1111
*/
1212
#if defined(GIT_ARCH_64) && defined(__linux__)
1313
# define TOOBIG 0x0fffffffffffffff
14-
#elif defined(__linux__)
15-
# define TOOBIG 0x0fffffff
1614
#elif defined(GIT_ARCH_64)
1715
# define TOOBIG 0xffffffffffffff00
18-
#else
19-
# define TOOBIG 0xffffff00
2016
#endif
2117

2218
/**
@@ -25,13 +21,18 @@
2521
* will fail. And because the git_buf_grow() wrapper always
2622
* sets mark_oom, the code in git_buf_try_grow() will free
2723
* the internal buffer and set it to git_buf__oom.
28-
*
24+
*
2925
* We initialized the internal buffer to (the static variable)
3026
* git_buf__initbuf. The purpose of this test is to make sure
3127
* that we don't try to free the static buffer.
28+
*
29+
* Skip this test entirely on 32-bit platforms; a buffer large enough
30+
* to guarantee malloc failures is so large that valgrind considers
31+
* it likely to be an error.
3232
*/
3333
void test_buf_oom__grow(void)
3434
{
35+
#ifdef GIT_ARCH_64
3536
git_buf buf = GIT_BUF_INIT;
3637

3738
git_buf_clear(&buf);
@@ -40,6 +41,9 @@ void test_buf_oom__grow(void)
4041
cl_assert(git_buf_oom(&buf));
4142

4243
git_buf_dispose(&buf);
44+
#else
45+
cl_skip();
46+
#endif
4347
}
4448

4549
void test_buf_oom__grow_by(void)

0 commit comments

Comments
 (0)