Skip to content

Pin dependencies using single configuration file #84

Pin dependencies using single configuration file

Pin dependencies using single configuration file #84

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 ]
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
- name: Install libfolia
run: |
.github/workflows/cpp-prep-dep.sh libfolia https://github.com/LanguageMachines/libfolia
- name: Install uctodata
run: |
.github/workflows/cpp-prep-dep.sh uctodata https://github.com/LanguageMachines/uctodata
- name: Install ucto
run: |
.github/workflows/cpp-prep-dep.sh ucto https://github.com/LanguageMachines/ucto
- name: Install timbl
run: |
.github/workflows/cpp-prep-dep.sh timbl https://github.com/LanguageMachines/timbl
- name: Install mbt
run: |
.github/workflows/cpp-prep-dep.sh mbt https://github.com/LanguageMachines/mbt
- name: Install mbtserver
run: |
.github/workflows/cpp-prep-dep.sh mbtserver https://github.com/LanguageMachines/mbtserver
- name: Install frogdata
run: |
.github/workflows/cpp-prep-dep.sh frogdata https://github.com/LanguageMachines/frogdata
- name: Install frog
run: |
.github/workflows/cpp-prep-dep.sh frog https://github.com/LanguageMachines/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