Skip to content

Commit 0c97794

Browse files
author
Alexander Batashev
authored
[CI] Refactor post-commit jobs to use existing workflow (#4911)
Use common workflows for post-commit builds. Also make use of better compression algorithms to reduce build artifact size. Clang + shared libs job still uses old configuration. It will be updated to the new config, once there're nightly Docker builds, which can be used for self-build.
1 parent 6e5dd48 commit 0c97794

File tree

3 files changed

+106
-102
lines changed

3 files changed

+106
-102
lines changed

.github/workflows/linux_post_commit.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ on:
4444
build_artifact_suffix:
4545
type: string
4646
required: true
47-
build_upload_artifact:
48-
type: boolean
49-
required: false
50-
default: false
5147

5248
jobs:
5349
configure:
@@ -142,17 +138,24 @@ jobs:
142138
run: |
143139
cmake --build $GITHUB_WORKSPACE/build --target check-xptifw
144140
- name: Install
145-
if: ${{ steps.parameters.build_upload_artifact }}
146-
run: cmake --build $GITHUB_WORKSPACE/build --target install
141+
# TODO replace utility installation with a single CMake target
142+
run: |
143+
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
144+
cmake --build $GITHUB_WORKSPACE/build --target utils/FileCheck/install
145+
cmake --build $GITHUB_WORKSPACE/build --target utils/count/install
146+
cmake --build $GITHUB_WORKSPACE/build --target utils/not/install
147+
cmake --build $GITHUB_WORKSPACE/build --target utils/lit/install
148+
cmake --build $GITHUB_WORKSPACE/build --target utils/llvm-lit/install
149+
cmake --build $GITHUB_WORKSPACE/build --target install-clang-format
150+
cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy
151+
147152
- name: Pack
148-
if: ${{ steps.parameters.build_upload_artifact }}
149-
run: tar -czf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
153+
run: tar -cJf llvm_sycl.tar.xz -C $GITHUB_WORKSPACE/build/install .
150154
- name: Upload artifacts
151155
uses: actions/upload-artifact@v1
152-
if: ${{ steps.parameters.build_upload_artifact }}
153156
with:
154157
name: sycl_linux_${{ fromJSON(needs.configure.outputs.params).build_artifact_suffix }}
155-
path: llvm_sycl.tar.gz
158+
path: llvm_sycl.tar.xz
156159
- name: Cleanup
157160
if: always()
158161
run: rm -rf $GITHUB_WORKSPACE/*
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Linux Post Commit Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- sycl
7+
jobs:
8+
linux_default:
9+
name: Linux Default
10+
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
11+
with:
12+
build_cache_root: "__w/llvm"
13+
build_github_cache: true
14+
build_artifact_suffix: default
15+
linux_no_assert:
16+
name: Linux Default
17+
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
18+
with:
19+
build_cache_root: "__w/llvm"
20+
build_github_cache: true
21+
build_cache_suffix: gcc_no_assertions
22+
build_artifact_suffix: gcc_no_assertions
23+
build_configure_extra_args: --no-assertions
24+
linux_clang_shared_libs:
25+
# TODO use nightly images when Docker containers are available
26+
name: Linux + Clang + Shared libs
27+
runs-on: ubuntu-20.04
28+
if: github.repository == 'intel/llvm'
29+
steps:
30+
- uses: actions/checkout@v2
31+
with:
32+
path: src
33+
- name: Install Ubuntu deps
34+
run: sudo apt install -y ninja-build ccache
35+
- name: Setup Cache
36+
uses: actions/cache@v2
37+
id: cache
38+
with:
39+
path: ${{ github.workspace }}/cache
40+
key: build-linux-shared-libs-${{ github.sha }}
41+
restore-keys: |
42+
build-linux-shared-libs-
43+
- name: Configure
44+
run: |
45+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
46+
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"
47+
sudo apt-get update
48+
sudo apt-get install -y clang-13
49+
export CC="clang-13"
50+
export CXX="clang++-13"
51+
mkdir -p $GITHUB_WORKSPACE/build
52+
cd $GITHUB_WORKSPACE/build
53+
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
54+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
55+
--ci-defaults --shared-libs --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
56+
--cmake-opt="-DLLVM_CCACHE_DIR=$GITHUB_WORKSPACE/cache" \
57+
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=2G"
58+
- name: Compile
59+
run: |
60+
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
61+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build
62+
- name: check-llvm
63+
if: always()
64+
run: |
65+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
66+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm
67+
- name: check-clang
68+
if: always()
69+
run: |
70+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
71+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-clang
72+
- name: check-sycl
73+
if: always()
74+
run: |
75+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
76+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-sycl
77+
- name: check-llvm-spirv
78+
if: always()
79+
run: |
80+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
81+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
82+
- name: check-xptifw
83+
if: always()
84+
run: |
85+
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
86+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
87+
- name: Pack
88+
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
89+
- name: Upload artifacts
90+
uses: actions/upload-artifact@v1
91+
with:
92+
name: sycl_linux_${{ matrix.config }}
93+
path: llvm_sycl.tar.gz

0 commit comments

Comments
 (0)