forked from DostonAkhmedov/jmorphy2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvagga.yaml
163 lines (144 loc) · 4.32 KB
/
vagga.yaml
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
_default:
gradle-uid: &gradle-uid 900
gradle_home: &gradle-home /work/.gradle
command_options: &cmd-opts
container: jdk
user-id: *gradle-uid
external-user-id: 0
prerequisites: [_mk-gradle-user-home]
volumes:
/work/.gradle/caches: !CacheDir gradle-cache
minimum-vagga: v0.7.1
containers:
jdk:
environ:
JAVA_HOME: /usr/lib/jvm/java-13-openjdk-amd64
GRADLE_USER_HOME: *gradle-home
LANG: en_US.UTF-8
setup:
- !Ubuntu focal
- !UbuntuUniverse
- !Install
- ca-certificates-java
- openjdk-13-jdk-headless
- !Sh update-ca-certificates
elastic:
setup:
- !Ubuntu focal
- !UbuntuUniverse
- !Install [ca-certificates]
- !UbuntuRepo
url: https://artifacts.elastic.co/packages/7.x/apt
trusted: true
suite: stable
components: [main]
- !Env
ES_SKIP_SET_KERNEL_PARAMETERS: true
- !Install
- openjdk-13-jre-headless
- !Sh apt-get install elasticsearch=$(cat es.version)
- !EnsureDir /var/lib/elasticsearch
- !EnsureDir /var/log/elasticsearch
volumes:
/var/lib/elasticsearch: !Persistent { name: elastic-data }
/var/log/elasticsearch: !Persistent { name: elastic-logs }
auto-clean: true
pymorphy2:
environ:
HOME: /work
LANG: en_US.UTF-8
setup:
- !UbuntuRelease { codename: xenial }
- !PipConfig { dependencies: true }
- !Py3Install
- pymorphy2
- pymorphy2-dicts-ru
- pymorphy2-dicts-uk
- ipython
commands:
_mk-gradle-user-home: !Command
container: jdk
run: mkdir -p $GRADLE_USER_HOME/caches
gradle: !Command
<<: *cmd-opts
description: Run arbitrary gradle command
run: [./gradlew]
daemon: !Command
<<: *cmd-opts
description: Run gradle daemon
run: |
# --foreground option runs daemon with different jvm options
# so then another gradle process rejects to connect to the daemon
./gradlew --dry-run --daemon
GRADLE_PID=$(pidof java)
echo "Gradle daemon successfully started [PID: $GRADLE_PID]."
while [ -e /proc/$GRADLE_PID ]; do sleep 1; done
compile: !Command
<<: *cmd-opts
description: Compile all source files
run: [./gradlew, compileJava]
compile-test: !Command
<<: *cmd-opts
description: Compile all test source files
run: [./gradlew, compileTestJava]
build: !Command
<<: *cmd-opts
description: Compile, run tests and make packages
run: [./gradlew, build, -x=integTest]
assemble: !Command
<<: *cmd-opts
description: Build and assemple package
run: [./gradlew, assemble]
clean: !Command
<<: *cmd-opts
description: Clean all building files
run: [./gradlew, clean]
test: !Command
<<: *cmd-opts
description: Run unit tests
run: [./gradlew, test]
check: !Command
<<: *cmd-opts
description: Run all checks and tests
run: [./gradlew, check]
update-shas: !Command
<<: *cmd-opts
description: Clean up and update sha hashsums for local artifacts
run: |
cd /work/jmorphy2-elasticsearch/licenses
rm -rf dawg-*.sha1 jmorphy2-*.sha1
cd ..
./gradlew updateShas
benchmark: !Command
<<: *cmd-opts
description: Run benchmarks
run: [./gradlew, benchmark]
elastic: !Command
description: Run elasticsearch
container: elastic
user-id: 1
external-user-id: 0
volumes:
/usr/share/elasticsearch/plugins: !Tmpfs
prerequisites:
- _maybe-assemble-plugin
run: |
set -e
DISTRIBUTION_DIR=/work/jmorphy2-elasticsearch/build/distributions
PLUGIN_PATH=$DISTRIBUTION_DIR/analysis-jmorphy2-$(cat project.version)-es$(cat es.version).zip
/usr/share/elasticsearch/bin/elasticsearch-plugin install file:$PLUGIN_PATH
/usr/share/elasticsearch/bin/elasticsearch \
-E path.data=/var/lib/elasticsearch \
-E path.logs=/var/log/elasticsearch
_maybe-assemble-plugin: !Command
<<: *cmd-opts
run: |
DISTRIBUTION_DIR=/work/jmorphy2-elasticsearch/build/distributions
PLUGIN_PATH=$DISTRIBUTION_DIR/analysis-jmorphy2-$(cat project.version)-es$(cat es.version).zip
if [ ! -f ${PLUGIN_PATH} ]; then
./gradlew assemble -p jmorphy2-elasticsearch
fi
python: !Command
description: Run python shell with pymorphy2 package installed
container: pymorphy2
run: [ipython]