-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
40 lines (34 loc) · 934 Bytes
/
.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
language: rust
env:
global:
- PROJECT_NAME=toa-static-server
matrix:
include:
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
cache: cargo
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
cache: cargo
sudo: false
script:
- cargo build --target $TARGET
- cargo test --target $TARGET
before_deploy:
- cargo build --release --target $TARGET
- zip "$PROJECT_NAME-$TRAVIS_TAG-$TARGET.zip" -j `grep -m 1 "^" target/$TARGET/release/* -s | grep Binary | awk '{print $3}' | grep -v "rlib"`
deploy:
provider: releases
api_key: $GIT_TOKEN
file_glob: true
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}*
# don't delete the artifacts from previous phases
skip_cleanup: true
overwrite: true
# deploy when a new tag is pushed
on:
# channel to use to produce the release artifacts
condition: $TRAVIS_RUST_VERSION = stable
tags: true