-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
61 lines (56 loc) · 2.38 KB
/
.travis.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
# avoids building a PR twice, once for a branch and another due to the PR status
# see: https://github.com/travis-ci/travis-ci/issues/1147#issuecomment-160820262
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
language: generic
addons:
chrome: stable
jobs:
include:
- stage: tests
name: Java tests
before_install:
- curl -O https://www.antlr.org/download/antlr-4.7.1-complete.jar
script:
# generate java
- java -jar antlr-4.7.1-complete.jar -Xexact-output-dir -o src/java/parcera/antlr -package parcera.antlr -Dlanguage=Java -no-listener -no-visitor src/Clojure.g4
# now we can actually proceed with clojure code
- lein do clean, compile, check, eastwood
- lein trampoline test
- lein trampoline test :benchmark
# still test stage
- name: JavaScript tests
before_install:
- curl -O https://www.antlr.org/download/antlr-4.7.1-complete.jar
- nvm install 14 # otherwise it runs by default on node 8
- npm init --yes
- npm add webpack@5 webpack-cli antlr4@4.7.1
script:
# generate javascript
- java -jar antlr-4.7.1-complete.jar -Xexact-output-dir -o src/clojure/parcera/antlr/js -package parcera.antlr -Dlanguage=JavaScript -no-listener -no-visitor src/Clojure.g4
# pre-bundle javascript
- npx webpack --config ./resources/webpack.config.js
- lein test-runner
- stage: Release
if: tag IS present
before_install:
- curl -O https://www.antlr.org/download/antlr-4.7.1-complete.jar
- nvm install 14 # otherwise it runs by default on node 8
- npm init --yes
- npm add webpack@5 webpack-cli antlr4@4.7.1
script:
# generate java
- java -jar antlr-4.7.1-complete.jar -Xexact-output-dir -o src/java/parcera/antlr -package parcera.antlr -Dlanguage=Java -no-listener -no-visitor src/Clojure.g4
# generate javascript
- java -jar antlr-4.7.1-complete.jar -Xexact-output-dir -o src/clojure/parcera/antlr/js -package parcera.antlr -Dlanguage=JavaScript -no-listener -no-visitor src/Clojure.g4
# pre-bundle javascript
- npx webpack --config ./resources/webpack.config.js
- lein do javac, compile, check
deploy:
- provider: script
script: lein deploy clojars
skip_cleanup: true
on:
tags: true