Skip to content

Commit 63ac206

Browse files
authored
Merge pull request #361 from AdExNetwork/travis-ci-tagging
TravisCI - trigger validator release on validator-v* tag
2 parents 3a17267 + 334cc16 commit 63ac206

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

.travis.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
language: rust
2+
# do not run any default scripts coming from `language: rust` (i.e. travis-ci)
3+
script:
4+
install:
5+
# Also don't cache the cargo registry
6+
before_cache:
7+
- rm -rf /home/travis/.cargo/registry
28
rust:
3-
- stable
9+
- 1.48.0
410
os: linux
511
# add nodejs for ganche-cli
612
node_js: "12.12.0"
@@ -13,34 +19,36 @@ env:
1319
global:
1420
- CARGO_MAKE_RUN_CHECK_FORMAT="true"
1521
- CARGO_MAKE_RUN_CLIPPY="true"
16-
services:
17-
- redis
1822

1923
stages:
20-
- test
21-
- deploy
24+
- name: run all tests
25+
- name: release validator
26+
if: (tag IS present) AND (tag =~ ^validator-v)
2227

2328
jobs:
2429
fast_finish: true
2530
include:
26-
- stage: test
27-
script:
31+
- stage: run all tests
32+
# @TODO: Maybe run a separate weekly job and use the cached cargo-make from there
33+
install:
2834
- which cargo-make || cargo install cargo-make
35+
script:
2936
- cargo make ci-flow
30-
# But don't cache the cargo registry
31-
before_cache:
32-
- rm -rf /home/travis/.cargo/registry
33-
- stage: deploy
34-
if: tag IS present
35-
before_deploy:
37+
services:
38+
- redis
39+
- stage: release validator
40+
# Disable the default Rust `install` & `script` from Travis
41+
install:
42+
script:
3643
- cargo build -p validator_worker --release --all-features --target x86_64-unknown-linux-gnu
37-
- cp target/x86_64-unknown-linux-gnu/release/validator_worker validator_worker-v$TRAVIS_TAG
44+
- cp target/x86_64-unknown-linux-gnu/release/validator_worker $TRAVIS_TAG
3845
deploy:
3946
provider: releases
40-
api_key: $GITHUB_API_TOKEN
41-
file: $TRAVIS_BUILD_DIR/validator_worker-v$TRAVIS_TAG
42-
skip_cleanup: true
47+
token: $GITHUB_API_TOKEN
48+
file: $TRAVIS_BUILD_DIR/$TRAVIS_TAG
49+
cleanup: false
4350
draft: true
4451
on:
4552
tags: true
46-
all_branches: true
53+
all_branches: true
54+
edge: true

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

validator_worker/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "validator_worker"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
authors = ["Lachezar Lechev <[email protected]>", "Samparsky <[email protected]>"]
55
edition = "2018"
66

0 commit comments

Comments
 (0)