-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (54 loc) · 2.32 KB
/
Linux-Clang.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: 'Linux Clang'
on:
push:
branches:
- main
paths:
- '!docs/**'
- '!.github/workflows/**'
- '.github/workflows/Linux-Clang.yml'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
#- { icon: '🟨', cc: clang-6.0, cxx: clang++-6.0, name: 'Clang 6' }
- { icon: '🟦', cc: clang-7, cxx: clang++-7, name: 'Clang 7' }
- { icon: '🟩', cc: clang-8, cxx: clang++-8, name: 'Clang 8' }
- { icon: '🟥', cc: clang-9, cxx: clang++-9, name: 'Clang 9' }
- { icon: '🟧', cc: clang-10, cxx: clang++-10, name: 'Clang 10' }
- { icon: '🟪', cc: clang-11, cxx: clang++-11, name: 'Clang 11' }
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