-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.47 KB
/
Linux-GCC.yml
File metadata and controls
48 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: 'Linux GCC'
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_BUILD_PREFIX: './build'
CMAKE_SOURCE_PREFIX: '.'
BUILD_TESTS: YES
BUILD_DOCS: NO
BUILD_EXAMPLES: NO
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cmake-version: ['3.16','3.17','3.18','3.19','3.20','3.21']
compiler: ['gcc9','gcc10']
include:
- { compiler: 'gcc9', icon: '🟨', cc: gcc-9, cxx: g++-9, name: 'GCC 9' }
- { compiler: 'gcc10', icon: '🟦', cc: gcc-10, cxx: g++-10, name: 'GCC 10' }
name: '${{ matrix.icon }}🧪 Test CMake ${{ matrix.cmake-version }} ${{ matrix.name }}'
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: '${{ matrix.icon }} Setup CMake'
uses: jwlawson/actions-setup-cmake@v2.1
with:
cmake-version: '${{ matrix.cmake-version }}.x'
github-api-token: ${{ secrets.GITHUB_TOKEN }}
- name: '🔧 Configure'
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
run: cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BUILD_PREFIX }} -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D BUILD_TESTS=${{ env.BUILD_TESTS }} -D BUILD_DOCS=${{ env.BUILD_DOCS }} -D BUILD_EXAMPLES=${{ env.BUILD_EXAMPLES }}
- name: '🧪 Run tests'
working-directory: ${{ env.CMAKE_BUILD_PREFIX }}
run: ctest -C ${{ env.CMAKE_BUILD_TYPE }} -VV --output-on-failure