File tree Expand file tree Collapse file tree 1 file changed +67
-0
lines changed
Expand file tree Collapse file tree 1 file changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ci
2+ on : [push, pull_request]
3+
4+ permissions :
5+ contents : read
6+
7+ jobs :
8+ build-and-test :
9+ name : >-
10+ CI
11+ ${{ matrix.os }}
12+ ${{ matrix.compiler }}
13+ ${{ matrix.optimized && 'release' }}
14+ runs-on : ${{ matrix.os }}
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ compiler : [clang]
19+ os : [ubuntu-latest, macos-latest]
20+ optimized : [true]
21+ include :
22+ - compiler : clang
23+ CC : clang
24+ CXX : clang++
25+ - compiler : gcc
26+ CC : gcc
27+ CXX : g++
28+
29+ env :
30+ CMAKE_BUILD_DIR : ${{ github.workspace }}/build
31+ CMAKE_BUILD_TYPE : ${{ matrix.optimized && 'RelWithDebInfo'}}
32+ CC : ${{ matrix.CC }}
33+ CXX : ${{ matrix.CXX }}
34+ BINARY_SUFFIX : ${{ startsWith(matrix.os, 'windows') && '.exe' || '' }}
35+ BINARY_PATH : >-
36+ ${{ format(
37+ startsWith(matrix.os, 'windows') && '{0}\build\{1}\' || '{0}/build/',
38+ github.workspace,
39+ matrix.optimized && 'RelWithDebInfo' || 'Debug') }}
40+
41+ steps :
42+ - uses : actions/checkout@v2
43+ with :
44+ submodules : true
45+
46+ - name : Install dependencies on Linux
47+ if : ${{ runner.os == 'Linux' }}
48+ # libgoogle-perftools-dev is temporarily removed from the package list
49+ # because it is currently broken on GitHub's Ubuntu 22.04.
50+ run : |
51+ sudo apt-get update
52+ sudo apt-get install libkyotocabinet-dev libsnappy-dev libsqlite3-dev
53+
54+ - name : Generate build config
55+ run : >-
56+ cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}"
57+ -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
58+ -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/install_test/
59+
60+ - name : Build
61+ run : >-
62+ cmake --build "${{ env.CMAKE_BUILD_DIR }}"
63+ --config "${{ env.CMAKE_BUILD_TYPE }}"
64+
65+ - name : Run Tests
66+ working-directory : ${{ github.workspace }}/build
67+ run : ./db_test
You can’t perform that action at this time.
0 commit comments