|
| 1 | +name: LLVM Tests |
| 2 | + |
| 3 | +env: |
| 4 | + release_major: 10 |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - 'release/**' |
| 10 | + paths: |
| 11 | + - 'llvm/**' |
| 12 | + - '.github/workflows/llvm-tests.yml' |
| 13 | + pull_request: |
| 14 | + paths: |
| 15 | + - 'llvm/**' |
| 16 | + |
| 17 | +jobs: |
| 18 | + build_llvm: |
| 19 | + name: llvm check-all |
| 20 | + runs-on: ${{ matrix.os }} |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + os: |
| 25 | + - ubuntu-latest |
| 26 | + - windows-latest |
| 27 | + - macOS-latest |
| 28 | + steps: |
| 29 | + - name: Setup Windows |
| 30 | + if: startsWith(matrix.os, 'windows') |
| 31 | + uses: llvm/actions/setup-windows@master |
| 32 | + with: |
| 33 | + arch: amd64 |
| 34 | + - name: Install Ninja |
| 35 | + uses: llvm/actions/install-ninja@master |
| 36 | + - uses: actions/checkout@v1 |
| 37 | + with: |
| 38 | + fetch-depth: 1 |
| 39 | + - name: Test llvm |
| 40 | + uses: llvm/actions/build-test-llvm-project@master |
| 41 | + with: |
| 42 | + cmake_args: -G Ninja -DCMAKE_BUILD_TYPE=Release |
| 43 | + |
| 44 | + abi-dump: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + strategy: |
| 47 | + matrix: |
| 48 | + name: |
| 49 | + - build-baseline |
| 50 | + - build-latest |
| 51 | + include: |
| 52 | + - name: build-baseline |
| 53 | + # FIXME: Referencing the env context does not work here |
| 54 | + # ref: llvmorg-${{ env.release_major }}.0.0 |
| 55 | + ref: llvmorg-10.0.0 |
| 56 | + repo: llvm/llvm-project |
| 57 | + - name: build-latest |
| 58 | + ref: ${{ github.sha }} |
| 59 | + repo: ${{ github.repository }} |
| 60 | + steps: |
| 61 | + - name: Install Ninja |
| 62 | + uses: llvm/actions/install-ninja@master |
| 63 | + - name: Install abi-compliance-checker |
| 64 | + run: sudo apt-get install abi-dumper |
| 65 | + - name: Download source code |
| 66 | + uses: llvm/actions/get-llvm-project-src@master |
| 67 | + with: |
| 68 | + ref: ${{ matrix.ref }} |
| 69 | + repo: ${{ matrix.repo }} |
| 70 | + - name: Configure |
| 71 | + run: | |
| 72 | + mkdir build |
| 73 | + cd build |
| 74 | + cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON ../llvm |
| 75 | + - name: Build |
| 76 | + run: ninja -C build libLLVM-${{ env.release_major }}.so |
| 77 | + - name: Dump ABI |
| 78 | + run: abi-dumper -lver ${{ matrix.ref }} -skip-cxx -public-headers llvm/include -o ${{ matrix.ref }}.abi.tar.gz build/lib/libLLVM-${{ env.release_major }}.so |
| 79 | + - name: Upload ABI file |
| 80 | + uses: actions/upload-artifact@v1 |
| 81 | + with: |
| 82 | + name: ${{ matrix.name }} |
| 83 | + path: ${{ matrix.ref }}.abi.tar.gz |
| 84 | + |
| 85 | + abi-compare: |
| 86 | + runs-on: ubuntu-latest |
| 87 | + needs: |
| 88 | + - abi-dump |
| 89 | + steps: |
| 90 | + - name: Download baseline |
| 91 | + uses: actions/download-artifact@v1 |
| 92 | + with: |
| 93 | + name: build-baseline |
| 94 | + - name: Download latest |
| 95 | + uses: actions/download-artifact@v1 |
| 96 | + with: |
| 97 | + name: build-latest |
| 98 | + - name: Install abi-compliance-checker |
| 99 | + run: sudo apt-get install abi-compliance-checker |
| 100 | + - name: Compare ABI |
| 101 | + run: abi-compliance-checker -l libLLVM-${{ env.release_major}}.so -old build-baseline/*.tar.gz -new build-latest/*.tar.gz |
| 102 | + - name: Upload ABI Comparison |
| 103 | + if: always() |
| 104 | + uses: actions/upload-artifact@v1 |
| 105 | + with: |
| 106 | + name: compat-report-${{ github.sha }} |
| 107 | + path: compat_reports/ |
0 commit comments