-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (53 loc) · 1.53 KB
/
ubuntu-latest-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
67
68
69
name: ubuntu-latest-clang-ci
on:
workflow_dispatch:
push:
branches:
- master
- feature/**
- improvement/**
- bugfix/**
pull_request:
branches:
- master
- feature/**
- improvement/**
- bugfix/**
jobs:
clang_tests:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
strategy:
matrix:
# cmake clang12 is not able to compile a simple test program.
# /usr/bin/ld: cannot find -lunwind
version: ['latest', '15', '14', '13', '11', '10', '9', '8', '7']
type: [Release, Debug]
runs-on: ubuntu-latest
name: "Clang ${{matrix.version}}: ${{matrix.type}}"
container:
image: silkeh/clang:${{matrix.version}}
options: -v /usr/local:/host_usr_local
env:
CC: clang
CXX: clang++
CXXFLAGS: -stdlib=libc++
steps:
- uses: actions/checkout@v1
- uses: friendlyanon/fetch-core-count@v1
id: cores
- name: CMake
run: echo "/host_usr_local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
apt-get update
apt-get install -y git
script/ci_install_deps.sh
- name: Configure
run: cmake -S test -B build -DCMAKE_BUILD_TYPE=${{matrix.type}}
- name: Build
run: cmake --build build -j ${{steps.cores.outputs.count}}
- name: Run
working-directory: build
run: ctest --output-on-failure