Skip to content

Commit 06937d5

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

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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)