-
Notifications
You must be signed in to change notification settings - Fork 39
/
.travis.yml
81 lines (81 loc) · 2.49 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
language: rust
rust:
- nightly
cache: cargo
addons:
postgresql: "9.4"
apt:
packages:
- cmake
- cmake-data
- libpq-dev
services:
- redis-server
before_install:
- sudo add-apt-repository ppa:chris-lea/libsodium -y
- sudo add-apt-repository ppa:chris-lea/zeromq -y
- sudo apt-get update
- sudo apt-get install libfuse-dev libsodium-dev libzmq5-dev -y
- nvm install v6
before_script:
- psql -c "create user rust with password 'rust';" -U postgres
- psql -c "create database rust owner rust;" -U postgres
- psql -c "create user diesel with password 'diesel';" -U postgres
- psql -c "create database diesel owner diesel;" -U postgres
- git config --global user.email "[email protected]"
- git config --global user.name "24daysofrust"
- cd .. && mkdir repo && cd repo && git init && echo "hello" > hello.txt && git add hello.txt && git commit -am "Initial commit" && cd ..
- mkdir git_remote && cd git_remote && git init --bare && cd $TRAVIS_BUILD_DIR
- export PATH=$PATH:$HOME/.cargo/bin/
- if ! command -v diesel > /dev/null; then cargo install diesel_cli; fi
script:
- cd vol1
- cargo build
- cargo run --bin=day2
- cargo run --bin=day3
# - cargo run --bin=day4
- cargo run --bin=day5
- cargo run --bin=day6
- cargo run --bin=day7
- cargo run --bin=day9
- cargo run --bin=day10
- cargo run --bin=day11
- cargo run --bin=day12
- cargo run --bin=day13
- cargo run --bin=day14
- cargo run --bin=day17
- cargo run --bin=day18
- cargo run --bin=day20
- cargo run --bin=day21
- cd ../vol2
- diesel migration run
- cargo build
- cargo run --bin=day2
- cargo run --bin=day3
- cargo run --bin=day4
- cargo run --bin=day5
- cargo run --bin=day6
- cargo run --bin=day7
- cargo run --bin=day8
- cargo run --bin=day10
- cargo run --bin=day11
- cargo run --bin=day12
- cargo run --bin=day13
# - cargo run --bin=day14
- cargo run --bin=day15
- cargo run --bin=day16 -- ../../repo
- cargo run --bin=day17
- cargo run --bin=day18
- cargo run --bin=day19
- cargo run --bin=day20
- cargo run --bin=day21
# - cargo run --bin=day22
after_success:
- cd ..
- npm install gitbook-cli
- gitbook install
- gitbook build -v 2.6.7
- test "$TRAVIS_PULL_REQUEST" == false && test "$TRAVIS_BRANCH" == "master" && bash deploy-book.sh
env:
global:
- secure: "bwaHviVayREGvar1lk9CY7gZR/Ck95hY6TuKZUhrBXakg4k/uw4D6fHEbCb7NTom12mvD3UP7Spwp4nZDjkRmXIppODB+SYmkS9zxwvm154SH+09uXW4XCjbtIUWsGx79pG/FlVQ7Cz5kvY4IY+a6PV2JSsTBvJCYjeNrZ9Qeuo="