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