Skip to content

Commit a1ed2ce

Browse files
authored
Merge branch 'master' into kfd-maven-note
2 parents 274f6b4 + 550360d commit a1ed2ce

File tree

5 files changed

+121
-98
lines changed

5 files changed

+121
-98
lines changed

_includes/sidebar.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ <h3>CI Environment Reference</h3>
7979
<li><a href="/user/reference/osx/">OS X CI Environment Reference</a></li>
8080
<li><a href="/user/multi-os/">Building on Multiple Operating Systems</a></li>
8181
<li><a href="/user/environment-variables/">Environment Variables</a></li>
82-
<li><a href="/user/migrating-from-legacy/">Migrating to Container-Based Infrastructure</a></li>
8382
<li><a href="/user/precise-to-trusty-migration-guide/">Precise to Trusty Migration Guide</a></li>
8483
<li><a href="/user/build-environment-updates/">Build Environment Updates</a></li>
8584
</ul>

user/languages/haskell.md

Lines changed: 32 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,44 @@ layout: en
44

55
---
66

7-
### What This Guide Covers
7+
<div id="toc">
8+
</div>
89

9-
This guide covers build environment and configuration topics specific to Haskell projects. Please make sure to read our [Getting Started](/user/getting-started/) and [general build configuration](/user/customizing-the-build/) guides first.
10+
<aside markdown="block" class="ataglance">
1011

