Skip to content

Commit c80744b

Browse files
alexbatashevAlexander Batashevbader
authored
[CI] Run self-build with default infra (#5347)
Remove code duplication by re-using existing configurations to compile the project with latest nightly compiler + enable shared libs for that configuration. Additionally, run postcommit in precommit, when configuration is updated (for testing purposes). --------- Co-authored-by: Alexander Batashev <alexander.batashev@intel.com> Co-authored-by: Alexey Bader <alexey.bader@intel.com>
1 parent 928a919 commit c80744b

File tree

1 file changed

+12
-69
lines changed

1 file changed

+12
-69
lines changed

.github/workflows/sycl_post_commit.yml

Lines changed: 12 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -47,76 +47,19 @@ jobs:
4747
build_cache_suffix: gcc_no_assertions
4848
build_artifact_suffix: gcc_no_assertions
4949
build_configure_extra_args: --no-assertions
50-
linux_clang_shared_libs:
51-
# TODO use nightly images when Docker containers are available
52-
name: Linux + Clang + Shared libs
53-
runs-on: ubuntu-20.04
50+
linux_self_prod:
51+
name: Linux (Self build + shared libraries)
5452
if: github.repository == 'intel/llvm'
55-
steps:
56-
- uses: actions/checkout@v3
57-
with:
58-
path: src
59-
- name: Install Ubuntu deps
60-
run: sudo apt install -y ninja-build ccache
61-
- name: Setup Cache
62-
uses: actions/cache@v3
63-
id: cache
64-
with:
65-
path: ${{ github.workspace }}/cache
66-
key: build-linux-shared-libs-${{ github.sha }}
67-
restore-keys: |
68-
build-linux-shared-libs-
69-
- name: Configure
70-
run: |
71-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
72-
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
73-
sudo apt-get update
74-
sudo apt-get install -y clang-15
75-
export CC="clang-15"
76-
export CXX="clang++-15"
77-
mkdir -p $GITHUB_WORKSPACE/build
78-
cd $GITHUB_WORKSPACE/build
79-
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
80-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
81-
--ci-defaults --shared-libs --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
82-
--cmake-opt="-DLLVM_CCACHE_DIR=$GITHUB_WORKSPACE/cache" \
83-
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=2G"
84-
- name: Compile
85-
run: |
86-
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \
87-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build
88-
- name: check-llvm
89-
if: always()
90-
run: |
91-
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
92-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm
93-
- name: check-clang
94-
if: always()
95-
run: |
96-
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
97-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-clang
98-
- name: check-sycl
99-
if: always()
100-
run: |
101-
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
102-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-sycl
103-
- name: check-llvm-spirv
104-
if: always()
105-
run: |
106-
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
107-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-llvm-spirv
108-
- name: check-xptifw
109-
if: always()
110-
run: |
111-
python3 $GITHUB_WORKSPACE/src/buildbot/check.py -w $GITHUB_WORKSPACE \
112-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t check-xptifw
113-
- name: Pack
114-
run: tar -czvf llvm_sycl.tar.gz -C $GITHUB_WORKSPACE/build/install .
115-
- name: Upload artifacts
116-
uses: actions/upload-artifact@v3
117-
with:
118-
name: sycl_linux_${{ matrix.config }}
119-
path: llvm_sycl.tar.gz
53+
uses: ./.github/workflows/sycl_linux_build_and_test.yml
54+
with:
55+
build_cache_root: "/__w/llvm"
56+
build_cache_suffix: sprod_shared
57+
build_artifact_suffix: sprod_shared
58+
build_configure_extra_args: --shared-libs
59+
# Docker image has last nightly pre-installed and added to the PATH
60+
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:no-drivers"
61+
cc: clang
62+
cxx: clang++
12063

12164
windows_default:
12265
name: Windows

0 commit comments

Comments
 (0)