Skip to content

Merge pull request #81 from UUDigitalHumanitieslab/feature/calculate-… #78

Merge pull request #81 from UUDigitalHumanitieslab/feature/calculate-…

Merge pull request #81 from UUDigitalHumanitieslab/feature/calculate-… #78

Workflow file for this run

# 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