|
| 1 | +--- |
| 2 | +kind: pipeline |
| 3 | +name: default |
| 4 | + |
| 5 | +platform: |
| 6 | + os: linux |
| 7 | + arch: amd64 |
| 8 | + |
1 | 9 | clone:
|
2 |
| - git: |
3 |
| - image: plugins/git |
4 |
| - # We clone submodules ourselves |
5 |
| - recursive: false |
6 |
| - |
7 |
| -pipeline: |
8 |
| - # We add a custom clone step to workaround a bug with GitHub (see #3415) |
9 |
| - clone: |
10 |
| - image: plugins/git |
11 |
| - commands: |
12 |
| - # if build is PR rebase on top of target branch |
13 |
| - - if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then |
14 |
| - git config user.email "dotty.bot@epfl.ch"; |
15 |
| - git config user.name "Dotty CI"; |
16 |
| - git pull "$DRONE_REMOTE_URL" "$DRONE_BRANCH"; |
17 |
| - fi |
18 |
| - |
19 |
| - # TESTS: |
20 |
| - # We run tests in parallel. Tests run in a copy of the working directory to avoid conflict |
21 |
| - test: |
22 |
| - group: test |
23 |
| - image: lampepfl/dotty:2019-04-22 |
24 |
| - commands: |
25 |
| - - cp -R . /tmp/1/ && cd /tmp/1/ |
26 |
| - - ./project/scripts/sbt ";compile ;test" |
27 |
| - - ./project/scripts/cmdTests |
28 |
| - |
29 |
| - test_bootstrapped: |
30 |
| - group: test |
31 |
| - image: lampepfl/dotty:2019-04-22 |
32 |
| - commands: |
33 |
| - - cp -R . /tmp/2/ && cd /tmp/2/ |
34 |
| - - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test" |
35 |
| - - ./project/scripts/bootstrapCmdTests |
36 |
| - |
37 |
| - community_build: |
38 |
| - group: test |
39 |
| - image: lampepfl/dotty:2019-04-22 |
40 |
| - commands: |
41 |
| - - cp -R . /tmp/3/ && cd /tmp/3/ |
42 |
| - - git submodule update --init --recursive --jobs 7 |
43 |
| - - ./project/scripts/sbt community-build/test |
44 |
| - |
45 |
| - test_sbt: |
46 |
| - group: test |
47 |
| - image: lampepfl/dotty:2019-04-22 |
48 |
| - commands: |
49 |
| - - cp -R . /tmp/4/ && cd /tmp/4/ |
50 |
| - - ./project/scripts/sbt sbt-dotty/scripted |
51 |
| - when: |
52 |
| - # sbt scripted tests are slow and only run on nightly or deployment |
53 |
| - event: [ tag, deployment ] |
54 |
| - |
55 |
| - test_scala212: |
56 |
| - group: test |
57 |
| - image: lampepfl/dotty:2019-04-22 |
58 |
| - commands: |
59 |
| - - cp -R . /tmp/5/ && cd /tmp/5/ |
60 |
| - - ./project/scripts/sbt ";++2.12.8 ;compile ;test" |
61 |
| - # when: |
62 |
| - # event: [ push, tag, deployment ] |
63 |
| - |
64 |
| - test_java11: |
65 |
| - group: test |
66 |
| - image: lampepfl/dotty:2019-04-22 |
67 |
| - commands: |
68 |
| - - export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH" |
69 |
| - - cp -R . /tmp/6/ && cd /tmp/6/ |
70 |
| - - ./project/scripts/sbt ";compile ;test" |
71 |
| - when: |
72 |
| - event: [ push, tag, deployment ] |
73 |
| - |
74 |
| - # DOCUMENTATION: |
75 |
| - documentation: |
76 |
| - image: lampepfl/dotty:2019-04-22 |
77 |
| - commands: |
78 |
| - - ./project/scripts/genDocs |
79 |
| - secrets: [ bot_token ] |
80 |
| - when: |
81 |
| - event: push |
82 |
| - # We only generate the documentation for the master branch |
83 |
| - branch: master |
84 |
| - |
85 |
| - # PUBLISHING: |
86 |
| - # Publishing expect NIGHTLYBUILD or RELEASEBUILD to be set. See dottyVersion in Build.scala |
87 |
| - publish_nightly: |
88 |
| - image: lampepfl/dotty:2019-04-22 |
89 |
| - environment: |
90 |
| - - NIGHTLYBUILD=yes |
91 |
| - commands: |
92 |
| - - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease" |
93 |
| - secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ] |
94 |
| - when: |
95 |
| - event: deployment |
96 |
| - environment: nightly |
97 |
| - |
98 |
| - publish_release: |
99 |
| - image: lampepfl/dotty:2019-04-22 |
100 |
| - environment: |
101 |
| - - RELEASEBUILD=yes |
102 |
| - commands: |
103 |
| - # Produces dotty-version.{tar.gz, zip} |
104 |
| - - ./project/scripts/sbt dist-bootstrapped/packArchive |
105 |
| - - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease" |
106 |
| - secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ] |
107 |
| - when: |
108 |
| - event: tag |
109 |
| - |
110 |
| - # Publish dotty-version.{tar.gz, zip} to GitHub Release |
111 |
| - github_release: |
112 |
| - image: plugins/github-release |
113 |
| - secrets: [ github_token ] |
| 10 | + disable: true |
| 11 | + |
| 12 | +steps: |
| 13 | +- name: git |
| 14 | + pull: default |
| 15 | + image: plugins/git |
| 16 | + |
| 17 | +- name: clone |
| 18 | + pull: default |
| 19 | + image: plugins/git |
| 20 | + depends_on: [ git ] |
| 21 | + commands: |
| 22 | + - if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then |
| 23 | + git config user.email "dotty.bot@epfl.ch"; |
| 24 | + git config user.name "Dotty CI"; |
| 25 | + git pull "$DRONE_REMOTE_URL" "$DRONE_BRANCH"; |
| 26 | + fi |
| 27 | + |
| 28 | +- name: test |
| 29 | + pull: default |
| 30 | + image: lampepfl/dotty:2019-10-17 |
| 31 | + depends_on: [ clone ] |
| 32 | + commands: |
| 33 | + - cp -R . /tmp/1/ && cd /tmp/1/ |
| 34 | + - ./project/scripts/sbt ";compile ;test" |
| 35 | + - ./project/scripts/cmdTests |
| 36 | + |
| 37 | +- name: test_bootstrapped |
| 38 | + pull: default |
| 39 | + image: lampepfl/dotty:2019-10-17 |
| 40 | + depends_on: [ clone ] |
| 41 | + commands: |
| 42 | + - cp -R . /tmp/2/ && cd /tmp/2/ |
| 43 | + - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test ;dotty-staging/test ;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test" |
| 44 | + - ./project/scripts/bootstrapCmdTests |
| 45 | + |
| 46 | +- name: community_build |
| 47 | + pull: default |
| 48 | + image: lampepfl/dotty:2019-10-17 |
| 49 | + depends_on: [ clone ] |
| 50 | + commands: |
| 51 | + - cp -R . /tmp/3/ && cd /tmp/3/ |
| 52 | + - git submodule sync |
| 53 | + - git submodule update --init --recursive --jobs 7 |
| 54 | + - ./project/scripts/sbt community-build/test |
| 55 | + |
| 56 | +- name: test_sbt |
| 57 | + pull: default |
| 58 | + image: lampepfl/dotty:2019-10-17 |
| 59 | + depends_on: [ clone ] |
| 60 | + commands: |
| 61 | + - cp -R . /tmp/4/ && cd /tmp/4/ |
| 62 | + - ./project/scripts/sbt sbt-dotty/scripted |
| 63 | + when: |
| 64 | + event: |
| 65 | + - tag |
| 66 | + - promote |
| 67 | + |
| 68 | +- name: test_java11 |
| 69 | + pull: default |
| 70 | + image: lampepfl/dotty:2019-10-17 |
| 71 | + depends_on: [ clone ] |
| 72 | + commands: |
| 73 | + - export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH" |
| 74 | + - cp -R . /tmp/6/ && cd /tmp/6/ |
| 75 | + - ./project/scripts/sbt ";compile ;test" |
| 76 | + when: |
| 77 | + event: |
| 78 | + - tag |
| 79 | + - promote |
| 80 | + |
| 81 | +- name: documentation |
| 82 | + pull: default |
| 83 | + image: lampepfl/dotty:2019-10-17 |
| 84 | + depends_on: |
| 85 | + - test |
| 86 | + - test_bootstrapped |
| 87 | + - community_build |
| 88 | + - test_java11 |
| 89 | + commands: |
| 90 | + - ./project/scripts/genDocs |
| 91 | + environment: |
| 92 | + BOT_TOKEN: |
| 93 | + from_secret: bot_token |
| 94 | + when: |
| 95 | + branch: |
| 96 | + - master |
| 97 | + event: |
| 98 | + - push |
| 99 | + |
| 100 | +- name: publish_nightly |
| 101 | + pull: default |
| 102 | + image: lampepfl/dotty:2019-10-17 |
| 103 | + depends_on: |
| 104 | + - test |
| 105 | + - test_bootstrapped |
| 106 | + - community_build |
| 107 | + - test_sbt |
| 108 | + - test_java11 |
| 109 | + commands: |
| 110 | + - ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease" |
| 111 | + environment: |
| 112 | + NIGHTLYBUILD: yes |
| 113 | + PGP_PW: |
| 114 | + from_secret: pgp_pw |
| 115 | + PGP_SECRET: |
| 116 | + from_secret: pgp_secret |
| 117 | + SONATYPE_PW: |
| 118 | + from_secret: sonatype_pw |
| 119 | + SONATYPE_USER: |
| 120 | + from_secret: sonatype_user |
| 121 | + when: |
| 122 | + event: |
| 123 | + - promote |
| 124 | + target: |
| 125 | + - nightly |
| 126 | + |
| 127 | +- name: publish_release |
| 128 | + pull: default |
| 129 | + image: lampepfl/dotty:2019-10-17 |
| 130 | + depends_on: |
| 131 | + - test |
| 132 | + - test_bootstrapped |
| 133 | + - community_build |
| 134 | + - test_sbt |
| 135 | + - test_java11 |
| 136 | + commands: |
| 137 | + - ./project/scripts/sbt dist-bootstrapped/packArchive |
| 138 | + - ./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease" |
| 139 | + environment: |
| 140 | + PGP_PW: |
| 141 | + from_secret: pgp_pw |
| 142 | + PGP_SECRET: |
| 143 | + from_secret: pgp_secret |
| 144 | + RELEASEBUILD: yes |
| 145 | + SONATYPE_PW: |
| 146 | + from_secret: sonatype_pw |
| 147 | + SONATYPE_USER: |
| 148 | + from_secret: sonatype_user |
| 149 | + when: |
| 150 | + event: |
| 151 | + - tag |
| 152 | + |
| 153 | +- name: github_release |
| 154 | + pull: default |
| 155 | + image: plugins/github-release |
| 156 | + depends_on: [ publish_release ] |
| 157 | + settings: |
| 158 | + checksum: |
| 159 | + - sha256 |
114 | 160 | draft: true
|
115 | 161 | files:
|
116 |
| - - dist-bootstrapped/target/dotty-* |
117 |
| - checksum: |
118 |
| - - sha256 |
119 |
| - when: |
120 |
| - event: tag |
121 |
| - |
122 |
| - publish_sbt_release: |
123 |
| - image: lampepfl/dotty:2019-04-22 |
124 |
| - environment: |
125 |
| - - RELEASEBUILD=yes |
126 |
| - commands: |
127 |
| - - ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease" |
128 |
| - secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ] |
129 |
| - when: |
130 |
| - event: deployment |
131 |
| - environment: sbt_release |
132 |
| - |
133 |
| - # NOTIFICATIONS: |
134 |
| - slack: |
135 |
| - image: plugins/slack |
| 162 | + - dist-bootstrapped/target/dotty-* |
| 163 | + environment: |
| 164 | + GITHUB_TOKEN: |
| 165 | + from_secret: github_token |
| 166 | + when: |
| 167 | + event: |
| 168 | + - tag |
| 169 | + |
| 170 | +- name: publish_sbt_release |
| 171 | + pull: default |
| 172 | + image: lampepfl/dotty:2019-10-17 |
| 173 | + depends_on: |
| 174 | + - test |
| 175 | + - test_bootstrapped |
| 176 | + - community_build |
| 177 | + - test_sbt |
| 178 | + - test_java11 |
| 179 | + commands: |
| 180 | + - ./project/scripts/sbtPublish ";project sbt-dotty ;publishSigned ;sonatypeBundleRelease" |
| 181 | + environment: |
| 182 | + PGP_PW: |
| 183 | + from_secret: pgp_pw |
| 184 | + PGP_SECRET: |
| 185 | + from_secret: pgp_secret |
| 186 | + RELEASEBUILD: yes |
| 187 | + SONATYPE_PW: |
| 188 | + from_secret: sonatype_pw |
| 189 | + SONATYPE_USER: |
| 190 | + from_secret: sonatype_user |
| 191 | + when: |
| 192 | + event: |
| 193 | + - promote |
| 194 | + target: |
| 195 | + - sbt_release |
| 196 | + |
| 197 | +- name: slack |
| 198 | + pull: default |
| 199 | + image: plugins/slack |
| 200 | + settings: |
136 | 201 | channel: dotty
|
137 |
| - secrets: [ slack_webhook ] |
138 |
| - when: |
139 |
| - status: [ failure ] |
140 |
| - event: [ push, tag, deployment ] |
| 202 | + environment: |
| 203 | + SLACK_WEBHOOK: |
| 204 | + from_secret: slack_webhook |
| 205 | + when: |
| 206 | + event: |
| 207 | + - push |
| 208 | + - tag |
| 209 | + - promote |
| 210 | + status: |
| 211 | + - failure |
| 212 | + |
| 213 | +... |
0 commit comments