gitbak #348
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ubuntu_x86_gcc | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# ubuntu 20 doesnt support c++20 | |
os: [ubuntu-22.04] | |
version: [ 11, 12 ] | |
build_type: [Release, Debug] | |
name: Build & test on ${{ matrix.os }} with gcc ${{ matrix.version }} in ${{ matrix.build_type }} mode. | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Software | |
run: | | |
sudo apt-get install -y libtbb-dev g++-${{matrix.version}} | |
- name: Install Google Benchmark | |
run: git clone --depth=1 --single-branch --branch v1.7.1 https://github.com/google/benchmark.git benchmark && mkdir -p benchmark/build && cd ./benchmark/build && cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=OFF ../ && make -j | |
- name: Install gtest | |
run: | |
sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake CMakeLists.txt && sudo make && sudo cp lib/libgtest.a /usr/lib && sudo cp lib/libgtest_main.a /usr/lib && sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a && sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a | |
- name: Configure CMake | |
env: | |
CXX: g++-${{ matrix.version }} | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=g++-${{matrix.version}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C Debug -V |