-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (34 loc) · 1.66 KB
/
cmake.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
name: CMake
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
build: [Release, Debug]
steps:
- uses: actions/checkout@v3
- name: Install dependencies (distribution provided)
run: sudo apt-get update && sudo apt install libicu-dev libboost-all-dev
- name: Install dependencies (google-test tricky install) # See https://stackoverflow.com/questions/24295876/cmake-cannot-find-googletest-required-library-in-ubuntu
run: sudo apt install libgtest-dev build-essential cmake && cd /usr/src/googletest && sudo cmake . && sudo cmake --build . --target install
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Install dependencies (OpenNMT Tokenizer)
working-directory: ${{runner.workspace}}/build
run: git clone --recursive --branch v1.20.0 --depth 1 https://github.com/OpenNMT/Tokenizer && cd Tokenizer && git submodule update --init && mkdir build && cd build && cmake -DLIB_ONLY=ON -DCMAKE_BUILD_TYPE=${{ matrix.build }} .. && sudo make install
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
- name: Build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config ${{ matrix.build }}
- name: Building test indexes
shell: bash
run: |
./cli/src/FuzzyMatch-cli -c test/data/tm1,test/data/tm1 --add-target 1
./cli/src/FuzzyMatch-cli -c test/data/tm2.en.gz,test/data/tm2.fr.gz --add-target
- name: Test
shell: bash
run: ./test/FuzzyMatch-test test/data/