-
Notifications
You must be signed in to change notification settings - Fork 87
263 lines (243 loc) · 6.3 KB
/
mynmr_tools_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
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
name: Myanmar Tools CI
on:
push:
branches: [ master ]
pull_request:
branches: '*'
permissions:
contents: read
jobs:
# Training Data Project
training:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
java-version: '8'
- name: Training Data
run: |
cd training
mvn compile
mvn test
# Generate-Converter Project
gen-conv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
java-version: '8'
- name: Generate-Converter
run: |
cd genconvert
mvn compile
mvn test
# Check consistency between genconvert and compiled converters
genconvert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
java-version: '8'
- name: Consistency genconvert vs compiled
run: |
make transcompile
# There should not be any dirty files:
git update-index --refresh
git diff-index HEAD --exit-code
# CPP Client
cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cpp-check
run: |
sudo apt-get -y install cmake
cd clients/cpp
CXXFLAGS="-w" cmake CMakeLists.txt
make
make test
# Java Client
java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
java-version: '7'
- name: Java client test
run: |
cd clients/java
mvn compile
mvn test
# Ruby Client (minimum Ruby version)
ruby-min-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.0 # minimum supported version
- name: Run Rake tests
run: |
pushd clients/ruby
bundle install
rake test
popd
# Ruby Client (latest Ruby version with jruby)
ruby-latest-jruby:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: jruby-head
- name: Run Rake tests
run: |
pushd clients/ruby
gem install bundler
bundle install
rake test
popd
# PHP Client (minimum PHP version)
php-min-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP with min version
uses: shivammathur/setup-php@v2
with:
php-version: '7.0'
- uses: "ramsey/composer-install@v1"
- run: ./vendor/bin/phpunit --configuration clients/php/phpunit.xml
# PHP Client (latest PHP v7 version)
#
# Note: PHP v8+ not supported. Error output for v8:
#
# phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 -> your php version (8.0.5) does not satisfy that requirement.
# Root composer.json requires phpunit/phpunit ^6 -> satisfiable by phpunit/phpunit[6.0.0, ..., 6.5.14].
#
php-latest-v7-version:
name: PHP latest v 7.x version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP with the latest version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- uses: "ramsey/composer-install@v1"
- run: ./vendor/bin/phpunit --configuration clients/php/phpunit.xml
# JavaScript Client (latest Node version)
javascript-latest-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Javascript client test
run: |
cd clients/js
npm version
npm ci
npm run test
# JavaScript Client (lower npm version)
# Note: even older Node.js versions might be allowed, but the
# test tooling requires more recent versions.
javascript-older-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '6.x'
- name: Javascript client test
run: |
npm install -g [email protected]
cd clients/js
npm version
npm ci
npm run test
# Python Client
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Python client test
run: |
cd clients/python
python setup.py install
python -m unittest
# Go Client
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.13.1'
- run: go install github.com/go-bindata/go-bindata/...@latest
- run: cd clients/go && go generate && go test
# Swift Client on macOS
swift:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Configure XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.2.1'
- run: make client-swift-test
# Dart Client(Flutter)
dart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.5.3'
- name: Install dependencies
run: |
cd clients/dart
flutter pub get
- name: Run dart tests
run: |
cd clients/dart
flutter test
# C# Client on Ubuntu
C_Sharp_Ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0'
- name: Install dependencies
run: |
cd clients/c#
dotnet restore
- name: Run tests
run: |
cd clients/c#
dotnet test
# C# Client on Windows
C_Sharp_Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0'
- name: Install dependencies
run: |
cd clients/c#
dotnet restore
- name: Run tests
run: |
cd clients/c#
dotnet test