-
Notifications
You must be signed in to change notification settings - Fork 20
49 lines (44 loc) · 1.46 KB
/
main.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
# Seeded from https://github.com/lukka/CppCMakeVcpkgTemplate
# Thank you Lucas Beyer for the template!
name: CI
env:
BUILD_TYPE: Debug Release
on: [push, pull_request, workflow_dispatch]
jobs:
job:
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.config }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
config: [Debug, Release]
include:
# - os: ubuntu-latest
# compiler: g++-12
- os: ubuntu-latest
compiler: clang++-18
pre_configure: dev/ci-pre-configure-clang 18
- os: macos-latest
compiler: c++
- os: windows-latest
compiler: cl
cmake_generator: -G "NMake Makefiles"
steps:
# - name: List compilers
# run: |
# apt list --installed | grep clang
# apt list --installed | grep g++
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1.4.1
if: matrix.os == 'windows-latest'
- name: Configure
run: |
${{ matrix.pre_configure }}
cmake -S . -B __build__ ${{ matrix.cmake_generator }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.config }}
- name: Build
run: |
cmake --build __build__
- name: Test
run: |
cmake --build __build__ --config ${{ matrix.config }} --target all -j 16 --