summaryrefslogtreecommitdiff
path: root/.github/workflows/libclc-tests.yml
blob: 3440dd38952f922ec7bac2f931e205aae6989941 (plain)
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
name: libclc Tests

on:
  push:
    branches:
      - 'release/**'
    paths:
      - 'clang/**'
      - 'llvm/**'
      - 'libclc/**'
      - '.github/workflows/libclc-tests.yml'
  pull_request:
    paths:
      - 'clang/**'
      - 'llvm/**'
      - 'libclc/**'
      - '.github/workflows/libclc-tests.yml'

jobs:
  build_libclc:
    name: libclc test 
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          # Disable build on windows, because I can't figure out where llvm-config is.
          #- windows-latest
          - macOS-latest
    steps:
    - name: Setup Windows
      if: startsWith(matrix.os, 'windows')
      uses: llvm/actions/setup-windows@master
      with:
        arch: amd64
    - name: Install Ninja
      uses: llvm/actions/install-ninja@master
    - uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - name: Build clang
      uses: llvm/actions/build-test-llvm-project@master
      with:
        cmake_args: -G Ninja  -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
        build_target: ""
    - name: Build and test libclc
      run: |
        mkdir libclc-build
        cd libclc-build
        cmake -G Ninja ../libclc -DLLVM_CONFIG=../build/bin/llvm-config
        ninja
        ninja test