-
Notifications
You must be signed in to change notification settings - Fork 13
/
.drone.yml
105 lines (101 loc) · 3.45 KB
/
.drone.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
kind: pipeline
name: default
steps:
- name: version
image: alpine:3.10
commands:
- apk add --no-cache git
- git fetch --tags
- git describe --tags
- git describe --tags > SEED
- echo -n $(git describe --tags),latest > .tags
- name: test
image: frolvlad/alpine-glibc:alpine-3.12
commands:
- apk add --no-cache openjdk8 nodejs clang libc-dev libunwind-dev g++ git libstdc++
- git config --global user.email "[email protected]"
- git config --global user.name "CI user"
# Coursier v2.0.7
- wget https://raw.githubusercontent.com/coursier/launchers/cbccb1e174b641e7b8f1907bf4fbdfa6f3d58d6a/cs-x86_64-pc-linux && mv cs-x86_64-pc-linux /usr/bin/coursier && chmod +x /usr/bin/coursier
- export PATH=$PATH:/root/.local/share/coursier/bin
- coursier install bloop:$(cat BLOOP) --only-prebuilt=true
- ./build.sh
- COURSIER_SBT_LAUNCHER_ADD_PLUGIN=true ./csbt "; scaladoc211/publishLocal; scaladoc212/publishLocal; scaladoc213/publishLocal; test"
- name: publish_prerelease
image: plugins/docker
environment:
BINTRAY_USERNAME:
from_secret: bintray_username
BINTRAY_API:
from_secret: bintray_api
# See https://github.com/docker/for-linux/issues/711
PLUGIN_STORAGE_DRIVER: overlay
settings:
repo: tindzk/seed
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args_from_env:
- BINTRAY_USERNAME
- BINTRAY_API
when:
branch:
- master
event:
- push
- name: publish_release
image: plugins/docker
environment:
BINTRAY_USERNAME:
from_secret: bintray_username
BINTRAY_API:
from_secret: bintray_api
PLUGIN_STORAGE_DRIVER: overlay
settings:
repo: tindzk/seed
username:
from_secret: docker_username
password:
from_secret: docker_password
build_args_from_env:
- BINTRAY_USERNAME
- BINTRAY_API
when:
event:
- tag
- name: benchmarks
image: tindzk/seed:latest
pull: always
commands:
- blp-server &
- apk add git curl zip bash
- git clone https://github.com/sparsetech/toml-scala.git
- cd toml-scala
- curl -L -o hyperfine.tar.gz https://github.com/sharkdp/hyperfine/releases/download/v1.5.0/hyperfine-v1.5.0-x86_64-unknown-linux-musl.tar.gz
- tar xvf hyperfine.tar.gz
- curl -L -o sbt.zip https://piccolo.link/sbt-1.2.8.zip && unzip sbt.zip
- export PATH=$(pwd)/hyperfine-v1.5.0-x86_64-unknown-linux-musl:$(pwd)/sbt/bin:$PATH
- seed version
- echo Comparing start-up time
- sbt exit # Download dependencies
- hyperfine --export-markdown comparison.md 'sbt exit' 'seed help'
- cat comparison.md
- echo Comparing Bloop project generation time
- echo 'addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.2.3")' >> project/plugins.sbt
- sbt bloopInstall
- seed bloop
- hyperfine --export-markdown comparison.md 'sbt bloopInstall' 'seed bloop'
- cat comparison.md
- echo Comparing compilation time
- hyperfine -i --show-output --export-markdown comparison.md \
'sbt "; clean; compile"' \
'bloop clean --propagate --cascade && bloop compile toml-js toml-jvm toml-native'
- cat comparison.md
trigger:
event:
- tag
when:
ref:
include:
- refs/tags/benchmark