forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
122 lines (111 loc) · 3.47 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
clone:
git:
image: plugins/git
# We clone submodules ourselves
recursive: false
pipeline:
# We add a custom clone step to workaround a bug with GitHub (see #3415)
clone:
image: plugins/git
commands:
# if build is PR rebase on top of target branch
- if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then
git config user.email "[email protected]";
git config user.name "Dotty CI";
git pull "$DRONE_REMOTE_URL" "$DRONE_BRANCH";
fi
# TESTS:
# We run tests in parallel. Tests run in a copy of the working directory to avoid conflict
test:
group: test
image: lampepfl/dotty:2019-02-06
commands:
- cp -R . /tmp/1/ && cd /tmp/1/
- ./project/scripts/sbt ";compile ;test"
- ./project/scripts/cmdTests
test_bootstrapped:
group: test
image: lampepfl/dotty:2019-02-06
commands:
- cp -R . /tmp/2/ && cd /tmp/2/
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run"
- ./project/scripts/bootstrapCmdTests
community_build:
group: test
image: lampepfl/dotty:2019-02-06
commands:
- cp -R . /tmp/3/ && cd /tmp/3/
- git submodule update --init --recursive --jobs 7
- export PATH=/tmp/4/project/scripts:$PATH
- sbt community-build/test
test_sbt:
group: test
image: lampepfl/dotty:2019-02-06
commands:
- cp -R . /tmp/4/ && cd /tmp/4/
- ./project/scripts/sbt sbt-dotty/scripted
when:
# sbt scripted tests are slow and only run on nightly or deployment
event: [ tag, deployment ]
# DOCUMENTATION:
documentation:
image: lampepfl/dotty:2019-02-06
commands:
- ./project/scripts/genDocs
secrets: [ bot_token ]
when:
event: push
# We only generate the documentation for the master branch
branch: master
# PUBLISHING:
# Publishing expect NIGHTLYBUILD or RELEASEBUILD to be set. See dottyVersion in Build.scala
publish_nightly:
image: lampepfl/dotty:2019-02-06
environment:
- NIGHTLYBUILD=yes
commands:
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
when:
event: deployment
environment: nightly
publish_release:
image: lampepfl/dotty:2019-02-06
environment:
- RELEASEBUILD=yes
commands:
# Produces dotty-version.{tar.gz, zip}
- ./project/scripts/sbt dist-bootstrapped/packArchive
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
when:
event: tag
# Publish dotty-version.{tar.gz, zip} to GitHub Release
github_release:
image: plugins/github-release
secrets: [ github_token ]
draft: true
files:
- dist-bootstrapped/target/dotty-*
checksum:
- sha256
when:
event: tag
publish_sbt_release:
image: lampepfl/dotty:2019-02-06
environment:
- RELEASEBUILD=yes
commands:
- ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease"
secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
when:
event: deployment
environment: sbt_release
# NOTIFICATIONS:
slack:
image: plugins/slack
channel: dotty
secrets: [ slack_webhook ]
when:
status: [ failure ]
event: [ push, tag, deployment ]