File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and test
2+ on :
3+ # Run for any commit in origin repository
4+ push :
5+ # And pull requests from forks
6+ pull_request :
7+ branches :
8+ # This avoids running the job twice for PRs from origin repository
9+ - ' **:**'
10+
11+ env :
12+ BUILD_TYPE : Release
13+
14+ jobs :
15+ build :
16+ runs-on : ${{ matrix.os }}
17+ strategy :
18+ matrix :
19+ os : [ubuntu-18.04, ubuntu-20.04]
20+
21+ steps :
22+ - name : Install dependencies
23+ run : |
24+ sudo apt install build-essential cmake git libboost-system-dev libboost-thread-dev
25+ git clone https://github.com/google/googletest.git
26+ cd googletest
27+ cmake CMakeLists.txt
28+ make
29+ sudo make install
30+
31+ - uses : actions/checkout@v2
32+
33+ - name : Configure CMake
34+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-Werror"
35+
36+ - name : Build
37+ run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
38+
39+ - name : Test
40+ working-directory : ${{github.workspace}}/build
41+ run : ctest -C ${{env.BUILD_TYPE}}
You can’t perform that action at this time.
0 commit comments