Skip to content

Commit

Permalink
Fixed travis.yml continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
eko committed Feb 28, 2020
1 parent 53f44cd commit a8970cf
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
26 changes: 20 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
language: rust
cache: cargo
env: TARGET=arm-unknown-linux-gnueabihf CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
before_deploy: ci/before_deploy.sh

matrix:
include:
- env: TARGET=arm-unknown-linux-gnueabihf CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=arm-unknown-linux-gnueabihf CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc

before_install:
- sudo apt-get install libssl-dev

install: |
if [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then
git clone --depth=1 https://github.com/raspberrypi/tools.git /tmp/tools
export PATH=/tmp/tools/arm-bcm2708/arm-linux-gnueabihf/bin:$PATH
fi
script:
- rustup target add $TARGET
- cargo build --target=$TARGET --release
- tar -C target/$TARGET/release -czf tado-exporter-$TRAVIS_TAG-$TARGET.tar.gz tado-exporter

deploy:
file: tado_exporter-$TRAVIS_TAG-$TARGET.tar.gz
provider: releases
api_key:
secure: $GITHUB_TOKEN
skip_cleanup: true
on:
tags: true
provider: releases
skip_cleanup: true
file: tado-exporter-$TRAVIS_TAG-$TARGET.tar.gz
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ serde_derive = "1.0.104"
serde_json = "1.0.48"
ticker = "0.1.1"
log = "0.4.8"
env_logger = "0.7.1"
env_logger = "0.7.1"
openssl = { version = "0.10.28", features = ["vendored"] }
14 changes: 0 additions & 14 deletions ci/before_deploy.sh

This file was deleted.

0 comments on commit a8970cf

Please sign in to comment.