This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
80 lines (76 loc) · 2.89 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
---
language: rust
dist: xenial
rust:
- stable
- beta
- nightly
cache:
directories:
- $HOME/.cache/sccache
- $HOME/.cargo
- $HOME/.npm
- $HOME/.rustup
env:
global:
- CARGO_BUILD_JOBS=8
- CARGO_MAKE_VERSION=0.20.0
- CARGO_TERM_COLOR=always
- DATABASE_URL=postgres://[email protected]
- DIESEL_VERSION=1.4.0
- RUSTC_WRAPPER=~/.cargo/bin/sccache
- SCCACHE_ERROR_LOG=$HOME/sccache.log
- SCCACHE_IDLE_TIMEOUT=0
- SCCACHE_VERSION=0.2.8
# DOCKER_PASSWORD
- secure: "RCqWKYe7AVZKl0slJ/NGV+j82udShy9O1Bvuod4PNVZ714mP+yCZyel1gFY9A1X2BMSVi2syZslPlKiHEWAR8dOsHAlLBXJqAdtIICTKa1sgYK+EzioxXYP2d8c6EMnqwzDiko+sc5T5N2crp1ysWd4DHdhqz3kBp6JnDaVSewu5I7dCOSAVFzUtJp/2Jb1lQd/nrAlSX/M8m6j1xYe91QNpJvcDhVN1IhD94xT+GT7CM+Ifgmft3rD8OTWJokqGji1/c14jdZRKiDZNrUtvMidiBazJdge6KI+uZ06dSn2ns+7R+ZoZn/NEALGnJXKR/1w6KD8cY2s1qumqUpotwtePLsf+/EGNAEAdaH9K+3O0CXRL0I04JxSi/vjC12nG7RIXkyWxpJE3clr9KJWNzkmvVRYrftt/SuT56hpOXyYFfZfe09Lkn4ZGKSYWcorQx1VB+Bo1Ee089/VeG0T8btcZ7z4LKfBwlq2mL5TFoqftvenHO7U+6m5iMdAQINat3XefRlCVIzozN8HQSBet347Crj47YvlyAnHmfKKW4qKFwNnOj9fTPtDktk98yezNJGXlTiZK5zfpnJLLHuAv5yAu8490Kb+sYM5t3J9r4DmHNA4to5o1ItIqOeBNQIFHNwkNJhYZBWjpPQtZypmFBNKIlwU6pBzomLmx8w67Ya4="
matrix:
allow_failures:
- rust: nightly
fast_finish: true
install:
# install sccache for improved build caching
- env RUSTC_WRAPPER= cargo install sccache --version "$SCCACHE_VERSION" || true
# install build & deploy dependencies
- env RUSTC_WRAPPER= cargo install wasm-snip wasm-bindgen-cli || true
- curl -L https://git.io/fjiDo | sudo tar -xz --strip 1 -C /usr/local/bin/ && sudo chmod u+x /usr/local/bin/*
# configure rustup
- echo "$TRAVIS_RUST_VERSION" > rust-toolchain
- rustup component add rustfmt clippy
- rustup target add wasm32-unknown-unknown
- rustup show
# install nodejs + packages
- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- sudo apt-get install -y nodejs
- npm install -g prettier prettier-plugin-toml clean-css-cli sass
before_script:
- env RUST_LOG=sccache=error sccache --start-server
- cargo install cargo-make --version "$CARGO_MAKE_VERSION" || true
- cargo install diesel_cli --no-default-features --features postgres --version "$DIESEL_VERSION" || true
- diesel migration run --migration-dir src/server/migrations
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
script:
- cargo make test
# stop sccache
- sccache --stop-server || true
- cat "$SCCACHE_ERROR_LOG"
deploy:
- provider: script
script: cargo make push-container-latest
skip_cleanup: true
on:
rust: stable
branch: master
- provider: script
script: cargo make push-container-release
skip_cleanup: true
on:
rust: stable
all_branches: true
condition: $TRAVIS_TAG =~ ^automaat-server|automaat-web-client
services:
- postgresql
- redis-server
- docker
notifications:
email: false