|
| 1 | +name: CI |
| 2 | +on: [push, pull_request] |
| 3 | + |
| 4 | +jobs: |
| 5 | + # Here we're keeping on arbitrary LLVM version fixed and varying GCC. |
| 6 | + linux-gcc: |
| 7 | + strategy: |
| 8 | + fail-fast: false |
| 9 | + matrix: |
| 10 | + image: |
| 11 | + # List: https://github.com/conan-io/conan-docker-tools |
| 12 | + - gcc10 |
| 13 | + - gcc9 |
| 14 | + - gcc8 |
| 15 | + - gcc7 |
| 16 | + - gcc6 |
| 17 | + |
| 18 | + runs-on: ubuntu-latest |
| 19 | + container: |
| 20 | + image: conanio/${{matrix.image}} |
| 21 | + options: --user root |
| 22 | + |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v2 |
| 25 | + - name: Create Build Environment |
| 26 | + run: cmake -E make_directory build |
| 27 | + - name: Install libclang |
| 28 | + run: apt-get -qq update && apt-get install -y llvm clang libclang-dev |
| 29 | + - name: Install ninja |
| 30 | + run: type ninja || apt-get install -y ninja-build |
| 31 | + |
| 32 | + - name: Configure |
| 33 | + working-directory: build/ |
| 34 | + run: cmake -GNinja $GITHUB_WORKSPACE |
| 35 | + - name: Build |
| 36 | + working-directory: build/ |
| 37 | + run: cmake --build . |
| 38 | + - name: Test |
| 39 | + working-directory: build/ |
| 40 | + run: ctest --output-on-failure |
| 41 | + |
| 42 | + # Here we're varying the LLVM version and using its clang for compiling as well. |
| 43 | + linux-clang: |
| 44 | + strategy: |
| 45 | + fail-fast: false |
| 46 | + matrix: |
| 47 | + version: [7, 8, 9, 10] |
| 48 | + |
| 49 | + runs-on: ubuntu-latest |
| 50 | + container: |
| 51 | + # Just one of the newer images. |
| 52 | + image: conanio/gcc10 |
| 53 | + options: --user root |
| 54 | + |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v2 |
| 57 | + - name: Create Build Environment |
| 58 | + run: cmake -E make_directory build |
| 59 | + - name: Install libclang |
| 60 | + run: apt-get -qq update && apt-get install -y llvm-${{matrix.version}} clang-${{matrix.version}} libclang-${{matrix.version}}-dev |
| 61 | + - name: Install ninja |
| 62 | + run: type ninja || apt-get install -y ninja-build |
| 63 | + |
| 64 | + - name: Configure |
| 65 | + working-directory: build/ |
| 66 | + run: cmake -GNinja $GITHUB_WORKSPACE -DCMAKE_CXX_COMPILER=clang++-${{matrix.version}} |
| 67 | + - name: Build |
| 68 | + working-directory: build/ |
| 69 | + run: cmake --build . |
| 70 | + - name: Test |
| 71 | + working-directory: build/ |
| 72 | + run: ctest --output-on-failure |
| 73 | + |
| 74 | + macos: |
| 75 | + runs-on: macos-latest |
| 76 | + |
| 77 | + steps: |
| 78 | + - uses: actions/checkout@v2 |
| 79 | + - name: Create Build Environment |
| 80 | + run: cmake -E make_directory build |
| 81 | + - name: Install ninja |
| 82 | + run: brew install ninja |
| 83 | + |
| 84 | + - name: Configure |
| 85 | + working-directory: build/ |
| 86 | + run: cmake -GNinja $GITHUB_WORKSPACE -DLLVM_CONFIG_BINARY="/usr/local/opt/llvm/bin/llvm-config" |
| 87 | + - name: Build |
| 88 | + working-directory: build/ |
| 89 | + run: cmake --build . |
| 90 | + - name: Test |
| 91 | + working-directory: build/ |
| 92 | + run: ctest --output-on-failure |
| 93 | + |
| 94 | + |
0 commit comments