|
| 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, 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 | + # Unversioned clang++ doesn't run on ubuntu |
| 22 | + - runs-on: ubuntu-latest |
| 23 | + compiler: clang++ |
| 24 | + # Don't run versioned g++ and clang++ on macos |
| 25 | + - runs-on: macos-latest |
| 26 | + compiler: g++-10 |
| 27 | + - runs-on: macos-latest |
| 28 | + compiler: g++-11 |
| 29 | + - runs-on: macos-latest |
| 30 | + compiler: g++-12 |
| 31 | + - runs-on: macos-latest |
| 32 | + compiler: clang++-12 |
| 33 | + - runs-on: macos-latest |
| 34 | + compiler: clang++-14 |
| 35 | + # Older compilers don't support newer std variants |
| 36 | + - compiler: g++-10 |
| 37 | + cxx-std: c++23 |
| 38 | + - compiler: clang++-12 |
| 39 | + cxx-std: c++23 |
| 40 | + - compiler: clang++-14 |
| 41 | + cxx-std: c++23 |
| 42 | + - compiler: clang++ |
| 43 | + cxx-std: c++23 |
| 44 | + runs-on: ${{ matrix.runs-on }} |
| 45 | + env: |
| 46 | + CXX: ${{ matrix.compiler }} |
| 47 | + CXXFLAGS: -std=${{ matrix.cxx-std }} -Wall -Wextra -Wold-style-cast -pthread |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v3 |
| 50 | + - name: Install compiler |
| 51 | + if: startsWith(matrix.runs-on, 'ubuntu') |
| 52 | + run: sudo apt-get install -y ${{ matrix.compiler }} |
| 53 | + - name: Compiler name & version |
| 54 | + run: $CXX --version |
| 55 | + - name: Build |
| 56 | + run: $CXX source/cppfront.cpp $CXXFLAGS -o cppfront |
0 commit comments