aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2019-10-25 18:18:27 +0000
committerTom Stellard <tstellar@redhat.com>2019-11-18 09:38:48 -0800
commit6c86aa62d502ac2df58e207d4792544cc96d79bd (patch)
tree3145fb4fc98086f72a82d73d652e083698eca482
parent3437c7fc4470afa42c4e727e13585c861ae1f116 (diff)
downloadllvm-6c86aa62d502ac2df58e207d4792544cc96d79bd.zip
llvm-6c86aa62d502ac2df58e207d4792544cc96d79bd.tar.gz
llvm-6c86aa62d502ac2df58e207d4792544cc96d79bd.tar.bz2
Add yaml defintions for CI tests with GitHub Actions
Initial tests check for ABI changes and build/test llvm, clang, and lld.
-rw-r--r--.github/workflows/commit-tests.yml95
1 files changed, 95 insertions, 0 deletions
diff --git a/.github/workflows/commit-tests.yml b/.github/workflows/commit-tests.yml
new file mode 100644
index 0000000..c2aea1d
--- /dev/null
+++ b/.github/workflows/commit-tests.yml
@@ -0,0 +1,95 @@
+name: Commit Tests
+
+env:
+ release_major: 9
+
+on: [push, pull_request]
+
+jobs:
+ build_llvm:
+ name: check-all llvm/clang/lld
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-latest
+ - windows-latest
+ - macOS-latest
+ steps:
+ - name: Setup Windows
+ if: startsWith(matrix.os, 'windows')
+ uses: llvm/actions/setup-windows@master
+ with:
+ arch: amd64
+ - name: Install Ninja
+ uses: llvm/actions/install-ninja@master
+ - uses: actions/checkout@v1
+ with:
+ fetch-depth: 1
+ - name: Test LLVM
+ uses: llvm/actions/build-test-llvm-project@master
+ with:
+ cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lld;" -DCMAKE_BUILD_TYPE=Release
+
+ abi-dump:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ name:
+ - build-baseline
+ - build-latest
+ include:
+ - name: build-baseline
+ # FIXME: Referencing the env context does not work here
+ # ref: llvmorg-${{ env.release_major }}.0.0
+ ref: llvmorg-9.0.0
+ - name: build-latest
+ ref: ${{ github.sha }}
+ steps:
+ - name: Install Ninja
+ uses: llvm/actions/install-ninja@master
+ - name: Install abi-compliance-checker
+ run: sudo apt-get install abi-dumper
+ - name: Download source code
+ uses: llvm/actions/get-llvm-project-src@master
+ with:
+ ref: ${{ matrix.ref }}
+ - name: Configure
+ run: |
+ mkdir build
+ cd build
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON ../llvm
+ - name: Build
+ run: ninja -C build libLLVM-${{ env.release_major }}.so
+ - name: Dump ABI
+ 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
+ - name: Upload ABI file
+ uses: actions/upload-artifact@v1
+ with:
+ name: ${{ matrix.name }}
+ path: ${{ matrix.ref }}.abi.tar.gz
+
+ abi-compare:
+ runs-on: ubuntu-latest
+ needs:
+ - abi-dump
+ steps:
+ - name: Download baseline
+ uses: actions/download-artifact@v1
+ with:
+ name: build-baseline
+ - name: Download latest
+ uses: actions/download-artifact@v1
+ with:
+ name: build-latest
+ - name: Install abi-compliance-checker
+ run: sudo apt-get install abi-compliance-checker
+ - name: Compare ABI
+ run: abi-compliance-checker -l libLLVM-${{ env.release_major}}.so -old build-baseline/*.tar.gz -new build-latest/*.tar.gz
+ - name: Upload ABI Comparison
+ if: always()
+ uses: actions/upload-artifact@v1
+ with:
+ name: compat-report-${{ github.sha }}
+ path: compat_reports/