-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (47 loc) · 1.46 KB
/
IDC_1100_Public_Sycl_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Public Sycl build
run-name: Sync build is testing out GitHub Action
on:
push:
branches:
- wenjun/build_check
schedule:
# Set to "0 0 * * *" to run it at midnight every day.
- cron: '0 3 * * *'
jobs:
Sync-Build-CI:
runs-on: Intel_openxla
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Prepare Conda Environment
run: |
set +e
CONDA_ENV=Sync_build_nightly_${{ runner.name }}
source /opt/conda/bin/activate ${CONDA_ENV}
if [ $? -ne 0 ]; then
echo 'conda env does not exist'
conda create -n ${CONDA_ENV} python=3.10 -y
conda activate ${CONDA_ENV}
fi
pip install numpy
- name: Sync Build
run: |
set +e
CONDA_ENV=Sync_build_nightly_${{ runner.name }}
source /opt/conda/bin/activate ${CONDA_ENV}
#build
export SYCL_TOOLKIT_PATH=/home/sdp/intel/oneapi/compiler/2024.1
export workspace=$PWD/build_workspace
mkdir -p $workspace
export xla_path=$workspace/stock_xla
cd $workspace
git clone https://github.com/openxla/xla.git stock_xla
bash $xla_path/build_tools/sycl/build.sh $workspace |& tee $workspace/build.log
build_result=${PIPESTATUS[0]}
echo $build_result
if [ "$build_result" = "0" ];then
echo "Build successful"
else
echo "Build Failed"
exit 1
fi