-
Notifications
You must be signed in to change notification settings - Fork 34
/
.travis.yml
60 lines (60 loc) · 4.24 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
language: rust
rust:
- stable
- nightly
build_script: make test
cache: cargo
matrix:
include:
- os: osx
- os: osx
rust: nightly
- script:
- cargo build
- mkdir -p ~/.config/sit
- 'echo "{\"author\": {\"name\": \"SIT Merge Request CI\"}}" > ~/.config/sit/config.json'
- git config --global user.name "SIT Merge Request CI"
- git config --global user.email "bot@sit.fyi"
- git checkout -b ci
- PATH=`pwd`/target/debug:$PATH ./scripts/ci ${TRAVIS_COMMIT_RANGE:-HEAD..HEAD} "cargo test" `git rev-parse HEAD` | tee log
- chmod 600 build-tools/travis-ci/sit-inbox
- cat log | tail -1 | xargs git push git@git.sit.fyi:sit-fyi/sit-inbox.git
env:
- GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -i build-tools/travis-ci/sit-inbox"
- env:
secure: NEQmng2pL4yPDYBvS16qm9IyXISV0BBsFLALlgNYA1ZSA23IPIEZTHvCPFZEApjEq4IjfHyh0r6Z/Je01LYbuTSddYjhxM8GLEFs8IJJdXtS9Xhhx77CZutKFbsEqdtAPzJdp/eSEymcc2nCnG7cj0Z7aFe814UpW+Rm1RVGPyHY/cTrtHEieH9n6bSoR7mB7YoVc6Y3VbBsB99DKhXfuKJXPJGwogo5ihygVR9qDANgJnvd9j5uP2KENxFC+pY9c6HSF9ez/dY8P0+0nfgL/sJPNco+9GdKfKEVrn8IEsGnecKOC5ws2yf8JUa+v70aqbk+cu6UxOh/Uw/CB3igSKqqLkrp5sEsmi/zOzRe0sYLTcVC82DyHkx4jDY1Ej6YtAC84T2pWpSNg+t9BAP/ly3FkB8z3ggTQuT7/fvy2huett+lx27lLcnEa33DrclIRsHvHq4kCk7cmTga1VawNv1cJtMy97PMH9BNw9gLGbTxeuqvywEcZKsT589yFzYC03ZEJPAV13wOMfA7e3y+GY+oCBdqjTcoHUAarfPf3Lx0FBazRQpyxB48ngaXdewNNQs2KdRkFb2LkxCoExxNX69+X8gxCU56fmiXtNukh7lLZ0LpA/oGGgUs821ReGnJ/I+EhioYFISot81Wecx54xRHsVJ7dOQXBAmpEjp+zWg=
script:
- wget -c https://github.com/alexcrichton/cargo-vendor/releases/download/0.1.13/cargo-vendor-0.1.13-x86_64-unknown-linux-musl.tar.gz
- tar xzvfp cargo-vendor-0.1.13-x86_64-unknown-linux-musl.tar.gz
- git clone $CARGO_VENDORIZED_REPOSITORY sit-cargo-deps
- "(cd sit-cargo-deps && cp README.md ../cargo-deps-readme && git rm -rf * &&
mv ../cargo-deps-readme README.md && git add -f README.md)"
- cargo-vendor-0.1.13-x86_64-unknown-linux-musl/cargo-vendor vendor sit-cargo-deps
- (cd sit-cargo-deps && echo $TRAVIS_COMMIT > COMMIT && git add -f * && git -c
user.name="SIT Build Bot" -c user.email="bot@sit.fyi" commit -m "Updated
cargo deps for $TRAVIS_COMMIT" && git tag deps-`git rev-parse --short $TRAVIS_COMMIT`
&& git push && git push --tags)
- nodejs: node
script:
- cargo build
before_deploy:
- npm install -g gh-badges
- mkdir -p badges
- mkdir -p ~/.config/sit
- 'echo "{\"author\": {\"name\": \"Badge Builder\"}}" > ~/.config/sit/config.json'
- echo issues " $(./target/debug/sit items -f "state == 'open'" | wc -l | xargs)/$(./target/debug/sit items | wc -l | xargs) "
- echo merge requests " $(./target/debug/sit items -f "length(merge_requests || \`[]\`) > \`0\` && state == 'open'" | wc -l | xargs)/$(./target/debug/sit items -f "length(merge_requests || \`[]\`) > \`0\`" | wc -l | xargs) "
- badge issues " $(./target/debug/sit items -f "state == 'open'" | wc -l | xargs)/$(./target/debug/sit items | wc -l | xargs) " :yellow @flat > badges/issues.svg
- badge "merge requests" " $(./target/debug/sit items -f "length(merge_requests || \`[]\`) > \`0\` && state == 'open'" | wc -l | xargs)/$(./target/debug/sit items -f "length(merge_requests || \`[]\`) > \`0\`" | wc -l | xargs) " :orange @flat > badges/merge_requests.svg
deploy:
provider: s3
cache_control: no-cache
expires: "2017-12-21 00:00:00 -0000"
access_key_id: AKIAI3KIOT3XYA5FTR3Q
secret_access_key:
secure: iSEKoc0zV4oaQsUdG5I+8OTaFruz/lLKFPge6k4A0AHTXF5QclJQm5fcpWcxiYyZ1oTvekAz3fUwGU9ke8RrLpBTaMnGjfymTuiVpVcCajKCD22WiLzbj4eSYF/84Ve876G3qB3bFSvQRjNTiPVdDg+y3njIbQP16NNrRsVpTvt/dh+eC4xY1b+hs0gcqyJ7iBONifTgsF3vD/klcSFUKpO4FS+7UwGfHGk5Em60oRerkKhE0MUbEsMotpwBtmln1vCCXXo/Hww8BqT6b/Sn6vm/PykOoAXTW3DNSVTHqX9ZFUTf0XGRBDFwcVH+Gj8HScv2esOO4S4Hx8Xl2QYGNQMakSOcdzd6kip6gsN//2/lHzwsakxy5oxQGqL5Ln8HoJ1/yQsHcwaziX8VXTzKeYAmnO+zLwga7IXTC4fcRYT2ADs+IkLLCI9sN/Efh3Qb9JwDm7WFSi0eLsDWuTqDZQZX639Qsv8MctgZKR20o0TXp0ssq7Ttr82S73O91ivY32dIso9QcsfFghkPa2sN3Ng/s5CiI7Gy4kfcpx33XYnKO2upNX1LG2vOkY8mE831vi75Ij1F/USU7amOmz+VxdvZeP2/qkjsA6RbJkPNbM/E2VTIUTMNWI8dtqhZismhHiKk7LUiyCFz4Kt/ic2bsQWvrZF82CfofWnGJLliy7Q=
bucket: sit-badges
local_dir: badges
skip_cleanup: true
acl: public_read
region: us-west-1