|
1 | | -name: Build and test llvm |
| 1 | +name: CI |
2 | 2 |
|
3 | | -on: [push] |
| 3 | +on: |
| 4 | + push: |
| 5 | + types: |
4 | 6 |
|
5 | 7 | jobs: |
6 | | - build: |
7 | | - |
| 8 | + build_llvm: |
8 | 9 | runs-on: ${{ matrix.os }} |
9 | 10 | strategy: |
| 11 | + fail-fast: false |
10 | 12 | matrix: |
11 | | - os: [ubuntu-latest, windows-latest] |
12 | | - |
| 13 | + os: |
| 14 | + - ubuntu-latest |
| 15 | + - windows-latest |
| 16 | + - macOS-latest |
| 17 | + cmake_args: |
| 18 | + - "" |
13 | 19 | steps: |
| 20 | + - name: Setup Windows |
| 21 | + if: startsWith(matrix.os, 'windows') |
| 22 | + uses: tstellar/actions/setup-windows@master |
| 23 | + with: |
| 24 | + arch: amd64 |
14 | 25 | - uses: actions/checkout@v1 |
15 | | - - name: create build dir |
16 | | - run: mkdir _build |
17 | | - - name: ubuntu configure |
18 | | - run: cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_TOOLS=OFF -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_WARNINGS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF |
19 | | - working-directory: _build |
20 | | - if: startswith(matrix.os, 'ubuntu') |
21 | | - - name: windows configure |
22 | | - run: cmake ../llvm -Thost=x64 -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_TOOLS=OFF -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_WARNINGS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF |
23 | | - working-directory: _build |
24 | | - if: startswith(matrix.os, 'windows') |
25 | | - - name: ubuntu build |
26 | | - run: cmake --build . -- -j4 |
27 | | - if: startswith(matrix.os, 'ubuntu') |
28 | | - working-directory: _build |
29 | | - - name: windows build |
30 | | - run: msbuild /m -p:Configuration=Release INSTALL.vcxproj |
31 | | - if: startswith(matrix.os, 'windows') |
32 | | - working-directory: _build |
| 26 | + with: |
| 27 | + fetch-depth: 1 |
| 28 | + - name: Install Ninja |
| 29 | + uses: tstellar/actions/install-ninja@master |
| 30 | + with: |
| 31 | + os: ${{ runner.os }} |
| 32 | + - name: Test LLVM |
| 33 | + uses: tstellar/actions/build-test-llvm-project@master |
| 34 | + with: |
| 35 | + cmake_args: -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }} |
| 36 | +os: ${{ runner.os }} |
0 commit comments