11name : Build and Package
22on :
3- schedule :
4- - cron : ' 0 0 * * * ' # Runs the workflow at midnight every day
5- # Allows you to run this workflow manually from the Actions tab
3+ push :
4+ branches :
5+ - stable
66 workflow_dispatch :
77
88concurrency :
1515 run_riscv_m1_nightly_package :
1616 runs-on : ubuntu-22.04
1717
18+ env :
19+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
20+
1821 steps :
1922 - name : Checkout repo
2023 uses : actions/checkout@v3
2427 uses : ./.github/actions/setup_ubuntu_build
2528 with :
2629 llvm_version : 17
27- llvm_build_type : RelAssert
30+ llvm_build_type : Release
2831
2932 - name : Setup python
3033 uses : actions/setup-python@v4
3336
3437 - name : Build riscv M1
3538 uses : ./.github/actions/do_build_ock/do_build_m1
39+ with :
40+ build_type : Release
41+ extra_flags : ' -DCA_REFSI_M1_DEMO_MODE=ON'
42+
43+ - name : Create OCK install
44+ run : |
45+ ninja -C $(pwd)/build install
3646
3747 - name : Download Daily Release
3848 run : |
@@ -49,17 +59,40 @@ jobs:
4959 run : |
5060 export ONEAPI_ROOT=$(pwd)/linux_nightly_release
5161 export PATH=$(pwd)/linux_nightly_release/bin:$PATH
52- export LD_LIBRARY_PATH=$(pwd)/linux_nightly_release/lib:$(pwd)/build /lib:$LD_LIBRARY_PATH
62+ export LD_LIBRARY_PATH=$(pwd)/linux_nightly_release/lib:$(pwd)/install /lib:$LD_LIBRARY_PATH
5363
5464 $(pwd)/linux_nightly_release/bin/clang++ -fsycl $(pwd)/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/src/vector-add-buffers.cpp -o vect
55- CA_HAL_DEBUG=1 OCL_ICD_FILENAMES=$(pwd)/build /lib/libCL.so ONEAPI_DEVICE_SELECTOR=opencl:acc SYCL_CONFIG_FILE_NAME="" ./vect
65+ CA_RISCV_DUMP_IR=1 CA_HAL_DEBUG=1 OCL_ICD_FILENAMES=$(pwd)/install /lib/libCL.so ONEAPI_DEVICE_SELECTOR=opencl:acc SYCL_CONFIG_FILE_NAME="" ./vect
5666
5767 - name : Package Artifacts
5868 run : |
59- tar -czf ock_build .tar.gz $(pwd)/build
69+ tar -czf ock_install .tar.gz install
6070
6171 - name : Upload Artifacts
6272 uses : actions/upload-artifact@v2
6373 with :
6474 name : riscv-build
65- path : ock_build.tar.gz
75+ path : ock_install.tar.gz
76+
77+ - name : Compute tag
78+ id : tag
79+ run : |
80+ if [ "${{ github.event_name == 'schedule' }}" == "true" ]; then
81+ echo "TAG=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
82+ else
83+ # TODO: Use date of the commit?
84+ echo "TAG=$(date +'%Y-%m-%d')-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
85+ fi
86+
87+ - name : Create OCK pre-release
88+ uses : softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
89+ env :
90+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
91+ with :
92+ files :
93+ ock_install.tar.gz
94+ tag_name : nightly-${{ steps.tag.outputs.TAG }}
95+ name : OCK daily ${{ steps.tag.outputs.TAG }}
96+ prerelease : true
97+ body : " Daily build ${{ steps.tag.outputs.TAG }}"
98+ target_commitish : ${{ github.sha }}
0 commit comments