Skip to content

Commit f6de191

Browse files
Only install if no using cached
1 parent 8346a0d commit f6de191

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

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

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
${{ runner.os }}-build-
3333
${{ runner.os }}-
3434
35-
- name: Download nightly and components
35+
- name: Download and install nightly and components
3636
shell: bash -l {0}
3737
run: |
3838
cd /home/runner/work
@@ -43,13 +43,24 @@ jobs:
4343
export NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" \
4444
$(echo ${LATEST_LLVM_TAG} | awk '{gsub(/^refs\/tags\//, "", $2)} {print $2}'))
4545
if [[ -f bundle_id.txt && ( "$(cat bundle_id.txt)" == "${LATEST_LLVM_TAG_SHA}" ) ]]; then
46+
echo "Using cached download of ${LATEST_LLVM_TAG}"
47+
else
4648
export DOWNLOAD_URL_PREFIX=https://github.com/intel/llvm/releases/download
49+
rm -rf dpcpp-compiler.tar.gz
4750
wget ${DOWNLOAD_URL_PREFIX}/${NIGHTLY_TAG}/dpcpp-compiler.tar.gz && echo ${LATEST_LLVM_TAG_SHA} > bundle_id.txt || rm -rf bundle_id.txt
48-
wget ${DOWNLOAD_URL_PREFIX}/2021-07/${OCLCPUEXP_FN} || rm -rf bundle_id.txt
49-
wget ${DOWNLOAD_URL_PREFIX}/2021-07/${FPGAEMU_FN} || rm -rf bundle_id.txt
50-
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.4.0/${TBB_FN} || rm -rf bundle_id.txt
51-
else
52-
echo "Using cached download of ${LATEST_LLVM_TAG}"
51+
[ -f ${OCLCPUEXP_FN} ] || wget ${DOWNLOAD_URL_PREFIX}/2021-07/${OCLCPUEXP_FN} || rm -rf bundle_id.txt
52+
[ -f ${FPGAEMU_FN} ] || wget ${DOWNLOAD_URL_PREFIX}/2021-07/${FPGAEMU_FN} || rm -rf bundle_id.txt
53+
[ -f ${TBB_FN} ] || wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.4.0/${TBB_FN} || rm -rf bundle_id.txt
54+
rm -rf dpcpp_compiler
55+
tar xf dpcpp-compiler.tar.gz
56+
mkdir -p oclcpuexp
57+
mkdir -p fpgaemu
58+
[ -d oclcpuexp/x64 ] || tar xf ${OCLCPUEXP_FN} -C oclcpuexp
59+
[ -d fpgaemu/x64 ] || tar xf ${FPGAEMU_FN} -C fpgaemu
60+
[ -d oneapi-tbb-2021.4.0/lib ] || tar xf ${TBB_FN}
61+
mkdir -p dpcpp_compiler/lib
62+
mkdir -p dpcpp_compiler/lib/oclfpga
63+
touch dpcpp_compiler/lib/oclfpga/fpgavars.sh
5364
fi
5465
5566
- name: Install system components
@@ -68,21 +79,6 @@ jobs:
6879
run: |
6980
pip install numpy cython setuptools pytest
7081
71-
- name: install nightly
72-
shell: bash -l {0}
73-
run: |
74-
cd /home/runner/work/sycl_bundle
75-
tar xf dpcpp-compiler.tar.gz
76-
mkdir -p oclcpuexp
77-
mkdir -p fpgaemu
78-
mkdir -p tbb
79-
tar xf ${OCLCPUEXP_FN} -C oclcpuexp
80-
tar xf ${FPGAEMU_FN} -C fpgaemu
81-
tar xf ${TBB_FN}
82-
mkdir -p dpcpp_compiler/lib
83-
mkdir -p dpcpp_compiler/lib/oclfpga
84-
touch dpcpp_compiler/lib/oclfpga/fpgavars.sh
85-
8682
- name: Checkout repo
8783
uses: actions/checkout@v2
8884
with:

0 commit comments

Comments
 (0)