-
Notifications
You must be signed in to change notification settings - Fork 6
163 lines (155 loc) · 5.93 KB
/
cpp.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
# This workflow will install C++ dependencies, run tests and lint with a variety of C++ versions
name: Compile C++
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
os: [ linux ]
compiler:
- {
compiler: GNU,
CC: gcc,
CXX: g++,
GCOV: gcov,
SCAN: echo
}
- {
compiler: LLVM,
CC: clang,
CXX: clang++,
SCAN: scan-build,
OPENMPFLAG: --disable-openmp
}
dependencies: [ pinned ] # TODO: latest is known to fail //, latest ]
include:
# - dependencies: latest
# alpino: Alpino-x86_64-Linux-glibc-2.17-git819-sicstus
# versions known to works
- dependencies: pinned
# removed for speed, using pre-parsed trees only
# alpino: Alpino-x86_64-Linux-glibc-2.17-git819-sicstus
ticcutils: ecb62eb116ffc3677626c53f012f34e00854e4c4 # 0.33 2023-04-29
libfolia: 1a3f462f8f048df60889817325701130b6271e8a # 2.15 2023-05-01
uctodata: a8be6cf7512998f4c8963d1021f402b8b1290085 # 0.9.1 2022-10-04
ucto: d22029833b264a969351ead0ee3ab9b3f97db97d # 0.30 2023-04-29
timbl: 61929ce6dc7d7077cb5eeceafef86de38eb40daa # 6.9 2023-04-29
mbt: fd7cb7ebdd52bef2794f16f329569bedad3143e9 # 3.10 2023-04-29
mbtserver: a6f04f30f62965c8660ee92be99d4eb86fc4bf65 # 0.17 2023-04-30
frogdata: 99de9597105c2304faeb797264231ba180fcdb20 # 0.22 2023-03-07
frog: 991f6977cfd81b9a6538db0c6de3d26908ec16b7 # 0.29 2023-05-03
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
GCOV: ${{ matrix.compiler.GCOV }}
OPENMPFLAG: ${{ matrix.compiler.OPENMPFLAG }}
steps:
- uses: actions/checkout@v2
- name: Show compiler versions
run: |
$CC --version
$CXX --version
- name: Install clang-tools
if: ${{ matrix.compiler.compiler == 'LLVM' }}
run: sudo apt install clang-tools
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y pkg-config autoconf-archive autotools-dev ccache \
cppcheck libicu-dev libxml2-dev libbz2-dev \
zlib1g-dev libtar-dev expect libexttextcat-dev
- name: Cache T-Scan dependencies
id: cache-tscan-dependencies
uses: actions/cache@v3
env:
cache-name: cache-tscan-dependencies
with:
path: |
~/.tscan-deps
data
key: ${{ runner.os }}-build-${{ matrix.compiler.compiler }}-${{ matrix.dependencies }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.compiler.compiler }}-${{ matrix.dependencies }}-${{ github.sha }}
${{ runner.os }}-build-${{ matrix.compiler.compiler }}-${{ matrix.dependencies }}-
${{ runner.os }}-build-${{ matrix.compiler.compiler }}-
- name: List the state of T-scan dependencies
continue-on-error: true
run: |
mkdir -p ~/.tscan-deps
ls -la ~/.tscan-deps
# - name: Install Alpino
# env:
# ALPINO_VERSION: ${{ matrix.alpino }}
# run: |
# .github/workflows/cpp-prep-alpino.sh $ALPINO_VERSION
- name: Install ticcutils
run: |
.github/workflows/cpp-prep-dep.sh ticcutils https://github.com/LanguageMachines/ticcutils "${{ matrix.ticcutils }}"
- name: Install libfolia
run: |
.github/workflows/cpp-prep-dep.sh libfolia https://github.com/LanguageMachines/libfolia "${{ matrix.libfolia }}"
- name: Install uctodata
run: |
.github/workflows/cpp-prep-dep.sh uctodata https://github.com/LanguageMachines/uctodata "${{ matrix.uctodata }}"
- name: Install ucto
run: |
.github/workflows/cpp-prep-dep.sh ucto https://github.com/LanguageMachines/ucto "${{ matrix.ucto }}"
- name: Install timbl
run: |
.github/workflows/cpp-prep-dep.sh timbl https://github.com/LanguageMachines/timbl "${{ matrix.timbl }}"
- name: Install mbt
run: |
.github/workflows/cpp-prep-dep.sh mbt https://github.com/LanguageMachines/mbt "${{ matrix.mbt }}"
- name: Install mbtserver
run: |
.github/workflows/cpp-prep-dep.sh mbtserver https://github.com/LanguageMachines/mbtserver "${{ matrix.mbtserver }}"
- name: Install frogdata
run: |
.github/workflows/cpp-prep-dep.sh frogdata https://github.com/LanguageMachines/frogdata "${{ matrix.frogdata }}"
- name: Install frog
run: |
.github/workflows/cpp-prep-dep.sh frog https://github.com/LanguageMachines/frog "${{ matrix.frog }}"
- name: Install
run: |
bash bootstrap.sh
./configure $OPENMPFLAG
cat config.h
cppcheck -I include --enable=all --quiet --error-exitcode=0 --suppressions-list=cppcheck-suppressions-list.txt .
${{ matrix.compiler.SCAN }} --status-bugs make
make
sudo make install
- name: Start services
run: |
# export ALPINO_HOME=~/.tscan-deps/Alpino
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LOGDIR=/tmp
cd webservice
# ls -la ~/.tscan-deps/Alpino
# ./startalpino.sh &
./startfrog.sh &
- name: Services up?
run: |
# .github/workflows/cpp-check-service.sh 7003
.github/workflows/cpp-check-service.sh 7001
sleep 1
- name: Run unit tests
run: |
make check
# - name: Clear extracted Alpino files
# run: |
# rm -rf ~/.tscan-deps/Alpino
- name: Debug information
if: ${{ !success() }}
run: |
cat config.h
[ -f src/test-suite.log ] && cat src/test-suite.log
[ -f src/test.sh.log ] && cat src/test.sh.log
tests/logdiffs.sh
echo "*** FROG LOG ***"
cat /tmp/frog-tscan.log