-
Notifications
You must be signed in to change notification settings - Fork 3
330 lines (300 loc) · 9.37 KB
/
Copy pathci.yaml
File metadata and controls
330 lines (300 loc) · 9.37 KB
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
name: CI (Test/Build/Release)
on:
- push
- pull_request
env:
GO111MODULE: on
jobs:
test:
name: "Tests: Go ${{ matrix.go }}/Dart ${{ matrix.dart }}/Node ${{ matrix.node }}/PHP ${{ matrix.php }} on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
go:
- '1.19'
- '1.18'
- '1.17'
dart:
- stable
node:
- 18
- 16
php:
- '8.2'
- '8.1'
- '8.0'
- '7.4'
include:
- os: ubuntu-latest
ext: so
- os: windows-latest
ext: dll
- os: macos-latest
ext: dylib
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart }}
- name: Setup Node
if: ${{ matrix.go == '1.19' }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
id: php
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: ffi
env:
update: true
- name: Local Dependencies
if: ${{ matrix.os == 'ubuntu-latest' && github.actor == 'nektos/act' }}
run: |
apt-get update
apt-get install -y wget
- name: Run Go tests (Not Windows)
if: ${{ matrix.os != 'windows-latest' }}
run: ./tests/go.sh
- name: Run Go tests (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: pwsh ./tests/go.ps1
- name: Upload Code Coverage
uses: codecov/codecov-action@v3
with:
files: coverage.txt
- name: Test building libcalends
run: go build -v -o libcalends.${{ matrix.ext }} -buildmode=c-shared ./libcalends
- name: Test building cli
run: go build -v -o calends.out ./cli
- name: Test building WASM
if: ${{ matrix.go == '1.19' }}
run: go build -v -o calends.wasm ./wasm
env:
GOOS: js
GOARCH: wasm
- name: Test Dart wrapper
run: |
cp libcalends.${{ matrix.ext }} libcalends/dart/
cd libcalends/dart
dart pub get
dart test
- name: Test WASM via JS wrapper
if: ${{ matrix.go == '1.19' }}
run: |
cp calends.wasm wasm/js/
cd wasm/js
npm ci
npm test
- name: Test PHP wrapper (Not Windows)
if: ${{ matrix.os != 'windows-latest' }}
run: ./tests/php.sh ${{ steps.php.outputs.php-version }} ${{ matrix.ext }}
- name: Test PHP wrapper (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: pwsh ./tests/php.ps1 ${{ steps.php.outputs.php-version }} ${{ matrix.ext }}
crowdin:
name: Crowdin Upload
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Dependencies
run: |
pip install git+https://github.com/danhunsaker/sphinxcontrib-golangdomain
pip install -r doc-requirements.txt
- name: Generate POT files
uses: rickstaa/sphinx-action@master
with:
docs-folder: docs/
build-command: make gettext
- name: Crowdin push
uses: crowdin/github-action@1.5.3
with:
upload_sources: true
upload_translations: false
download_translations: false
crowdin_branch_name: "${{ env.BRANCH_NAME }}"
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
docs:
name: ReadTheDocs (${{ matrix.name }})
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Afrikaans
lang: af
hook: 224946
token: d3d2dbb65771af8d4a39a7eafc2ffce89f848ade
- name: Arabic
lang: ar
hook: 224973
token: b0d5553e88443377803ad98618bd9adcabf4822b
- name: Catalan
lang: ca
hook: 224974
token: db2e5eeeaf2a505e45858ff91ed86f35b46596b6
- name: Czech
lang: cs
hook: 224975
token: 4968253fc5f36f5940e3c7ab1ff7e645991e10b4
- name: Danish
lang: da
hook: 224976
token: c3b2a2143d3ca69085a285f222c21a09f2112904
- name: German
lang: de
hook: 224977
token: 71851b8d81f9553ae4ebf8275c36448eb2e91143
- name: Greek
lang: el
hook: 224978
token: 43e58abd218482a8492561e3e7cde445fff50336
- name: English
lang: en
hook: 224947
token: e6d4a1348dad83eb5de70f2aef80a51b29914215
- name: Esperanto
lang: eo
hook: 224979
token: 08645d5491ff05c34f1d7e1f6bf59a5e61f3ab58
- name: Spanish
lang: es-es
hook: 224980
token: f69138b226b468667d2884e8ffedb7f1665024e4
- name: Finnish
lang: fi
hook: 224981
token: 7d40d6860a487dfa1a636846f6078c3fc59fc779
- name: French
lang: fr
hook: 224982
token: 50ea1390537bcd87281c7f792bfe53c38ece67bc
- name: Hebrew
lang: he
hook: 224983
token: ac84930cd7c1dc43851f5eec4246149768fa71b9
- name: Hungarian
lang: hu
hook: 224984
token: f64dbd64dc3da63a5f62bec842a5e01ad8248459
- name: Italian
lang: it
hook: 224985
token: 3bde77cf951749c9d5c25ef3b293057edaba98a2
- name: Japanese
lang: ja
hook: 224986
token: 55cb74c901191cb4a56426546edfcae9ac90baba
- name: Korean
lang: ko
hook: 224987
token: f2ee967dbfee2113463b4b7f662773fe288cde19
- name: Dutch
lang: nl
hook: 224988
token: 692ec3247e77f7102a254e470d6fca90190838f8
- name: Norwegian
lang: no
hook: 224989
token: c48fe9d8ba9b62a9e003d82bd550cfb0e8c27a12
- name: Polish
lang: pl
hook: 224990
token: 50e6f1e43bdd304e3c101d6fcbc966e56699915a
- name: Brazillian Portugese
lang: pt-br
hook: 224991
token: 0220074eb659d95c53224e4ffa3a0fce9b5f1d1b
- name: Portugese
lang: pt-pt
hook: 224992
token: df0e2f8d2df66a7e70ed89c21b2a36b533e09e79
- name: Romanian
lang: ro
hook: 224993
token: 15251fc5cf71158b5dac922096bd099be83c2a9f
- name: Russian
lang: ru
hook: 224994
token: ecd28ff93e1c2135da438f9c5ac12bde79c5126d
- name: Serbian
lang: sr
hook: 224995
token: 16c7290e51dfc2da7f18990f1a47d211f57b71a0
- name: Swedish
lang: sv-se
hook: 224996
token: 2b32924a03ba786b4710b3d061b4b36f0c29e23d
- name: Turkish
lang: tr
hook: 224997
token: 33e48cdbc940f554624ee365aa091972c33bc4c3
- name: Ukranian
lang: uk
hook: 224998
token: 946b993325eac9958f18e58146113c6d7578d69e
- name: Vietnamese
lang: vi
hook: 224999
token: 00d5a6278c3751e8aae00593271e0a79b1eb4e69
- name: Simplified Chinese
lang: zh-cn
hook: 225000
token: 519ed25b72abbacb7d86e3e31c34912530fcf945
- name: Traditional Chinese
lang: zh-tw
hook: 225001
token: ca662692070dee46b99175637045ec692f391bf6
steps:
- name: Invoke deployment hook (en)
if: matrix.lang == 'en'
run: |
curl -X POST -d "branches=${{ github.head_ref || github.ref_name }}" -d "token=${{ matrix.token }}" https://readthedocs.org/api/v2/webhook/calends/${{ matrix.hook }}/
- name: Invoke deployment hook (${{ matrix.lang }})
if: matrix.lang != 'en'
run: |
curl -X POST -d "branches=${{ github.head_ref || github.ref_name }}" -d "token=${{ matrix.token }}" https://readthedocs.org/api/v2/webhook/calends-${{ matrix.lang }}/${{ matrix.hook }}/
build:
name: Build Binaries
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Build binaries
run: ./build-all
- name: Upload binaries as assets
uses: actions/upload-artifact@v3
with:
name: builds
path: dist/*
- name: Release binaries
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
dist/*
dist/bin/*