forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
132 lines (120 loc) · 3.62 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
123
124
125
126
127
128
129
130
131
132
# We override the default clone step to workaround a bug with GitHub (see #3415)
clone:
clone:
image: plugins/git
commands:
- sleep 5s
- git init
- git remote add origin $DRONE_REMOTE_URL
- git fetch --no-tags origin $DRONE_COMMIT_REF
- if [ $DRONE_BUILD_EVENT = "push" ]; then git reset --hard -q $DRONE_COMMIT_SHA; else git checkout -qf FETCH_HEAD; fi
- git submodule update --init --recursive
pipeline:
# TESTS:
# We run tests in parallel. Tests run in a copy of the working directory to avoid conflict
test_legacy:
group: test
image: lampepfl/dotty:2017-11-17
commands:
- cp -R . /tmp/0/ && cd /tmp/0/
- ./project/scripts/sbt legacyTests
test:
group: test
image: lampepfl/dotty:2017-11-17
commands:
- cp -R . /tmp/1/ && cd /tmp/1/
- ./project/scripts/sbt ";compile ;testAll"
- ./project/scripts/sbtTests
test_bootstrapped:
group: test
image: lampepfl/dotty:2017-11-17
commands:
- cp -R . /tmp/2/ && cd /tmp/2/
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/testAll"
- ./project/scripts/sbtBootstrappedTests
test_optimised:
group: test
image: lampepfl/dotty:2017-11-17
commands:
- cp -R . /tmp/3/ && cd /tmp/3/
- ./project/scripts/sbt dotty-optimised/testAll
test_sbt:
group: test
image: lampepfl/dotty:2017-11-17
commands:
- cp -R . /tmp/4/ && cd /tmp/4/
- ./project/scripts/sbt sbt-dotty/scripted
when:
# sbt scripted tests are slow and don't run on PRs
event: [ push, tag, deployment ]
# DOCUMENTATION:
documentation:
image: lampepfl/dotty:2017-11-17
commands:
- ./project/scripts/genDocs
secrets: [ bot_pass ]
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:2017-11-17
environment:
- NIGHTLYBUILD=yes
commands:
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
volumes:
- /home/drone/keys:/keys
secrets: [ sonatype_user, sonatype_pw, pgp_pw ]
when:
event: deployment
environment: nightly
publish_release:
image: lampepfl/dotty:2017-11-17
environment:
- RELEASEBUILD=yes
commands:
# Produces dotty-version.{tar.gz, zip}
- ./project/scripts/sbt dist-bootstrapped/packArchive
- ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
volumes:
- /home/drone/keys:/keys
secrets: [ sonatype_user, sonatype_pw, pgp_pw ]
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:2017-11-17
environment:
- RELEASEBUILD=yes
commands:
- ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease"
volumes:
- /home/drone/keys:/keys
secrets: [ sonatype_user, sonatype_pw, pgp_pw ]
when:
event: deployment
environment: sbt_release
# NOTIFICATIONS:
slack:
image: plugins/slack
channel: dotty
secrets: [ slack_webhook ]
when:
status: [ failure ]
event: [ push, tag, deployment ]
branches:
# The gh-pages branch holds the documentation and don't need to be built
exclude: gh-pages