Skip to content

Commit c66ddc4

Browse files
authored
Merge 4d8c997 into a022003
2 parents a022003 + 4d8c997 commit c66ddc4

27 files changed

+858
-58
lines changed

.github/workflows/pack_publish.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,39 @@ concurrency:
3030
cancel-in-progress: true
3131

3232
jobs:
33-
33+
check_branch:
34+
name: Check branch existence
35+
runs-on: ubuntu-22.04
36+
outputs:
37+
columnar_locator: ${{ steps.set_locator.outputs.columnar_locator }}
38+
steps:
39+
- name: Check if branch exists in manticoresoftware/manticoresearch
40+
id: check_branch
41+
if: github.ref_name != 'master'
42+
run: |
43+
# Extract the actual branch name for pull requests
44+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
45+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
46+
else
47+
BRANCH_NAME="${{ github.ref_name }}"
48+
fi
49+
50+
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://api.github.com/repos/manticoresoftware/columnar/branches/$BRANCH_NAME)
51+
if [ "$HTTP_STATUS" -eq "200" ]; then
52+
echo "branch_exists=true" >> $GITHUB_OUTPUT
53+
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
54+
else
55+
echo "branch_exists=false" >> $GITHUB_OUTPUT
56+
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
57+
fi
58+
- name: Set Columnar Locator
59+
id: set_locator
60+
run: |
61+
if [[ "${{ github.ref_name }}" != "master" && "${{ steps.check_branch.outputs.branch_exists }}" == "true" ]]; then
62+
echo "columnar_locator=GIT_REPOSITORY https://github.com/manticoresoftware/columnar.git GIT_TAG ${{ steps.check_branch.outputs.branch_name }}" >> $GITHUB_OUTPUT
63+
else
64+
echo "columnar_locator=" >> $GITHUB_OUTPUT
65+
fi
3466
pack:
3567
name: OK to pack?
3668
runs-on: ubuntu-22.04
@@ -112,14 +144,15 @@ jobs:
112144
pack_debian_ubuntu:
113145
name: Debian/Ubuntu packages
114146
uses: ./.github/workflows/build_template.yml
115-
needs: pack
147+
needs: [pack, check_branch]
116148
if: needs.pack.outputs.should_continue == 'true'
117149
strategy:
118150
fail-fast: false
119151
matrix:
120152
DISTR: [bionic, focal, jammy, buster, bullseye, bookworm]
121153
arch: [x86_64, aarch64]
122154
with:
155+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
123156
DISTR: ${{ matrix.DISTR }}
124157
arch: ${{ matrix.arch }}
125158
cmake_command: |
@@ -136,14 +169,15 @@ jobs:
136169
pack_rhel:
137170
name: RHEL packages
138171
uses: ./.github/workflows/build_template.yml
139-
needs: pack
172+
needs: [pack, check_branch]
140173
if: needs.pack.outputs.should_continue == 'true'
141174
strategy:
142175
fail-fast: false
143176
matrix:
144177
DISTR: [rhel7, rhel8, rhel9]
145178
arch: [x86_64, aarch64]
146179
with:
180+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
147181
DISTR: ${{ matrix.DISTR }}
148182
arch: ${{ matrix.arch }}
149183
boost_url_key: boost_rhel_feb17
@@ -163,14 +197,15 @@ jobs:
163197
pack_macos:
164198
name: MacOS packages
165199
uses: ./.github/workflows/build_template.yml
166-
needs: pack
200+
needs: [pack, check_branch]
167201
if: needs.pack.outputs.should_continue == 'true'
168202
strategy:
169203
fail-fast: false
170204
matrix:
171205
DISTR: [macos]
172206
arch: [x86_64, arm64]
173207
with:
208+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
174209
DISTR: ${{ matrix.DISTR }}
175210
arch: ${{ matrix.arch }}
176211
HOMEBREW_PREFIX: /opt/homebrew
@@ -188,9 +223,10 @@ jobs:
188223
pack_windows:
189224
name: Windows x64 package
190225
uses: ./.github/workflows/build_template.yml
191-
needs: pack
226+
needs: [pack, check_branch]
192227
if: needs.pack.outputs.should_continue == 'true'
193228
with:
229+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
194230
DISTR: windows
195231
arch: x64
196232
sysroot_url_key: roots_mysql83_jan17

cmake/GetColumnar.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ endif()
4040
set ( LIB_MANTICORE_COLUMNAR "lib_manticore_columnar.${EXTENSION}" )
4141
set ( LIB_MANTICORE_SECONDARY "lib_manticore_secondary.${EXTENSION}" )
4242
set ( LIB_MANTICORE_KNN "lib_manticore_knn.${EXTENSION}" )
43+
set ( LIB_MANTICORE_KNN_EMBEDDINGS "lib_manticore_knn_embeddings.${EXTENSION}" )
4344

4445
macro ( backup_paths )
4546
set ( _CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}" )

config/config_cmake.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@
161161
/* default name of knn search shared library */
162162
#cmakedefine LIB_MANTICORE_KNN "${LIB_MANTICORE_KNN}"
163163

164+
/* default name of knn embeddings shared library */
165+
#cmakedefine LIB_MANTICORE_KNN_EMBEDDINGS "${LIB_MANTICORE_KNN_EMBEDDINGS}"
166+
164167
/* define to set custom directory for shared files. Absolute as /usr/local/share/manticore */
165168
#define FULL_SHARE_DIR "${FULL_SHARE_DIR}"
166169

0 commit comments

Comments
 (0)