-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
51 lines (45 loc) · 1.3 KB
/
.gitlab-ci.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
image: gradle:latest
variables:
GOPTS: "--no-daemon --console=plain --stacktrace"
CI: "true"
BEFORE_TASK: ""
AFTER_TASK: ""
GCMD: "gradle"
BUILD_TASK: "assemble"
DOC_TASK: "dokkaHtml"
TEST_JVM_TASK: "jvmTest"
TEST_JS_TASK: "clean jsTest"
JS_COMPILE_TASK: "clean jsMain"
NPM_PUBLISH_TASK: "publishJsNpmPublicationToNpm"
MAVEN_TASK: "publishAllPublicationsToMavenRepository"
PAGES_TASK: "orchidBuild"
ORG_GRADLE_PROJECT_orchidBaseUrl: "https://gciatto-unibo.gitlab.io/kt-math"
Compile:
stage: build
script: $GCMD $BEFORE_TASK $BUILD_TASK $AFTER_TASK $GOPTS
Test JVM:
stage: test
script: $GCMD $BEFORE_TASK $TEST_JVM_TASK $AFTER_TASK $GOPTS
Test JS:
stage: test
script: $GCMD $BEFORE_TASK $TEST_JS_TASK $AFTER_TASK $GOPTS
Deploy to Maven Central:
stage: deploy
script: $GCMD $BEFORE_TASK $MAVEN_TASK $AFTER_TASK $GOPTS
environment:
name: Nexus Repository Manager
url: "https://s01.oss.sonatype.org/#stagingRepositories"
only:
- /^(master)|(release)$/
when: manual
Deploy to NPM:
stage: deploy
script:
- $GCMD $BEFORE_TASK $JS_COMPILE_TASK $AFTER_TASK $GOPTS
- $GCMD $BEFORE_TASK $NPM_PUBLISH_TASK $AFTER_TASK $GOPTS
environment:
name: NPM
url: "https://www.npmjs.com/package/kt-math"
only:
- /^(master)|(release)|(develop)$/
when: manual