Skip to content

Commit b918f0f

Browse files
committed
Add initial CI: Compilation pass
1 parent ebe5ebc commit b918f0f

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build-cppfront.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Multi-platform Build of cppfront
2+
on: push
3+
jobs:
4+
build-windows:
5+
runs-on: windows-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: ilammy/msvc-dev-cmd@v1
9+
- name: Compiler name & version
10+
run: cl.exe
11+
- name: Build
12+
run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -experimental:module -W4
13+
build-unix-like:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
runs-on: [ubuntu-latest]
18+
compiler: [g++-10, g++-11, g++-12, clang++-12, clang++-14]
19+
cxx-std: ['c++20', 'c++2b']
20+
exclude:
21+
# GCC 10 doesn't have support for c++23
22+
- compiler: g++-10
23+
cxx-std: 'c++2b'
24+
# Clang 12 and 16 do not compile on 'c++2b' due to llvm/llvm-project#58206
25+
- compiler: clang++-12
26+
cxx-std: 'c++2b'
27+
- compiler: clang++-14
28+
cxx-std: 'c++2b'
29+
include:
30+
- runs-on: macos-latest
31+
compiler: clang++
32+
cxx-std: 'c++20'
33+
runs-on: ${{ matrix.runs-on }}
34+
env:
35+
CXX: ${{ matrix.compiler }}
36+
CXXFLAGS: -std=${{ matrix.cxx-std }} -Wall -Wextra -Wold-style-cast -pthread
37+
steps:
38+
- uses: actions/checkout@v3
39+
- name: Install compiler
40+
if: startsWith(matrix.runs-on, 'ubuntu')
41+
run: sudo apt-get install -y $CXX
42+
- name: Compiler name & version
43+
run: $CXX --version
44+
- name: Build
45+
run: $CXX source/cppfront.cpp $CXXFLAGS -o cppfront

0 commit comments

Comments
 (0)