2021-02-21 22:48:08 +01:00
|
|
|
name: ubuntu-latest-clang-ci
|
2021-01-06 03:00:24 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-01-21 02:05:05 +01:00
|
|
|
- feature/**
|
2021-02-21 10:21:50 +01:00
|
|
|
- improvement/**
|
|
|
|
- bugfix/**
|
2021-01-06 03:00:24 +01:00
|
|
|
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-01-21 02:05:05 +01:00
|
|
|
- feature/**
|
2021-02-21 10:21:50 +01:00
|
|
|
- improvement/**
|
|
|
|
- bugfix/**
|
2021-01-06 03:00:24 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
clang_tests:
|
|
|
|
if: >-
|
|
|
|
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
|
|
|
|
! contains(toJSON(github.event.commits.*.message), '[skip github]')
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-08-07 02:16:48 +02:00
|
|
|
# cmake clang12 is not able to compile a simple test program.
|
|
|
|
# /usr/bin/ld: cannot find -lunwind
|
2023-08-07 17:28:53 +02:00
|
|
|
version: ['latest', '15', '14', '13', '11', '10', '9', '8', '7']
|
2023-08-07 01:09:37 +02:00
|
|
|
type: [Release, Debug]
|
2021-01-06 03:00:24 +01:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-08-07 01:21:05 +02:00
|
|
|
name: "Clang ${{matrix.version}}: ${{matrix.type}}"
|
2021-01-06 03:00:24 +01:00
|
|
|
|
|
|
|
container:
|
2023-08-07 01:49:49 +02:00
|
|
|
image: silkeh/clang:${{matrix.version}}
|
2021-01-06 03:00:24 +01:00
|
|
|
options: -v /usr/local:/host_usr_local
|
|
|
|
|
2023-08-07 01:26:40 +02:00
|
|
|
env:
|
2023-08-07 01:49:49 +02:00
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
2023-08-07 01:26:40 +02:00
|
|
|
CXXFLAGS: -stdlib=libc++
|
|
|
|
|
2021-01-06 03:00:24 +01:00
|
|
|
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
|
2023-08-07 01:33:50 +02:00
|
|
|
run: cmake -S test -B build -DCMAKE_BUILD_TYPE=${{matrix.type}}
|
2021-01-06 03:00:24 +01:00
|
|
|
|
|
|
|
- name: Build
|
2023-08-07 01:09:37 +02:00
|
|
|
run: cmake --build build -j ${{steps.cores.outputs.count}}
|
2021-01-06 03:00:24 +01:00
|
|
|
|
|
|
|
- name: Run
|
|
|
|
working-directory: build
|
2023-08-07 01:09:37 +02:00
|
|
|
run: ctest --output-on-failure -j ${{steps.cores.outputs.count}}
|