forked from hsutter/cppfront
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.62 KB
/
build-cppfront.yaml
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
name: Multi-platform Build of cppfront
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Compiler name & version
run: cl.exe
- name: Build
run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -experimental:module -W4 -WX
build-unix-like:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
compiler: [g++-10, g++-11, g++-12, clang++-12, clang++-14]
cxx-std: ['c++20', 'c++2b']
exclude:
# GCC 10 doesn't have support for c++23
- compiler: g++-10
cxx-std: 'c++2b'
# Clang 12 and 14 do not compile on 'c++2b' due to llvm/llvm-project#58206
- compiler: clang++-12
cxx-std: 'c++2b'
- compiler: clang++-14
cxx-std: 'c++2b'
include:
- runs-on: macos-11
compiler: clang++
cxx-std: 'c++20'
- runs-on: macos-latest
compiler: clang++
cxx-std: 'c++20'
runs-on: ${{ matrix.runs-on }}
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -std=${{ matrix.cxx-std }} -Wall -Wextra -Wold-style-cast -Wunused-parameter -Wpedantic -Werror -pthread
steps:
- uses: actions/checkout@v3
- name: Install compiler
if: startsWith(matrix.runs-on, 'ubuntu')
run: sudo apt-get install -y $CXX
- name: Compiler name & version
run: $CXX --version
- name: Build
run: $CXX source/cppfront.cpp $CXXFLAGS -o cppfront