Skip to content

Commit 8f38b8f

Browse files
authored
Switch to Github Actions on ocl-open-130 (#331)
Signed-off-by: Haonan Yang <[email protected]>
1 parent 81e96c3 commit 8f38b8f

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: In-tree build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'ocl-open-*'
7+
paths-ignore: # no need to check build for:
8+
- 'docs/**' # documentation
9+
- '**.md' # README
10+
pull_request:
11+
branches:
12+
- 'ocl-open-*'
13+
paths-ignore: # no need to check build for:
14+
- 'docs/**' # documentation
15+
- '**.md' # README
16+
schedule:
17+
# Weekly build on Mondays
18+
# Ideally, we might want to simplify our regular nightly build as we
19+
# probably don't need every configuration to be built every day: most of
20+
# them are only necessary in pre-commits to avoid breakages
21+
- cron: 0 0 * * 0
22+
23+
env:
24+
LLVM_VERSION: 13
25+
26+
jobs:
27+
build_and_test_linux:
28+
name: Linux
29+
strategy:
30+
matrix:
31+
build_type: [Release]
32+
include:
33+
- build_type: Release
34+
fail-fast: false
35+
runs-on: ubuntu-18.04
36+
steps:
37+
- name: setup git config
38+
run: |
39+
git config --global user.email "<>"
40+
git config --global user.name "GitHub Actions Bot"
41+
- name: Checkout LLVM sources
42+
uses: actions/checkout@v2
43+
with:
44+
repository: llvm/llvm-project
45+
ref: release/13.x
46+
path: llvm-project
47+
- name: Checkout the translator sources
48+
uses: actions/checkout@v2
49+
with:
50+
repository: KhronosGroup/SPIRV-LLVM-Translator
51+
ref: llvm_release_130
52+
path: llvm-project/SPIRV-LLVM-Translator
53+
- name: Checkout opencl-clang sources
54+
uses: actions/checkout@v2
55+
with:
56+
path: llvm-project/opencl-clang
57+
- name: Configure
58+
run: |
59+
mkdir build && cd build
60+
cmake ${{ github.workspace }}/llvm-project/llvm \
61+
-DLLVM_ENABLE_PROJECTS="clang" \
62+
-DLLVM_EXTERNAL_PROJECTS="llvm-spirv;opencl-clang" \
63+
-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=${{ github.workspace }}/llvm-project/SPIRV-LLVM-Translator \
64+
-DLLVM_EXTERNAL_OPENCL_CLANG_SOURCE_DIR=${{ github.workspace }}/llvm-project/opencl-clang \
65+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
66+
-DLLVM_TARGETS_TO_BUILD="X86" \
67+
-G "Unix Makefiles"
68+
- name: Build
69+
run: |
70+
cd build
71+
make opencl-clang -j2

0 commit comments

Comments
 (0)