Add clang in github CI #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_requuest: | |
branches: | |
- master | |
jobs: | |
check: | |
name: Build and test | |
runs-on: ubuntu-latest | |
container: archlinux:latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [gcc, clang] | |
include: | |
- compiler: gcc | |
cxx_compiler: g++ | |
- compiler: clang | |
cxx_compiler: clang++ | |
env: | |
CC: ${{ matrix.compiler }} | |
CXX: ${{ matrix.cxx_compiler }} | |
steps: | |
- name: Install dependencies | |
run: | | |
pacman -Syu --noconfirm base-devel clang cmake extra-cmake-modules xcb-util xcb-util-keysyms | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Init CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: c | |
- name: Configure | |
run: | | |
cmake -S . -B build | |
- name: Build | |
run: | | |
cmake --build build | |
- name: Test | |
run: | | |
ctest --test-dir build | |
- name: Install | |
run: | | |
cmake --install build | |
- name: CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |