aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/cmake.yml
blob: db2a242950da11f13b9a9ba56d264c5ba3f3a6af (plain) (blame)
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
name: CMake
on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]
env:
  BUILD_TYPE: Release
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        version: [15 ,16 ,17 ,18]
    steps:
    - uses: actions/checkout@v3
    - name: Get LLVM
      run: 
        - apt install -y wget cmake git lsb-release software-properties-common gpg 
        - wget https://apt.llvm.org/llvm.sh 
        - chmod +x llvm.sh 
        - sudo ./llvm.sh ${{matrix.version}}
        - sudo apt-get install -y clang-${{matrix.version}} llvm-${{matrix.version}}-dev libclang-common-${{matrix.version}}-dev libclang-${{matrix.version}}-dev 
        - git submodule init && git submodule update
    - name: Configure CMake
      run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=clang++-${{matrix.version}} -DLLVM_CONF=llvm-config-${{matrix.version}} -DUSE_MONOLITH_LIBTOOLING=ON
    - name: Build
      run: cmake --build ${{github.workspace}}/build
    - name: Test
      working-directory: ${{github.workspace}}/build
      run: ctest -C ${{env.BUILD_TYPE}}