-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
67 lines (60 loc) · 1.7 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
language: rust
sudo: true
rust:
- stable
- beta
- nightly
# Cache `cargo install`ed tools, but don't cache the project's `target`
# directory (which ends up over-caching and filling all disk space!)
cache: cargo
# directories:
# - /home/travis/.cargo
script:
- cargo build --verbose --all
- cargo test --verbose --all
DEPLOY_TO_GITHUB: &DEPLOY_TO_GITHUB
before_deploy:
- git config --local user.name "Jan Schreiber"
- git config --local user.email "[email protected]"
- name="ncgopher-$TRAVIS_TAG-$TARGET"
- mkdir $name
- cp target/$TARGET/release/ncgopher $name/
- cp README.org LICENSE $name/
- tar czvf $name.tar.gz $name
deploy:
provider: releases
api_key: $GH_TOKEN
file: ncgopher-$TRAVIS_TAG-$TARGET.tar.gz
skip_cleanup: true
on:
branch: master
tags: true
matrix:
include:
# Can't crosscompile due to error in ncurses-rs
# - name: Linux Binary
# env: TARGET=x86_64-unknown-linux-musl
# rust: stable
# before_script:
# - rustup target add $TARGET
# - sudo apt-get -y install libncurses5 libncursesw5 libncurses5-dev libncursesw5-dev git
# script: cargo build --verbose --release --target $TARGET --locked
# addons:
# apt:
# packages:
# - musl-tools
# <<: *DEPLOY_TO_GITHUB
- name: macOS Binary
env: MACOSX_DEPLOYMENT_TARGET=10.7 TARGET=x86_64-apple-darwin
os: osx
rust: stable
script: cargo build --release --target $TARGET --locked
install: true
<<: *DEPLOY_TO_GITHUB
# Testing other channels
# Can't get compilation on windows to run here:
# - name: Windows
# env: TARGET=x86_64-pc-windows-msvc
# # TODO: install mingw-w64-pdcurses
# os: windows
# rust: stable