This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (68 loc) · 1.73 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
74
75
76
77
78
79
dist: bionic
language: rust
rust:
- stable
services:
- docker
addons:
apt:
packages:
- npm
cache:
- cargo
- apt
env:
global:
- GITHUB_RELEASE_TITLE="fidelitas_release_$TRAVIS_COMMIT"
- SKIP_ELM=TRUE
matrix:
- TARGET="x86_64-unknown-linux-gnu"
- TARGET="armv7-unknown-linux-gnueabihf"
jobs:
include:
- stage: finish_deploy
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_ACCESS_TOKEN
title: $GITHUB_RELEASE_TITLE
on:
branch: master
draft: false
install:
# elm support
- sudo npm install -g elm
# x86_64 apt dependencies
- if [ $TARGET == "x86_64-unknown-linux-gnu" ]; then sudo apt-get install libvlc-dev; fi
script:
- elm make elm-src/Main.elm --output=controls.js
- |
if [ $TARGET == "x86_64-unknown-linux-gnu" ];
then
cargo build --verbose --all --target=$TARGET;
cargo test --verbose --all;
fi
- |
if [ $TARGET == "armv7-unknown-linux-gnueabihf" ];
then
mkdir cross-artifacts;
docker build -f dockerfiles/fidelitas-cross-armv7.Dockerfile -t fidelitas-cross-armv7 .;
docker run -v $PWD/cross-artifacts:/artifacts:rw fidelitas-cross-armv7;
install -D "cross-artifacts/fidelitas" "target/${TARGET}/debug/fidelitas";
fi
before_deploy:
- mkdir "release_${TARGET}"
- cp "target/${TARGET}/debug/fidelitas" "release_${TARGET}/"
- cp index.html "release_${TARGET}/"
- cp controls.js "release_${TARGET}/"
- tar -zcvf "fidelitas_${TARGET}.tar.gz" "release_${TARGET}"
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_ACCESS_TOKEN
file:
- "fidelitas_$TARGET.tar.gz"
title: $GITHUB_RELEASE_TITLE
on:
branch: master
draft: true