Skip to content

Commit 691b289

Browse files
authored
Merge pull request #270 from MaryaSharf/marya/publish
Publish pre-release OCK
2 parents 965e267 + e19d2b3 commit 691b289

3 files changed

Lines changed: 49 additions & 8 deletions

File tree

.github/actions/do_build_ock/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ inputs:
7070
enable_rvv_scalable_VP_vecz_check:
7171
description: "Enable RVV scalable vecz VP check (default OFF)"
7272
default: OFF
73+
install_dir:
74+
description: "Install directory for OCK"
75+
default: install
7376

7477
runs:
7578
# We don't want a new docker just a list of steps, so mark as composite
@@ -104,6 +107,7 @@ runs:
104107
-DCA_RISCV_ENABLED=${{ inputs.riscv_enabled }}
105108
-DCA_CL_ENABLE_RVV_SCALABLE_VECZ_CHECK=${{ inputs.enable_rvv_scalable_vecz_check }}
106109
-DCA_CL_ENABLE_RVV_SCALABLE_VP_VECZ_CHECK=${{ inputs.enable_rvv_scalable_vp_vecz_check }}
110+
-DCMAKE_INSTALL_PREFIX=${{ inputs.install_dir }}
107111
${{ inputs.extra_flags }}
108112
.
109113
- name: build_ock

.github/actions/do_build_ock/do_build_m1/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ inputs:
55
build_type:
66
description: 'build type (Release, ReleaseAssert)'
77
default: ReleaseAssert
8+
extra_flags:
9+
description: 'any additional flags'
10+
default: ''
811

912
runs:
1013
# We don't want a new docker just a list of steps, so mark as composite
@@ -20,3 +23,4 @@ runs:
2023
riscv_enabled: ON
2124
enable_rvv_scalable_vecz_check: ON
2225
enable_rvv_scalable_VP_vecz_check: ON
26+
extra_flags: ${{ inputs.extra_flags }}

.github/workflows/create_publish_artifacts.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Build and Package
22
on:
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

88
concurrency:
@@ -15,6 +15,9 @@ jobs:
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
@@ -24,7 +27,7 @@ jobs:
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
@@ -33,6 +36,13 @@ jobs:
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

Comments
 (0)