-
-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (71 loc) · 2.06 KB
/
test-builds.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
name: Build
on:
pull_request:
branches: [main]
push:
tags: ['*']
env:
LIBICU: libicu70
jobs:
build-c:
strategy:
matrix:
BUILD_TYPE: [Debug, Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ICU
run: |
# sudo apt-get update -y
sudo apt-get install -y libicu-dev ${{env.LIBICU}}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.BUILD_TYPE}}
build-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test
run: npm test
- name: Install
run: |
npm install --global
- name: Test CLI
run: |
sh -c '[ "$(npm exec -- uklatn -t DSTU_9112_B мрії мої)" = "mriji moji" ]'
- name: Test CLI pipe
run: |
sh -c '[ "$(echo мрії мої | npm exec -- uklatn -t DSTU_9112_B -f -)" = "mriji moji" ]'
build-py:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test
working-directory: ${{github.workspace}}/python
run: make test
- name: Test CLI
working-directory: ${{github.workspace}}/python
run: |
sh -c '[ "$(python uklatn.py -t DSTU_9112_B мрії мої)" = "mriji moji" ]'
- name: Test CLI pipe
working-directory: ${{github.workspace}}/python
run: |
sh -c '[ "$(echo мрії мої | python uklatn.py -t DSTU_9112_B -f -)" = "mriji moji" ]'
build-swift:
strategy:
matrix:
BUILD_TYPE: [debug, release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ICU
run: |
sudo apt-get install -y libicu-dev ${{env.LIBICU}}
- name: Build
run: swift build -c ${{matrix.BUILD_TYPE}}
- name: Test
run: swift test -c ${{matrix.BUILD_TYPE}}