Skip to content

Commit fd33681

Browse files
committed
Merge remote-tracking branch 'upstream/release/14.x' into rustc/14.0-2022-03-22
2 parents 9168e23 + 3400d02 commit fd33681

File tree

109 files changed

+4861
-1160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+4861
-1160
lines changed

.github/workflows/clang-tests.yml

+10-28
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ on:
66
- 'release/**'
77
paths:
88
- 'clang/**'
9-
- 'llvm/**'
109
- '.github/workflows/clang-tests.yml'
10+
- '.github/workflows/llvm-project-tests.yml'
11+
- '!llvm/**'
1112
pull_request:
1213
paths:
1314
- 'clang/**'
14-
- 'llvm/**'
1515
- '.github/workflows/clang-tests.yml'
16+
- '.github/workflows/llvm-project-tests.yml'
17+
- '!llvm/**'
1618

1719
concurrency:
1820
# Skip intermediate builds: always.
@@ -21,29 +23,9 @@ concurrency:
2123
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2224

2325
jobs:
24-
build_clang:
25-
name: clang check-all
26-
runs-on: ${{ matrix.os }}
27-
strategy:
28-
fail-fast: false
29-
matrix:
30-
os:
31-
- ubuntu-latest
32-
- windows-latest
33-
- macOS-latest
34-
steps:
35-
- name: Setup Windows
36-
if: startsWith(matrix.os, 'windows')
37-
uses: llvm/actions/setup-windows@main
38-
with:
39-
arch: amd64
40-
- name: Install Ninja
41-
uses: llvm/actions/install-ninja@main
42-
- uses: actions/checkout@v1
43-
with:
44-
fetch-depth: 250
45-
- name: Test clang
46-
uses: llvm/actions/build-test-llvm-project@main
47-
with:
48-
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
49-
build_target: check-clang
26+
check_clang:
27+
name: Test clang,lldb,libclc
28+
uses: llvm/llvm-project/.github/workflows/llvm-project-tests.yml@release/14.x
29+
with:
30+
build_target: check-clang
31+
projects: clang;lldb;libclc

.github/workflows/libclc-tests.yml

+12-39
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,29 @@ on:
55
branches:
66
- 'release/**'
77
paths:
8-
- 'clang/**'
9-
- 'llvm/**'
108
- 'libclc/**'
119
- '.github/workflows/libclc-tests.yml'
10+
- '.github/workflows/llvm-project-tests.yml'
11+
- '!clang/**'
12+
- '!llvm/**'
1213
pull_request:
1314
paths:
14-
- 'clang/**'
15-
- 'llvm/**'
1615
- 'libclc/**'
1716
- '.github/workflows/libclc-tests.yml'
17+
- '.github/workflows/llvm-project-tests.yml'
18+
- '!clang/**'
19+
- '!llvm/**'
1820

1921
concurrency:
2022
# Skip intermediate builds: always.
2123
# Cancel intermediate builds: only if it is a pull request build.
2224
group: ${{ github.workflow }}-${{ github.ref }}
2325
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2426

25-
2627
jobs:
27-
build_libclc:
28-
name: libclc test
29-
runs-on: ${{ matrix.os }}
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
os:
34-
- ubuntu-latest
35-
# Disable build on windows, because I can't figure out where llvm-config is.
36-
#- windows-latest
37-
- macOS-latest
38-
steps:
39-
- name: Setup Windows
40-
if: startsWith(matrix.os, 'windows')
41-
uses: llvm/actions/setup-windows@main
42-
with:
43-
arch: amd64
44-
- name: Install Ninja
45-
uses: llvm/actions/install-ninja@main
46-
- uses: actions/checkout@v1
47-
with:
48-
fetch-depth: 250
49-
- name: Build clang
50-
uses: llvm/actions/build-test-llvm-project@main
51-
with:
52-
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
53-
build_target: ""
54-
- name: Build and test libclc
55-
# spirv targets require llvm-spirv, so skip building them until we figure out
56-
# how to install this tool.
57-
run: |
58-
cmake -G Ninja -S libclc -B libclc-build -DLLVM_CONFIG=`pwd`/build/bin/llvm-config -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
59-
ninja -C libclc-build
60-
ninja -C libclc-build test
28+
check_libclc:
29+
name: Test libclc
30+
uses: llvm/llvm-project/.github/workflows/llvm-project-tests.yml@release/14.x
31+
with:
32+
build_target: ''
33+
projects: clang;libclc

