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 3ac689a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
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

script: ci/build.sh

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"] }
4 changes: 3 additions & 1 deletion ci/before_deploy.sh → ci/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -euo pipefail

sudo apt-get install libssl-dev

rustup target add $TARGET

if [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]
Expand All @@ -11,4 +13,4 @@ fi

cargo build --target=$TARGET --release

tar -C target/$TARGET/release -czf mybinary-$TRAVIS_TAG-$TARGET.tar.gz tado_exporter
tar -C target/$TARGET/release -czf tado-exporter-$TRAVIS_TAG-$TARGET.tar.gz tado-exporter

0 comments on commit 3ac689a

Please sign in to comment.