-
Notifications
You must be signed in to change notification settings - Fork 141
114 lines (108 loc) · 3.28 KB
/
build.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: CI Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- preset: clang-sanitize
os: ubuntu-22.04
- preset: gcc-release
os: ubuntu-22.04
- preset: gcc-10-release
os: ubuntu-22.04
- preset: gcc-debug-shared
os: ubuntu-22.04
- preset: gcc-debug-noexcept
os: ubuntu-22.04
- preset: macos-release
os: macos-13
- preset: win64-release
os: windows-latest
- preset: win64-debug-shared
os: windows-latest
- preset: win64-debug-noexcept
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
if: matrix.os == 'ubuntu-22.04'
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get update
sudo apt-get install -y g++-12 g++-10 clang-16 clang-tidy-16
- uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
- uses: maxim-lobanov/setup-xcode@v1
if: matrix.os == 'macos-13'
with:
xcode-version: '14.3'
- name: Configure
run: cmake --preset ${{ matrix.preset }} -DSLANG_CI_BUILD=ON
- name: Build
run: cmake --build build/${{ matrix.preset }} -j8
- name: Run tests
run: ctest --test-dir build/${{ matrix.preset }} --output-on-failure --no-tests=error -j8
linux-coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y g++-12 lcov
- name: Configure
run: cmake --preset=ci-coverage
- name: Build
run: cmake --build build/ci-coverage -j8
- name: Run tests
run: ctest --test-dir build/ci-coverage --output-on-failure --no-tests=error -j8
- name: Process coverage info
run: cmake --build build/ci-coverage -t coverage
- name: Submit to codecov.io
uses: codecov/codecov-action@v3
with:
files: build/ci-coverage/coverage.info
verbose: true
bindings:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: cmake -B build -DSLANG_INCLUDE_PYLIB=ON
- name: Build
run: cmake --build build --config Release -j8
- name: Run tests
run: ctest --test-dir build --output-on-failure -C Release --no-tests=error -j8
conan:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
pip3 install conan
conan profile detect
- name: Configure
run: |
conan install . -b missing
cmake --preset conan-gcc-x86_64-release
- name: Build
run: cmake --build --preset conan-gcc-x86_64-release -j8
- name: Run tests
run: ctest --preset conan-gcc-x86_64-release --output-on-failure --no-tests=error -j8