Skip to content

Commit 696ab05

Browse files
Use ls-remote instead of checkout out the whole repo
1 parent 29cba58 commit 696ab05

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/os-llvm-sycl-build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Build with Open Source LLVM-Sycl compiler
1+
name: Build with Open Source LLVM SYCL compiler
22
on:
33
pull_request:
44
push:
55
branches: [master]
66

77
jobs:
88
install-compiler:
9-
name: Install Nightly build of DPC++ toolchain
9+
name: Build with nightly build of DPC++ toolchain
1010
runs-on: ubuntu-20.04
1111

1212
env:
@@ -39,12 +39,11 @@ jobs:
3939
cd /home/runner/work
4040
mkdir -p sycl_bundle
4141
cd sycl_bundle
42-
git clone http://github.com/intel/llvm.git llvm_src
43-
cd llvm_src
44-
export NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" $(git tag | sort -V | tail -1))
45-
cd ..
42+
export LATEST_LLVM_TAG=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/intel/llvm.git | tail --lines=1)
43+
export LATEST_LLVM_TAG_SHA=$(echo ${LATEST_LLVM_TAG} | awk '{print $1}')
44+
export NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" $(echo ${LATEST_LLVM_TAG} | awk '{gsub(/^refs\/tags\//, "", $2)} {print $2}'))
4645
export DOWNLOAD_URL_PREFIX=https://github.com/intel/llvm/releases/download
47-
wget ${DOWNLOAD_URL_PREFIX}/${NIGHTLY_TAG}/dpcpp-compiler.tar.gz && echo ${NIGHTLY_TAG} > bundle_id.txt || rm -rf bundle_d.txt
46+
wget ${DOWNLOAD_URL_PREFIX}/${NIGHTLY_TAG}/dpcpp-compiler.tar.gz && echo ${LATEST_LLVM_TAG_SHA} > bundle_id.txt || rm -rf bundle_d.txt
4847
wget ${DOWNLOAD_URL_PREFIX}/2021-07/${OCLCPUEXP_FN}
4948
wget ${DOWNLOAD_URL_PREFIX}/2021-07/${FPGAEMU_FN}
5049
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.4.0/${TBB_FN}

0 commit comments

Comments
 (0)