forked from Spotifyd/spotifyd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
73 lines (71 loc) · 2.63 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
language: rust
cache: cargo
rust: stable
sudo: required
os: linux
dist: xenial
matrix:
include:
- name: "ARM Build"
env:
- TARGET=arm-unknown-linux-gnueabihf
- RUSTFLAGS="-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L$TRAVIS_BUILD_DIR/deps_root/usr/lib/arm-linux-gnueabihf"
- PKG_CONFIG_ALLOW_CROSS=1
- OPENSSL_DIR=$TRAVIS_BUILD_DIR/deps_root/usr
- OPENSSL_LIB_DIR=$TRAVIS_BUILD_DIR/deps_root/usr/lib/arm-linux-gnueabihf
- OPENSSL_INCLUDE_DIR=$TRAVIS_BUILD_DIR/deps_root/usr/include/arm-linux-gnueabihf
- SHORT_TARGET=armv6
addons:
apt:
packages:
- gcc-arm-linux-gnueabihf
- libc6-armhf-cross
- libc6-dev-armhf-cross
- libasound2-dev
- libssl-dev
- libdbus-1-dev
- portaudio19-dev
before_script:
- echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial main" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update
- sudo apt-get download libasound2:armhf
- sudo apt-get download libasound2-dev:armhf
- sudo apt-get download libssl-dev:armhf
- sudo apt-get download libssl1.0.0:armhf
- dpkg -x libasound2_*.deb $TRAVIS_BUILD_DIR/deps_root/
- dpkg -x libssl-dev*.deb $TRAVIS_BUILD_DIR/deps_root/
- dpkg -x libssl1.0.0*.deb $TRAVIS_BUILD_DIR/deps_root/
- dpkg -x libasound2-dev*.deb $TRAVIS_BUILD_DIR/deps_root/
- name: "x86 Build"
env:
- TARGET=x86_64-unknown-linux-gnu
- SHORT_TARGET=x86
addons:
apt:
packages:
- libasound2-dev
- libssl-dev
- libpulse-dev
- libdbus-1-dev
- portaudio19-dev
script:
- rustup component add clippy
- rustup component add rustfmt
- RUSTFLAGS="" cargo clippy --all-features --all-targets -- -D warnings
- cargo fmt -- --check
- rustup target add $TARGET
- cargo build --locked --target=$TARGET --release
- zip -j spotifyd-`date --iso-8601`-$SHORT_TARGET-slim.zip target/$TARGET/release/spotifyd
- if [ $SHORT_TARGET = "x86" ]; then cargo build --target=$TARGET --release --features "pulseaudio_backend"; fi
- if [ $SHORT_TARGET = "x86" ]; then zip -j spotifyd-`date --iso-8601`-$SHORT_TARGET-pulseaudio.zip target/$TARGET/release/spotifyd; fi
deploy:
provider: releases
api_key:
secure: TwIv65LDHIBOgOsafV/wio+EwoG0pg5sFZZvEgNIV5J++zJoxaI35DH1/frKB6S4J2HhEKDojc7Np4tEgNUCOj+qZ51ma85SYr3SzVOg2n/TUI7lg/Gb13n6qd1AfTA2SsTryuGIvS7p4BaYSRtGXUuOghZg+7qdgl+zKeXiLnY=
file_glob: true
file: "spotifyd*zip"
skip_cleanup: true
on: [push, pull_request]
paths: '**.rs'
branch: master
tags: true