From 91c33eca3ee57471fff3a204e4fbb0cb35c387c2 Mon Sep 17 00:00:00 2001 From: Dylam De La Torre Date: Sat, 20 May 2023 14:28:27 +0200 Subject: [PATCH] Add initial CI: Compilation pass --- .github/workflows/build-cppfront.yaml | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build-cppfront.yaml diff --git a/.github/workflows/build-cppfront.yaml b/.github/workflows/build-cppfront.yaml new file mode 100644 index 0000000000..bf2db6fd20 --- /dev/null +++ b/.github/workflows/build-cppfront.yaml @@ -0,0 +1,45 @@ +name: Multi-platform Build of cppfront +on: push +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 + 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-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 -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