11-
Haskell builds are not available on the OS X environment.
12+
| Haskell | Default |
13+
|:--------------------------------------------|:--------------------------------------------------------------|
14+
| [Default `install`](#Dependency-Management) | `cabal install --only-dependencies --enable-tests` |
15+
| [Default `script`](#Default-Build-Script) | `cabal configure --enable-tests && cabal build && cabal test` |
16+
| [Matrix keys](#Build-Matrix) | `env`, `ghc` |
17+
| Support | [Travis CI](mailto:[email protected]) |
1218

13-
## Overview
19+
Minimal example:
1420

15-
The Haskell VM has recent versions of GHC pre-installed.
21+
```yaml
22+
ghc:
23+
- 7.8
24+
```
25+
{: data-file=".travis.yml"}
1626
17-
For precise versions pre-installed on the VM, please consult "Build system information" in the build log.
27+
</aside>
1828
19-
For full up-to-date list of provided tools, see
20-
our [CI environment guide](/user/reference/precise/). Key build lifecycle commands (dependency installation, running tests) have
21-
defaults that use `cabal`. It is possible to override them to use `make` or any other build tool and dependency management tool.
29+
## What This Guide Covers
2230
23-
## Specifying the GHC version
31+
{{ site.data.snippets.trusty_note_no_osx }}
2432
25-
You can specify one or more GHC versions:
33+
The rest of this guide covers configuring Haskell projects on Travis CI. If
34+
you're new to Travis CI please read our [Getting Started](/user/getting-started/)
35+
and [build configuration](/user/customizing-the-build/) guides first.
2636
27-
```yaml
28-
ghc: 7.4
29-
```
30-
{: data-file=".travis.yml"}
37+
## Specifying Haskell compiler versions
38+
39+
The Haskell environment on Travis CI has recent versions of GHC (Glasgow Haskell
40+
Compiler) pre-installed. For a detailed list of pre-installed versions, please
41+
consult "Build system information" in the build log.
3142
32-
Multiple versions:
43+
You can specify one or more GHC versions using `major.minor` notation. Patch
44+
level versions (`7.6.2` for eample) may change any time:
3345

3446
```yaml
3547
ghc:
@@ -39,45 +51,22 @@ ghc:
3951
```
4052
{: data-file=".travis.yml"}
4153

42-
It is recommended that you only use the major and minor versions to specify the version to use, as we may update the patchlevel releases at any time.
54+
## Default Build Script
4355

44-
## Default Test Script
56+
The default Haskell build script is:
4557

46-
Default test script Travis CI Haskell builder will use is
47-
48-
```
58+
```bash
4959
cabal configure --enable-tests && cabal build && cabal test
5060
```
5161

52-
It is possible to override test command as described in the [general build configuration](/user/customizing-the-build/) guide, for example:
53-
54-
```yaml
55-
script:
56-
- cabal configure --enable-tests -fFOO && cabal build && cabal test
57-
```
58-
{: data-file=".travis.yml"}
59-
6062
## Dependency Management
6163

62-
### Travis CI uses cabal
63-
64-
By default Travis CI use `cabal` to manage your project's dependencies.
65-
66-
The exact default command is
64+
By default Travis CI uses `cabal` to manage your project's dependencies:
6765

6866
```bash
6967
cabal install --only-dependencies --enable-tests
7068
```
7169

72-
It is possible to override dependency installation command as described in the [general build configuration](/user/customizing-the-build/) guide,
73-
for example:
74-
75-
```yaml
76-
install:
77-
- cabal install QuickCheck
78-
```
79-
{: data-file=".travis.yml"}
80-
8170
## Build Matrix
8271

8372
For Haskell projects, `env` and `ghc` can be given as arrays

user/languages/rust.md

Lines changed: 64 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,41 @@ layout: en
44

55
---
66

7-
<div id="toc">
8-
</div>
7+
<div id="toc"></div>
98

10-
## What this guide covers
9+
<aside markdown="block" class="ataglance">
1110

12-
This guide covers build environment and configuration topics specific to Rust
13-
projects. Please make sure to read our [Getting started](/user/getting-started/)
14-
and [general build configuration](/user/customizing-the-build/) guides first.
11+
| Rust | Default |
12+
|:--------------------------------------------|:----------------------------------------------|
13+
| [Default `install`](#Dependency-Management) | `cargo build --verbose` |
14+
| [Default `script`](#Default-Build-Script) | `cargo build --verbose; cargo test --verbose` |
15+
| [Matrix keys](#Build-Matrix) | `rust`, `env` |
16+
| Support | [Travis CI](mailto:[email protected]) |
1517

16-
## Supported Rust versions
18+
Minimal example:
1719

18-
Travis CI supports all three [release channels][channels] of Rust: stable, beta, and nightly.
19-
Furthermore, you can test against a specific Rust release by using its version number.
20+
```yaml
21+
language: rust
22+
```
23+
{: data-file=".travis.yml"}
2024
21-
[channels]: http://doc.rust-lang.org/book/release-channels.html
25+
</aside>
2226
23-
Travis CI also installs the appropriate language tools that come with each Rust version.
24-
As of Rust 1.16.0, these include `cargo`, `rustc`, `rustdoc`, `rust-gdb`, `rust-lldb`, and `rustup`.
27+
### What This Guide Covers
2528
26-
## Choosing a Rust version
29+
{{ site.data.snippets.trusty_note }}
2730
28-
By default, we download and install the latest stable Rust release at the start of the
29-
build. If you're just testing stable, this is all that you need:
31+
The rest of this guide covers configuring Rust projects in Travis CI. If you're
32+
new to Travis CI please read our [Getting Started](/user/getting-started/) and
33+
[build configuration](/user/customizing-the-build/) guides first.
3034
31-
```yaml
32-
language: rust
33-
```
34-
{: data-file=".travis.yml"}
35+
## Choosing a Rust version
3536
36-
The Rust version that is specified in the .travis.yml is available during the
37-
build in the `TRAVIS_RUST_VERSION` environment variable.
37+
By default, we download and install the latest stable Rust release at the start
38+
of the build, along with appropriate language tools including `cargo`, `rustc`,
39+
`rustdoc`, `rust-gdb`, `rust-lldb`, and `rustup`.
3840

39-
You can also test against a particular Rust release:
41+
To test against specific Rust releases:
4042

4143
```yaml
4244
language: rust
@@ -46,8 +48,13 @@ rust:
4648
```
4749
{: data-file=".travis.yml"}
4850

49-
The Rust team appreciates testing against the `beta` and `nightly` channels, even if you
50-
are only targeting stable. A full configuration looks like this:
51+
Travis CI also supports all three Rust [release channels][channels]: `stable`,
52+
`beta`, and `nightly`.
53+
54+
[channels]: http://doc.rust-lang.org/book/release-channels.html
55+
56+
The Rust team appreciates testing against the `beta` and `nightly` channels,
57+
even if you are only targeting `stable`. A full configuration looks like this:
5158

5259
```yaml
5360
language: rust
@@ -61,28 +68,39 @@ matrix:
6168
```
6269
{: data-file=".travis.yml"}
6370

64-
This will test all three channels, but any breakage in nightly will not fail your overall build.
71+
This will runs your tests against all three channels, but any breakage in
72+
`nightly` will not fail the rest of build.
6573

66-
## Default test script
74+
## Dependency Management
6775

68-
Travis CI uses Cargo to run your build and tests by default. The exact commands
69-
run are:
76+
Travis CI uses Cargo to install your dependencies:
7077

7178
```bash
72-
$ cargo build --verbose
73-
$ cargo test --verbose
79+
cargo build --verbose
7480
```
7581

76-
If you wish to override this, you can use the `script` setting:
82+
You can cache your dependencies so they are only recompiled if they or the
83+
compiler were upgraded:
7784

78-
```yaml
79-
language: rust
80-
script: make all
85+
```yanl
86+
cache: cargo
8187
```
8288
{: data-file=".travis.yml"}
8389

84-
For example, if your project is a [workspace](http://doc.crates.io/manifest.html#the-workspace-section),
85-
you should pass `-all` to the build commands to build and test all of the member crates:
90+
91+
## Default Build Script
92+
93+
Travis CI uses Cargo to run your build, the default commands are:
94+
95+
```bash
96+
cargo test --verbose
97+
```
98+
99+
You always can always configure different comands if you need to. For example,
100+
if your project is a
101+
[workspace](http://doc.crates.io/manifest.html#the-workspace-section), you
102+
should pass `-all` to the build commands to build and test all of the member
103+
crates:
86104

87105
```yaml
88106
language: rust
@@ -91,3 +109,13 @@ script:
91109
- cargo test --verbose --all
92110
```
93111
{: data-file=".travis.yml"}
112+
113+
## Environment variables
114+
115+
The Rust version that is specified in the `.travis.yml` is available during the
116+
build in the `TRAVIS_RUST_VERSION` environment variable.
117+
118+
## Build Matrix
119+
120+
For Rust projects, `env` and `rust` can be given as arrays to
121+
construct a [build matrix](/user/customizing-the-build/#Build-Matrix).

user/reference/overview.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ layout: en
44
permalink: /user/reference/overview/
55
redirect_from:
66
- /user/ci-environment/
7+
- /user/migrating-from-legacy/
78
---
89

910
### What This Guide Covers
1011

11-
This guide provides an overview on the various different environments in which
12+
This guide provides an overview on the different environments in which
1213
Travis CI can run your builds, and why you might want to pick one over another.
1314

1415
<div id="toc"></div>
@@ -17,23 +18,29 @@ Travis CI can run your builds, and why you might want to pick one over another.
1718

1819
Each build runs in one of the following virtual environments:
1920

20-
- Sudo-enabled: a sudo enabled, full virtual machine per build
21-
- Container-based: Fast boot time environment in which `sudo` commands are not available
21+
- Sudo-enabled: a sudo enabled, full virtual machine per build. Running either Linux [Ubuntu Precise 12.04](/user/reference/precise/) or [Ubuntu Trusty 14.04](/user/reference/trusty/)
22+
- Container-based: Fast boot time environment in which `sudo` commands are not available. Running Linux [Ubuntu Trusty 14.04](/user/reference/trusty/)
2223
- [OS X](/user/reference/osx/): for Objective-C and other OS X specific projects
2324

24-
Each Linux environment runs either [Ubuntu Precise 12.04](/user/reference/precise/) or [Ubuntu Trusty 14.04](/user/reference/trusty/).
25-
2625
The following table summarizes the differences between the virtual environments:
2726

28-
| | Ubuntu Precise | Ubuntu Precise | Ubuntu Trusty | Ubuntu Trusty | [OS X](/user/reference/osx/) |
29-
|:-----------------|:-----------------------------------|:--------------------------------------|:----------------------------------|:-------------------------------------|:-----------------------------|
30-
| Name | Container-based | Sudo-enabled VM | Container-based | Sudo-enabled VM | OS X |
31-
| Status | Retired as of September 2017 | Current | Default as of August 2017 | Current | Current |
32-
| Infrastructure | Container | Virtual machine on GCE | Container | Virtual machine on GCE | Virtual machine |
33-
| `.travis.yml` | `sudo: false` <br> `dist: precise` | `sudo: required` <br> `dist: precise` | `sudo: false` <br> `dist: trusty` | `sudo: required` <br> `dist: trusty` | `os: osx` |
34-
| Allows `sudo` | No | Yes | No | Yes | Yes |
35-
| Approx boot time | 1-6s | 20-50s | 1-6s | 20-50s | 60-90s |
36-
| File system | AUFS | EXT4 | AUFS | EXT4 | HFS+ |
37-
| Operating system | Ubuntu 12.04 | Ubuntu 12.04 | Ubuntu 14.04 | Ubuntu 14.04 | OS X |
38-
| Memory | 4 GB max | 7.5 GB | 4 GB max | 7.5 GB | 4 GB |
39-
| Cores | 2 | ~2, bursted | 2 | ~2, bursted | 2 |
27+
| | Ubuntu Precise | Ubuntu Trusty | Ubuntu Trusty | [OS X](/user/reference/osx/) |
28+
|:-----------------|:--------------------------------------|:----------------------------------|:-------------------------------------|:-----------------------------|
29+
| Name | Sudo-enabled VM | Container-based | Sudo-enabled VM | OS X |
30+
| Status | Current | Default as of August 2017 | Current | Current |
31+
| Infrastructure | Virtual machine on GCE | Container | Virtual machine on GCE | Virtual machine |
32+
| `.travis.yml` | `sudo: required` <br> `dist: precise` | `sudo: false` <br> `dist: trusty` | `sudo: required` <br> `dist: trusty` | `os: osx` |
33+
| Allows `sudo` | Yes | No | Yes | Yes |
34+
| Approx boot time | 20-50s | 1-6s | 20-50s | 60-90s |
35+
| File system | EXT4 | AUFS | EXT4 | HFS+ |
36+
| Operating system | Ubuntu 12.04 | Ubuntu 14.04 | Ubuntu 14.04 | OS X |
37+
| Memory | 7.5 GB | 4 GB max | 7.5 GB | 4 GB |
38+
| Cores | ~2, bursted | 2 | ~2, bursted | 2 |
39+
40+
41+
## Deprecated Virtualization Environments
42+
43+
Historically, Travis CI has provided the following virtualization environments.
44+
45+
- **Precise Container-based environment**: available from the announcement in [December, 2014](https://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/) to [September, 2017](https://blog.travis-ci.com/2017-08-31-trusty-as-default-status).
46+
- **Legacy environment**: available until [December, 2015](https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future).

user/reference/precise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: The Build Environment
2+
title: The Precise Build Environment
33
layout: en
44

55
redirect_from:

0 commit comments

Comments
 (0)