.github/workflows/lld-tests.yml

+10-28
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ on:
66
- 'release/**'
77
paths:
88
- 'lld/**'
9-
- 'llvm/**'
109
- '.github/workflows/lld-tests.yml'
10+
- '.github/workflows/llvm-project-tests.yml'
11+
- '!llvm/**'
1112
pull_request:
1213
paths:
1314
- 'lld/**'
14-
- 'llvm/**'
1515
- '.github/workflows/lld-tests.yml'
16+
- '.github/workflows/llvm-project-tests.yml'
17+
- '!llvm/**'
1618

1719
concurrency:
1820
# Skip intermediate builds: always.
@@ -21,29 +23,9 @@ concurrency:
2123
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2224

2325
jobs:
24-
build_lld:
25-
name: lld check-all
26-
runs-on: ${{ matrix.os }}
27-
strategy:
28-
fail-fast: false
29-
matrix:
30-
os:
31-
- ubuntu-latest
32-
- windows-latest
33-
- macOS-latest
34-
steps:
35-
- name: Setup Windows
36-
if: startsWith(matrix.os, 'windows')
37-
uses: llvm/actions/setup-windows@main
38-
with:
39-
arch: amd64
40-
- name: Install Ninja
41-
uses: llvm/actions/install-ninja@main
42-
- uses: actions/checkout@v1
43-
with:
44-
fetch-depth: 250
45-
- name: Test lld
46-
uses: llvm/actions/build-test-llvm-project@main
47-
with:
48-
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="lld" -DCMAKE_BUILD_TYPE=Release
49-
build_target: check-lld
26+
check_lld:
27+
name: Test lld
28+
uses: llvm/llvm-project/.github/workflows/llvm-project-tests.yml@release/14.x
29+
with:
30+
build_target: check-lld
31+
projects: lld

.github/workflows/lldb-tests.yml

+11-34
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ on:
55
branches:
66
- 'release/**'
77
paths:
8-
- 'clang/**'
9-
- 'llvm/**'
108
- 'lldb/**'
119
- '.github/workflows/lldb-tests.yml'
10+
- '.github/workflows/llvm-project-tests.yml'
11+
- '!clang/**'
12+
- '!llvm/**'
1213
pull_request:
1314
paths:
14-
- 'clang/**'
15-
- 'llvm/**'
1615
- 'lldb/**'
1716
- '.github/workflows/lldb-tests.yml'
17+
- '.github/workflows/llvm-project-tests.yml'
18+
- '!clang/**'
19+
- '!llvm/**'
1820

1921
concurrency:
2022
# Skip intermediate builds: always.
@@ -25,33 +27,8 @@ concurrency:
2527

