|
21 | 21 | description: 'The branch, tag or SHA to checkout, otherwise use the branch' |
22 | 22 | required: false |
23 | 23 | default: '' |
| 24 | + ZETASQL_LIB_URL: |
| 25 | + description: 'zetasql lib url, default is built by src, if you want to use prebuilt, set it. Only for centos6' |
| 26 | + required: false |
| 27 | + default: '' |
24 | 28 |
|
25 | 29 | env: |
26 | 30 | NPROC: 2 # default Parallel build number for GitHub's Linux runner |
|
35 | 39 | OS: linux |
36 | 40 | SQL_JAVASDK_ENABLE: ${{ github.event.inputs.JAVA_SDK }} |
37 | 41 | SQL_PYSDK_ENABLE: ${{ github.event.inputs.PYTHON_SDK }} # python whl will be built when make, no prerequirement |
| 42 | + ZETASQL_LIB_URL: ${{ github.event.inputs.ZETASQL_LIB_URL }} |
38 | 43 | TESTING_ENABLE: OFF |
39 | 44 | NPROC: 8 |
40 | 45 | steps: |
|
46 | 51 | - name: prepare release |
47 | 52 | run: | |
48 | 53 | VERSION="snapshot" |
49 | | - TAG=$(git tag -l | grep $(git describe HEAD)) |
| 54 | + # if not tag, return error, just ignore it to use snapshot as the version |
| 55 | + TAG=$(git tag -l | grep $(git describe HEAD)) || true |
50 | 56 | if [[ "${TAG}" == "v"* ]]; then |
51 | 57 | VERSION=${TAG#v} |
52 | 58 | bash steps/prepare_release.sh "$VERSION" |
|
74 | 80 | - uses: addnab/docker-run-action@v3 |
75 | 81 | with: |
76 | 82 | image: ghcr.io/4paradigm/centos6_gcc7_hybridsql |
77 | | - options: -v ${{ github.workspace }}:/root/OpenMLDB -e USE_DEPS_CACHE=${{ steps.deps-cache.outputs.cache-hit }} -e OPENMLDB_PREFIX=${{ env.OPENMLDB_PREFIX }} -e SQL_PYSDK_ENABLE=${{ env.SQL_PYSDK_ENABLE }} -e SQL_JAVASDK_ENABLE=${{ env.SQL_JAVASDK_ENABLE }} |
| 83 | + options: -v ${{ github.workspace }}:/root/OpenMLDB -e USE_DEPS_CACHE=${{ steps.deps-cache.outputs.cache-hit }} -e OPENMLDB_PREFIX=${{ env.OPENMLDB_PREFIX }} -e SQL_PYSDK_ENABLE=${{ env.SQL_PYSDK_ENABLE }} -e SQL_JAVASDK_ENABLE=${{ env.SQL_JAVASDK_ENABLE }} -e ZETASQL_LIB_URL=${{ env.ZETASQL_LIB_URL }} |
78 | 84 | shell: bash |
79 | 85 | run: | |
80 | 86 | cd /root/OpenMLDB |
|
89 | 95 | # 5.8G ./.deps, avail 8G |
90 | 96 | rm -rf .deps/build # GitHub runner disk space is limited |
91 | 97 | fi |
| 98 | + if [[ "${ZETASQL_LIB_URL}" != "" ]]; then |
| 99 | + echo "replace zetasql lib by ${ZETASQL_LIB_URL}" |
| 100 | + curl -SLo .deps/usr/lib/libzetasql.a ${ZETASQL_LIB_URL} |
| 101 | + fi |
92 | 102 | echo "build" |
93 | 103 | # 1.4G ./.deps, avail 13G |
94 | 104 |
|
@@ -172,7 +182,7 @@ jobs: |
172 | 182 | run: | |
173 | 183 | VERSION="snapshot" |
174 | 184 | # use repo ref not event ref |
175 | | - TAG=$(git tag -l | grep $(git describe HEAD)) |
| 185 | + TAG=$(git tag -l | grep $(git describe HEAD)) || true |
176 | 186 | if [[ "${TAG}" == "v"* ]]; then |
177 | 187 | VERSION=${TAG#v} |
178 | 188 | bash steps/prepare_release.sh "$VERSION" |
@@ -242,7 +252,7 @@ jobs: |
242 | 252 | - name: prepare release |
243 | 253 | run: | |
244 | 254 | VERSION="snapshot" |
245 | | - TAG=$(git tag -l | grep $(git describe HEAD)) |
| 255 | + TAG=$(git tag -l | grep $(git describe HEAD)) || true |
246 | 256 | if [[ "${TAG}" == "v"* ]]; then |
247 | 257 | VERSION=${TAG#v} |
248 | 258 | bash steps/prepare_release.sh "$VERSION" |
|
0 commit comments