Skip to content

Commit c850ad7

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

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: cppfront CI
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-20.04, ubuntu-22.04, macos-latest]
18+
compiler: [g++-10, g++-11, g++-12, clang++-12, clang++-14, clang++]
19+
cxx-std: ['c++20', 'c++23']
20+
exclude:
21+
# New compilers don't run on ubuntu 20.04
22+
- runs-on: ubuntu-20.04
23+
compiler: g++-12
24+
- runs-on: ubuntu-20.04
25+
compiler: clang++-14
26+
# Don't duplicate old compilers on ubuntu 22.04
27+
- runs-on: ubuntu-22.04
28+
compiler: g++-10
29+
- runs-on: ubuntu-22.04
30+
compiler: g++-11
31+
- runs-on: ubuntu-22.04
32+
compiler: clang++-12
33+
# Unversioned clang++ doesn't run on ubuntu
34+
- runs-on: ubuntu-20.04
35+
compiler: clang++
36+
- runs-on: ubuntu-22.04
37+
compiler: clang++
38+
# Don't run versioned g++ and clang++ on macos
39+
- runs-on: macos-latest
40+
compiler: g++-10
41+
- runs-on: macos-latest
42+
compiler: g++-11
43+
- runs-on: macos-latest
44+
compiler: g++-12
45+
- runs-on: macos-latest
46+
compiler: clang++-12
47+
- runs-on: macos-latest
48+
compiler: clang++-14
49+
# Older compilers don't support newer std variants
50+
- compiler: g++-10
51+
cxx-std: c++23
52+
- compiler: clang++-12
53+
cxx-std: c++23
54+
- compiler: clang++-14
55+
cxx-std: c++23
56+
- compiler: clang++
57+
cxx-std: c++23
58+
runs-on: ${{ matrix.runs-on }}
59+
env:
60+
CXX: ${{ matrix.compiler }}
61+
CXXFLAGS: -std=${{ matrix.cxx-std }} -Wall -Wextra -Wold-style-cast -pthread
62+
steps:
63+
- uses: actions/checkout@v3
64+
- name: Install compiler
65+
if: startsWith(matrix.runs-on, 'ubuntu')
66+
run: sudo apt-get install -y ${{ matrix.compiler }}
67+
- name: Compiler name & version
68+
run: $CXX --version
69+
- name: Build
70+
run: $CXX source/cppfront.cpp $CXXFLAGS -o cppfront

0 commit comments

Comments
 (0)