Skip to content

Merge pull request #18 from alesapin/fix_build #160

Merge pull request #18 from alesapin/fix_build

Merge pull request #18 from alesapin/fix_build #160

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build and run unit tests
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'recursive'
lfs: true
- name: Install tools
run: sudo apt-get install build-essential cmake cmake-data clang-12 python3.8 python3.8-dev curl python3-distutils
- name: Install py tools
run: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.8 get-pip.py && sudo python3.8 -m pip install pytest
- name: Create build directoriy
run: mkdir build
- name: Cmake in build directory directory
run: cd build && cmake .. -DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_C_COMPILER=clang-12
- name: Build project
run: cd build && make -j8
- name: Run unit tests
run: cd build && ./xmorphy_unit_tests
- name: Copy SO
run: mv build/pyxmorphy.cpython-38-x86_64-linux-gnu.so tests/func
- name: Run morph funct tests
run: cd tests/func && python3.8 -m pytest -ss test_accuracy.py --corpus-file ../../data/corpuses/ud/syntagrus.test
- name: Run morphem split funct tests
run: cd tests/func && python3.8 -m pytest -ss test_morphem_accuracy.py --morphem-file ../../data/morphem/tikhonov20.test