Skip to content

Commit 3093797

Browse files
committed
Add yaml defintions for CI tests with GitHub Actions
Imported from release/9.x branch with some additonal changes.
1 parent f68ccba commit 3093797

File tree

3 files changed

+191
-0
lines changed

3 files changed

+191
-0
lines changed

.github/workflows/clang-tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Clang Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'clang/**'
9+
- 'llvm/**'
10+
- '.github/workflows/clang-tests.yml'
11+
pull_request:
12+
paths:
13+
- 'clang/**'
14+
- 'llvm/**'
15+
16+
jobs:
17+
build_clang:
18+
name: clang check-all
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os:
24+
- ubuntu-latest
25+
- windows-latest
26+
- macOS-latest
27+
steps:
28+
- name: Setup Windows
29+
if: startsWith(matrix.os, 'windows')
30+
uses: llvm/actions/setup-windows@master
31+
with:
32+
arch: amd64
33+
- name: Install Ninja
34+
uses: llvm/actions/install-ninja@master
35+
- uses: actions/checkout@v1
36+
with:
37+
fetch-depth: 1
38+
- name: Test clang
39+
uses: llvm/actions/build-test-llvm-project@master
40+
with:
41+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
42+
build_target: check-clang

.github/workflows/lld-tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: LLD Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'lld/**'
9+
- 'llvm/**'
10+
- '.github/workflows/lld-tests.yml'
11+
pull_request:
12+
paths:
13+
- 'lld/**'
14+
- 'llvm/**'
15+
16+
jobs:
17+
build_lld:
18+
name: lld check-all
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os:
24+
- ubuntu-latest
25+
- windows-latest
26+
- macOS-latest
27+
steps:
28+
- name: Setup Windows
29+
if: startsWith(matrix.os, 'windows')
30+
uses: llvm/actions/setup-windows@master
31+
with:
32+
arch: amd64
33+
- name: Install Ninja
34+
uses: llvm/actions/install-ninja@master
35+
- uses: actions/checkout@v1
36+
with:
37+
fetch-depth: 1
38+
- name: Test lld
39+
uses: llvm/actions/build-test-llvm-project@master
40+
with:
41+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="lld" -DCMAKE_BUILD_TYPE=Release
42+
build_target: check-lld

.github/workflows/llvm-tests.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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

Comments
 (0)