ssp/.github/workflows/ubuntu-latest-clang.yml

68 lines
1.5 KiB
YAML
Raw Normal View History

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-06 23:41:44 +02:00
version:
['latest', '16', '15', '14', '13', '12', '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:09:37 +02:00
image: teeks99/clang-ubuntu:${{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:
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:09:37 +02:00
run: >-
cmake -DCMAKE_CXX_COMPILER=clang++ -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}}