Skip to content

add text reference to example codes #50

add text reference to example codes

add text reference to example codes #50

name: Platform GNU/Linux
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- name: "Ubuntu Latest with GCC 12"
compiler: gcc
compiler_ver: 12
- name: "Ubuntu Latests with Clang 15"
compiler: clang
compiler_ver: 15
steps:
- name: Prepare specific Clang version
if: ${{ matrix.config.compiler == 'clang' }}
run: |
sudo apt install clang-${{ matrix.config.compiler_ver}}
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ matrix.config.compiler_ver}} 100
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ matrix.config.compiler_ver}} 100
- name: Prepare specific GCC version
if: ${{ matrix.config.compiler == 'gcc' }}
run: |
sudo apt install g++-${{ matrix.config.compiler_ver}}
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${{ matrix.config.compiler_ver}} 100
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${{ matrix.config.compiler_ver}} 100
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Configure
run: cmake -S . -B build
- name: Build
run: cmake --build build
- name: Run tests
run: |
cd build
ctest --rerun-failed --output-on-failure