Sync build is testing out GitHub Action #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '50 6 * * *' | |
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 -b guizili/build https://github.com/Intel-tensorflow/xla stock_xla | |
bash $xla_path/tools/ci_build/sycl_build/build_sycl.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 |