Skip to content

Commit b59b6b6

Browse files
committed
Import github action definitions from release/10.x branch
1 parent 3039965 commit b59b6b6

File tree

5 files changed

+303
-0
lines changed

5 files changed

+303
-0
lines changed

.github/workflows/clang-tests.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
- '.github/workflows/clang-tests.yml'
16+
17+
jobs:
18+
build_clang:
19+
name: clang 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 clang
40+
uses: llvm/actions/build-test-llvm-project@master
41+
with:
42+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
43+
build_target: check-clang

.github/workflows/libclc-tests.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: libclc Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'clang/**'
9+
- 'llvm/**'
10+
- 'libclc/**'
11+
- '.github/workflows/libclc-tests.yml'
12+
pull_request:
13+
paths:
14+
- 'clang/**'
15+
- 'llvm/**'
16+
- 'libclc/**'
17+
- '.github/workflows/libclc-tests.yml'
18+
19+
jobs:
20+
build_libclc:
21+
name: libclc test
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os:
27+
- ubuntu-latest
28+
# Disable build on windows, because I can't figure out where llvm-config is.
29+
#- windows-latest
30+
- macOS-latest
31+
steps:
32+
- name: Setup Windows
33+
if: startsWith(matrix.os, 'windows')
34+
uses: llvm/actions/setup-windows@master
35+
with:
36+
arch: amd64
37+
- name: Install Ninja
38+
uses: llvm/actions/install-ninja@master
39+
- uses: actions/checkout@v1
40+
with:
41+
fetch-depth: 1
42+
- name: Build clang
43+
uses: llvm/actions/build-test-llvm-project@master
44+
with:
45+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
46+
build_target: ""
47+
- name: Build and test libclc
48+
run: |
49+
mkdir libclc-build
50+
cd libclc-build
51+
cmake -G Ninja ../libclc -DLLVM_CONFIG=../build/bin/llvm-config
52+
ninja
53+
ninja test

.github/workflows/lld-tests.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
- '.github/workflows/lld-tests.yml'
16+
17+
jobs:
18+
build_lld:
19+
name: lld 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 lld
40+
uses: llvm/actions/build-test-llvm-project@master
41+
with:
42+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="lld" -DCMAKE_BUILD_TYPE=Release
43+
build_target: check-lld

.github/workflows/lldb-tests.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: lldb Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/**'
7+
paths:
8+
- 'clang/**'
9+
- 'llvm/**'
10+
- 'lldb/**'
11+
- '.github/workflows/lldb-tests.yml'
12+
pull_request:
13+
paths:
14+
- 'clang/**'
15+
- 'llvm/**'
16+
- 'lldb/**'
17+
- '.github/workflows/lldb-tests.yml'
18+
19+
jobs:
20+
build_lldb:
21+
name: lldb build
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os:
27+
- ubuntu-latest
28+
- windows-latest
29+
# macOS build disabled due to: llvm.org/PR46190
30+
#- macOS-latest
31+
steps:
32+
- name: Setup Windows
33+
if: startsWith(matrix.os, 'windows')
34+
uses: llvm/actions/setup-windows@master
35+
with:
36+
arch: amd64
37+
- name: Install Ninja
38+
uses: llvm/actions/install-ninja@master
39+
- uses: actions/checkout@v1
40+
with:
41+
fetch-depth: 1
42+
- name: Build lldb
43+
uses: llvm/actions/build-test-llvm-project@master
44+
with:
45+
# Mac OS requries that libcxx is enabled for lldb tests, so we need to disable them.
46+
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF
47+
# check-lldb is not consistent, so we only build lldb.
48+
build_target: ""

.github/workflows/llvm-tests.yml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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

Comments
 (0)