-
Notifications
You must be signed in to change notification settings - Fork 42
57 lines (50 loc) · 1.78 KB
/
keyvi.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
# Build on Linux
name: Build keyvi
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ${{matrix.os}}
name: ${{ matrix.type }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
type: ['Release', 'Debug']
os: ['macos-latest', 'ubuntu-22.04']
steps:
- name: install Linux deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libsnappy-dev libzzip-dev zlib1g-dev libboost-all-dev clang-tidy
- name: install macOS deps
if: runner.os == 'macOS'
run: |
brew update
# workaround for https://github.com/actions/setup-python/issues/577
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
brew install zlib snappy boost
- name: checkout from git
uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.type }}
- name: build with cmake
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
cmakeAppendedArgs: '-DCMAKE_BUILD_TYPE=${{ matrix.type }} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache'
buildWithCMake: true
buildDirectory: '${{ github.workspace }}/build'
- name: Unit tests
id: unit_tests
run: |
build/unit_test_all