File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed
Expand file tree Collapse file tree 1 file changed +72
-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, gcc]
19+ os : [ubuntu-latest, macos-latest]
20+ optimized : [true]
21+ exclude :
22+ - os : macos-latest
23+ compiler : gcc
24+ - os : ubuntu-latest
25+ compiler : gcc
26+ include :
27+ - compiler : clang
28+ CC : clang
29+ CXX : clang++
30+ - compiler : gcc
31+ CC : gcc
32+ CXX : g++
33+
34+ env :
35+ CMAKE_BUILD_DIR : ${{ github.workspace }}/build
36+ CMAKE_BUILD_TYPE : ${{ matrix.optimized && 'RelWithDebInfo'}}
37+ CC : ${{ matrix.CC }}
38+ CXX : ${{ matrix.CXX }}
39+ BINARY_SUFFIX : ${{ startsWith(matrix.os, 'windows') && '.exe' || '' }}
40+ BINARY_PATH : >-
41+ ${{ format(
42+ startsWith(matrix.os, 'windows') && '{0}\build\{1}\' || '{0}/build/',
43+ github.workspace,
44+ matrix.optimized && 'RelWithDebInfo' || 'Debug') }}
45+
46+ steps :
47+ - uses : actions/checkout@v2
48+ with :
49+ submodules : true
50+
51+ - name : Install dependencies on Linux
52+ if : ${{ runner.os == 'Linux' }}
53+ # libgoogle-perftools-dev is temporarily removed from the package list
54+ # because it is currently broken on GitHub's Ubuntu 22.04.
55+ run : |
56+ sudo apt-get update
57+ sudo apt-get install libkyotocabinet-dev libsnappy-dev libsqlite3-dev
58+
59+ - name : Generate build config
60+ run : >-
61+ cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}"
62+ -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
63+ -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/install_test/
64+
65+ - name : Build
66+ run : >-
67+ cmake --build "${{ env.CMAKE_BUILD_DIR }}"
68+ --config "${{ env.CMAKE_BUILD_TYPE }}"
69+
70+ - name : Run Tests
71+ working-directory : ${{ github.workspace }}/build
72+ run : ./db_test
You can’t perform that action at this time.
0 commit comments