2628
jobs:
2729
build_lldb:
28-
name: lldb build
29-
runs-on: ${{ matrix.os }}
30-
# Workaround for build faliure on Mac OS X: llvm.org/PR46190, https://github.com/actions/virtual-environments/issues/2274
31-
env:
32-
CPLUS_INCLUDE_PATH: /usr/local/opt/llvm/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
33-
strategy:
34-
fail-fast: false
35-
matrix:
36-
os:
37-
- ubuntu-latest
38-
- windows-latest
39-
- macOS-10.15
40-
steps:
41-
- name: Setup Windows
42-
if: startsWith(matrix.os, 'windows')
43-
uses: llvm/actions/setup-windows@main
44-
with:
45-
arch: amd64
46-
- name: Install Ninja
47-
uses: llvm/actions/install-ninja@main
48-
- uses: actions/checkout@v1
49-
with:
50-
fetch-depth: 250
51-
- name: Build lldb
52-
uses: llvm/actions/build-test-llvm-project@main
53-
with:
54-
# Mac OS requries that libcxx is enabled for lldb tests, so we need to disable them.
55-
cmake_args: -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF
56-
# check-lldb is not consistent, so we only build lldb.
57-
build_target: ""
30+
name: Build lldb
31+
uses: llvm/llvm-project/.github/workflows/llvm-project-tests.yml@release/14.x
32+
with:
33+
build_target: ''
34+
projects: clang;lldb
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: LLVM Project Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
build_target:
7+
required: true
8+
type: string
9+
10+
projects:
11+
required: true
12+
type: string
13+
14+
concurrency:
15+
# Skip intermediate builds: always.
16+
# Cancel intermediate builds: only if it is a pull request build.
17+
# If the group name here is the same as the group name in the workflow that includes
18+
# this one, then the action will try to wait on itself and get stuck.
19+
group: llvm-project-${{ github.workflow }}-${{ inputs.projects}}${{ github.ref }}
20+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
21+
22+
env:
23+
# Workaround for build faliure on Mac OS X: llvm.org/PR46190, https://github.com/actions/virtual-environments/issues/2274
24+
CPLUS_INCLUDE_PATH: /usr/local/opt/llvm/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
25+
26+
jobs:
27+
lit-tests:
28+
name: Lit Tests
29+
runs-on: ${{ matrix.os }}
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
os:
34+
- ubuntu-latest
35+
- windows-latest
36+
# Use a specific version of macOS to ensure the CPLUS_INCLUDE_PATH workaround works.
37+
- macOS-10.15
38+
steps:
39+
- name: Setup Windows
40+
if: startsWith(matrix.os, 'windows')
41+
uses: llvm/actions/setup-windows@main
42+
with:
43+
arch: amd64
44+
- name: Install Ninja
45+
uses: llvm/actions/install-ninja@main
46+
- uses: actions/checkout@v1
47+
with:
48+
fetch-depth: 250
49+
- name: Build and Test
50+
uses: llvm/actions/build-test-llvm-project@main
51+
with:
52+
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF'
53+
build_target: '${{ inputs.build_target }}'
54+
55+
- name: Build and Test libclc
56+
if: "!startsWith(matrix.os, 'windows') && contains(inputs.projects, 'libclc')"
57+
run: |
58+
# Make sure all of LLVM libraries that llvm-config needs are built.
59+
ninja -C build
60+
cmake -G Ninja -S libclc -B libclc-build -DLLVM_CONFIG=`pwd`/build/bin/llvm-config -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
61+
ninja -C libclc-build
62+
ninja -C libclc-build test

.github/workflows/llvm-tests.yml

+24-25
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
paths:
88
- 'llvm/**'
99
- '.github/workflows/llvm-tests.yml'
10+
- '.github/workflows/llvm-project-tests.yml'
1011
pull_request:
1112
paths:
1213
- 'llvm/**'
1314
- '.github/workflows/llvm-tests.yml'
15+
- '.github/workflows/llvm-project-tests.yml'
1416

1517
concurrency:
1618
# Skip intermediate builds: always.
@@ -20,31 +22,28 @@ concurrency:
2022

2123

2224
jobs:
23-
build_llvm:
24-
name: llvm check-all
25-
runs-on: ${{ matrix.os }}
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
os:
30-
- ubuntu-latest
31-
- windows-latest
32-
- macOS-latest
33-
steps:
34-
- name: Setup Windows
35-
if: startsWith(matrix.os, 'windows')
36-
uses: llvm/actions/setup-windows@main
37-
with:
38-
arch: amd64
39-
- name: Install Ninja
40-
uses: llvm/actions/install-ninja@main
41-
- uses: actions/checkout@v1
42-
with:
43-
fetch-depth: 250
44-
- name: Test llvm
45-
uses: llvm/actions/build-test-llvm-project@main
46-
with:
47-
cmake_args: -G Ninja -DCMAKE_BUILD_TYPE=Release
25+
check_all:
26+
name: Test llvm,clang,libclc
27+
uses: llvm/llvm-project/.github/workflows/llvm-project-tests.yml@release/14.x
28+
with:
29+
build_target: check-all
30+
projects: clang;libclc
31+
32+
# These need to be separate from the check_all job, becuase there is not enough disk
33+
# space to build all these projects on Windows.
34+
build_lldb:
35+
name: Build lldb
36+
uses: llvm/llvm-project/.github/workflows/llvm-project-tests.yml@release/14.x
37+
with:
38+
build_target: ''
39+
projects: clang;lldb
40+
41+
check_lld:
42+
name: Test lld
43+
uses: llvm/llvm-project/.github/workflows/llvm-project-tests.yml@release/14.x
44+
with:
45+
build_target: check-lld
46+
projects: lld
4847

4948
abi-dump-setup:
5049
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)