Skip to content

Commit 57af7cc

Browse files
authored
Design thoughts for build images (#3)
1 parent 30f93f0 commit 57af7cc

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

DESIGN.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Design
2+
3+
This document covers the design thoughts behind build images for speeding up Travis CI and a proposal for how to implement things going forward.
4+
5+
## Background
6+
7+
Travis CI currently uses standard Ubuntu containers to build curl. There are lots and lots of entries in the curl build matrix and currently a single job takes a long time to complete.
8+
9+
Part of this is due to downloading and compiling dependencies (e.g. brotli, wolfssl). There's also elapsed time taken in downloading and installing packages for compilation.
10+
11+
Using Docker containers, we can create a build image whereby the dependencies are already downloaded and installed, and compiled where necessary. Theoretically it also means developers can have the same build environment as the CI jobs, which is good for reproducibility.
12+
13+
## Design thoughts
14+
15+
- The build images should be based on Ubuntu Trusty, as Travis CI currently use Ubuntu Trusty as their base image.
16+
- An alternative could be Centos - any Linux distribution is likely fine. It might be that we choose Trusty to start with then, then move onto Centos for testing different distributions.
17+
- Another alternative is Xenial as many of the builds explicitly request the Xenial distribution.
18+
- Build images will be strictly versioned using semver for reproducibility. The "latest" tag will not be used.
19+
20+
## Current set of builds
21+
22+
The current set of Linux curl CI builds (from .travis.yml) are as follows:
23+
24+
- gcc-8 (with-gssapi, with-libssh2) CHECKSRC=1
25+
- gcc-8 (disable-http, disable-smtp, disable-imap)
26+
- gcc-8 (enable-ares)
27+
- gcc-8 (dist:xenial, disable-verbose, no-variadic-macros) NOTESTS=1
28+
- gcc-8 (with-brotli)
29+
- gcc-8 (dist:xenial, with-boringssl) T=novalgrind
30+
- gcc-8 (dist:xenial, with-wolfssl, without-ssl)
31+
- gcc-8 (dist:xenial, with-mesalink, without-ssl)
32+
- clang-7 (dist:xenial)
33+
- clang-7 (dist:xenial, enable-alt-svc)
34+
- clang-7 (dist:xenial, with-mbedtls, without-tls)
35+
- clang-7 (dist:xenial, with-gnutls, without-tls)
36+
- clang-7 (dist:xenial, disable-threaded-resolver) T=debug
37+
- clang-7 (dist:xenial, with-nss, without-ssl) T=debug NOTESTS=1
38+
- gcc-8 () T=iconv
39+
- gcc-8 (dist:xenial) T=cmake
40+
- clang-7 (dist:xenial) T=cmake
41+
- gcc-8 (dist:xenial) T=coverage
42+
- gcc-8 (dist:xenial) T=distcheck
43+
- clang-7 (dist:xenial) T=fuzzer
44+
- clang-7 (dist:xenial) T=tidy
45+
- clang-7 (dist:xenial) T=scan-build
46+
- clang-7 (dist:xenial, many sanitization options) T=debug
47+
48+
There are several OSX builds which I don't intend to run through Docker.
49+
50+
It probably makes sense to have an individual build image for each of these different options, caching the dependencies of each. Docker builds are "cheap".
51+
52+
It might make sense to have several stages of build:
53+
54+
- Build gcc-8, clang-7 images on top of the base image (Trusty/Xenial/whatever)
55+
- Build all these images on top of these bases.

0 commit comments

Comments
 (0)