<commit_before># Travis CI

You can use swiftenv to both install Swift, and to manage multiple
versions of Swift on [Travis CI](https://travis-ci.com/).

Using the [following `install` phase](https://gist.github.com/kylef/5c0475ff02b7c7671d2a), you can install both swiftenv and the
Swift version found in the `.swift-version` file or the `SWIFT_VERSION`
environment variable.

```yaml
install:
  - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"
```

## Operating Systems

### OS X

For OS X support on Travis, you will want to enable the `xcode7.2` or
newer image which contains a version of OS X and Xcode required for Swift.

```yaml
osx_image: xcode7.2
```

### Linux

The default Linux image on Travis CI doesn't have a version of Clang that
is required to use Swift. You can switch to the new Travis
[`trusty` build environment](https://docs.travis-ci.com/user/trusty-ci-environment/)
which contains Clang 3.5 using the following:

```yaml
language: generic
sudo: required
dist: trusty
```

### Multi-OS

swiftenv can be used on both OS X and Linux, you can use Travis
[multiple operating system](https://docs.travis-ci.com/user/multi-os/)
support by adding both platforms to the `os` key:

```yaml
os:
  - linux
  - osx
```

You can mix this together with the above steps required for OS X and
Linux to have a complete `.travis.yml` file as follows:

```yaml
os:
  - linux
  - osx
language: generic
sudo: required
dist: trusty
osx_image: xcode7.2
install:
  - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"
script:
  - swift build
```

## Testing against multiple Swift versions

You can use build matrix on Travis CI to set the `SWIFT_VERSION` environment
variable to different values. Travis will now run against multiple
versions of Swift.
<commit_msg>[Docs] Update Travis commit<commit_after># Travis CI

You can use swiftenv to both install Swift, and to manage multiple
versions of Swift on [Travis CI](https://travis-ci.com/).

Using the [following `install` phase](https://gist.github.com/kylef/5c0475ff02b7c7671d2a), you can install both swiftenv and the
Swift version found in the `.swift-version` file or the `SWIFT_VERSION`
environment variable.

```yaml
install:
  - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
```

## Operating Systems

### OS X

For OS X support on Travis, you will want to enable the `xcode7.2` or
newer image which contains a version of OS X and Xcode required for Swift.

```yaml
osx_image: xcode7.2
```

### Linux

The default Linux image on Travis CI doesn't have a version of Clang that
is required to use Swift. You can switch to the new Travis
[`trusty` build environment](https://docs.travis-ci.com/user/trusty-ci-environment/)
which contains Clang 3.5 using the following:

```yaml
language: generic
sudo: required
dist: trusty
```

### Multi-OS

swiftenv can be used on both OS X and Linux, you can use Travis
[multiple operating system](https://docs.travis-ci.com/user/multi-os/)
support by adding both platforms to the `os` key:

```yaml
os:
  - linux
  - osx
```

You can mix this together with the above steps required for OS X and
Linux to have a complete `.travis.yml` file as follows:

```yaml
os:
  - linux
  - osx
language: generic
sudo: required
dist: trusty
osx_image: xcode7.2
install:
  - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
script:
  - swift build
```

## Testing against multiple Swift versions

You can use build matrix on Travis CI to set the `SWIFT_VERSION` environment
variable to different values. Travis will now run against multiple
versions of Swift.

{'fraction_non_alphanumeric': 0.09811896288764616, 'fraction_numerical': 0.046263345195729534, 'mean_word_length': 4.450138504155125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1338255', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1337, 'n_words': 473}