forked from rust-lang/rust-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
88 lines (81 loc) · 2.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
language: minimal
sudo: required
services:
- docker
branches:
only:
- master
env:
global:
- REPOSITORY="${DOCKER_USERNAME}"
- TOOLS_TO_BUILD=""
- CHANNELS_TO_BUILD=""
- PATH=$HOME/.local/bin:$PATH # awscli
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
stages:
- name: build compiler containers
if: type != pull_request AND branch == master
- name: build tools
if: type != pull_request AND branch == master
- name: compile code
jobs:
allow_failures:
- env:
- TOOLS_TO_BUILD="rustfmt"
- env:
- TOOLS_TO_BUILD="clippy"
- env:
- TOOLS_TO_BUILD="miri"
include:
- stage: build compiler containers
env:
- CHANNELS_TO_BUILD="stable"
script: ./.travis/build-containers.sh
- env:
- CHANNELS_TO_BUILD="beta"
script: ./.travis/build-containers.sh
- env:
- CHANNELS_TO_BUILD="nightly"
script: ./.travis/build-containers.sh
- stage: build tools
env:
- TOOLS_TO_BUILD="rustfmt"
script: ./.travis/build-containers.sh
- env:
- TOOLS_TO_BUILD="clippy"
script: ./.travis/build-containers.sh
- env:
- TOOLS_TO_BUILD="miri"
script: ./.travis/build-containers.sh
- stage: compile code
env:
- BUILDING="backend"
before_install: &prep_cache
- >
mkdir -p
$HOME/cache/rust/cargo/{git,registry}
$HOME/cache/rust/target
$HOME/cache/node/node_modules
$HOME/cache/node/yarn-cache
- pip install --user awscli
script: ./.travis/compile-backend.sh
before_cache: &clean_cache
# Ignore the permissions set from running inside the container
- sudo chmod -R a+rw $HOME/cache
after_success:
- ./.travis/upload-compiled-artifacts.sh
cache: &cache_build
directories:
- $HOME/cache
- env:
- BUILDING="frontend"
before_install: *prep_cache
script: ./.travis/compile-frontend.sh
before_cache: *clean_cache
after_success:
- ./.travis/upload-compiled-artifacts.sh
cache: *cache_build