Skip to content

[pre-commit.ci] pre-commit autoupdate #204

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #204

Workflow file for this run

name: 'Linux GCC'
on:
push:
branches:
- main
paths:
- '!docs/**'
- '!.github/workflows/**'
- '.github/workflows/Linux-GCC.yml'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { icon: '🟩', cc: gcc-9, cxx: g++-9, name: 'GCC 9' }
- { icon: 'πŸŸ₯', cc: gcc-10, cxx: g++-10, name: 'GCC 10' }
name: '🚧 ${{ matrix.icon }} ${{ matrix.name }}'
steps:
- name: '🧰 Add toolchains'
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get update
- name: '🧰 Checkout'
uses: actions/checkout@v3
- name: 'πŸ“₯ Load .env file'
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2
with:
path: .github/workflows
- name: '${{ matrix.icon }} Setup CMake'
uses: jwlawson/[email protected]
with:
cmake-version: '${{env.CMAKE_VERSION}}'
github-api-token: ${{ secrets.GITHUB_TOKEN }}
- name: '${{ matrix.icon }} Install ${{ matrix.cc }}'
run: sudo apt-get install ${{ matrix.cc }}
- name: '${{ matrix.icon }} Install packages'
if: ${{ env.INSTALL_PACKAGES != '' }}
run: sudo apt-get install ${{env.INSTALL_PACKAGES}}
- name: 'πŸ”§ Configure'
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
run: cmake -S . -B ${{ env.CMAKE_BUILD_PREFIX }} -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DBUILD_TESTS=${{ env.BUILD_TESTS }} -DBUILD_DOCS=${{ env.BUILD_DOCS }} -DBUILD_EXAMPLES=${{ env.BUILD_EXAMPLES }}
- name: 'βš™οΈ Build'
run: cmake --build ${{ env.CMAKE_BUILD_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel ${{ env.CMAKE_NUMBER_JOBS }}
- name: 'πŸ§ͺ Run tests'
working-directory: ${{ env.CMAKE_BUILD_PREFIX }}
run: ctest -C ${{ env.CMAKE_BUILD_TYPE }} --parallel ${{ env.CMAKE_NUMBER_JOBS_TESTS }} -VV --output-on-failure