Skip to content

Commit 4d8c997

Browse files
authored
Merge branch 'master' into embeddings_generation
2 parents 3790f88 + a022003 commit 4d8c997

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+921
-118
lines changed

.github/workflows/build_template.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ on:
2727
required: false
2828
type: number
2929
default: 1
30+
version:
31+
required: false
32+
type: string
33+
default: ""
34+
build_tag:
35+
required: false
36+
type: string
37+
default: ""
3038
cmake_command:
3139
required: false
3240
type: string
@@ -89,13 +97,20 @@ jobs:
8997
HOMEBREW_PREFIX: ${{ inputs.HOMEBREW_PREFIX }}
9098
PACK_GALERA: ${{ inputs.PACK_GALERA }}
9199
COLUMNAR_LOCATOR: ${{ inputs.COLUMNAR_LOCATOR }}
100+
BUILD_TAG: ${{ inputs.build_tag }}
92101
steps:
93102
- name: Checkout repository
94103
uses: actions/checkout@v3
95104
with:
96105
token: ${{ secrets.GITHUB_TOKEN }}
97106
set-safe-directory: true
98107

108+
- name: Patch version
109+
if: inputs.version != ''
110+
run: |
111+
sed -i "s/0\.0\.0/${{ inputs.version }}/g" src/sphinxversion.h.in
112+
cat src/sphinxversion.h.in
113+
99114
- name: Initialization
100115
run: | # without adding the safe.directory cmake fails to do git log -1 --date=short --format=%cd
101116
bash /sysroot/root/entry_point.sh

.github/workflows/clt_nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
steps:
149149
- name: Checkout repository
150150
uses: actions/checkout@v3
151-
- uses: manticoresoftware/[email protected].3
151+
- uses: manticoresoftware/[email protected].5
152152
with:
153153
test_prefix: ${{ matrix.test_prefix }}
154154
image: ${{ matrix.image }}
@@ -237,7 +237,7 @@ jobs:
237237
steps:
238238
- name: Checkout repository
239239
uses: actions/checkout@v3
240-
- uses: manticoresoftware/[email protected].3
240+
- uses: manticoresoftware/[email protected].5
241241
with:
242242
test_prefix: ${{ matrix.test_prefix }}
243243
image: ${{ matrix.image }}

.github/workflows/clt_tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ jobs:
5454
test_prefix: test/clt-tests/sharding/
5555
- name: Indexer
5656
test_prefix: test/clt-tests/indexer/
57+
- name: Kibana
58+
test_prefix: test/clt-tests/kibana/
5759
steps:
58-
- uses: manticoresoftware/[email protected].3
60+
- uses: manticoresoftware/[email protected].5
5961
with:
6062
artifact: ${{ inputs.artifact_name }}
6163
image: ${{ inputs.docker_image }}

.github/workflows/nightly_dumps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v4
34-
- uses: manticoresoftware/[email protected].3
34+
- uses: manticoresoftware/[email protected].5
3535
with:
3636
image: manticoresearch/dind:v1
3737
test_prefix: test/clt-tests/mysqldump/versions/
@@ -43,7 +43,7 @@ jobs:
4343
steps:
4444
- name: Checkout
4545
uses: actions/checkout@v4
46-
- uses: manticoresoftware/[email protected].3
46+
- uses: manticoresoftware/[email protected].5
4747
with:
4848
image: manticoresearch/dind:v1
4949
test_prefix: test/clt-tests/migration-es-ms/

.github/workflows/nightly_memleaks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Nightly memleak tests
2-
run-name: 🌙 Nightly memleak tests ${{ github.sha }}
1+
name: Nightly valgrind checks
2+
run-name: 🌙 Nightly valgrind checks ${{ github.sha }}
33

44
on:
55
schedule:

.github/workflows/pack_publish.yml

Lines changed: 79 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ on:
2121
- 'manual/**'
2222
- 'cmake/GetGALERA.cmake'
2323
- 'galera_packaging/**'
24+
tags:
25+
- 'release*'
2426

2527
# cancels the previous workflow run when a new one appears in the same branch (e.g. master or a PR's branch)
2628
concurrency:
@@ -64,6 +66,16 @@ jobs:
6466
pack:
6567
name: OK to pack?
6668
runs-on: ubuntu-22.04
69+
permissions:
70+
contents: write
71+
pull-requests: read
72+
outputs:
73+
version: ${{ steps.semver-tagger.outputs.version }}
74+
version_full: ${{ steps.semver-tagger.outputs.version_full }}
75+
version_rpm: ${{ steps.semver-tagger.outputs.version_rpm }}
76+
version_deb: ${{ steps.semver-tagger.outputs.version_deb }}
77+
target: ${{ steps.semver-tagger.outputs.target }}
78+
should_continue: ${{ steps.check-should-continue.outputs.should_continue }}
6779
if: |
6880
(
6981
github.event_name == 'pull_request'
@@ -95,18 +107,45 @@ jobs:
95107
)
96108
)
97109
steps:
98-
- run: echo "All set to build packages"
110+
- name: Checkout repository
111+
uses: actions/checkout@v3
112+
with:
113+
fetch-depth: 0
114+
- name: Update version
115+
id: semver-tagger
116+
uses: manticoresoftware/semver-tagger-action@main
117+
with:
118+
github_token: ${{ secrets.GITHUB_TOKEN }}
119+
ignore_patterns: '\.md$|^test/|^manual/|\.clt|\.github|\.patterns|\.yml|\.gitignore'
120+
- name: Check if we should continue packing
121+
id: check-should-continue
122+
run: |
123+
# Continue if version was updated or if we have the "pack" label on PR
124+
if [[ "${{ steps.semver-tagger.outputs.version_updated }}" == "true" ]]; then
125+
echo "Continuing because version was updated"
126+
echo "should_continue=true" >> $GITHUB_OUTPUT
127+
elif [[ "${{ github.event_name }}" == "pull_request" && "${{ contains(github.event.pull_request.labels.*.name, 'pack') }}" == "true" ]]; then
128+
echo "Continuing because PR has 'pack' label"
129+
echo "should_continue=true" >> $GITHUB_OUTPUT
130+
else
131+
echo "Skipping packing because version wasn't updated and there's no 'pack' label"
132+
echo "should_continue=false" >> $GITHUB_OUTPUT
133+
fi
99134
- run: |
100-
echo '# Packing and publishing all for commit ${{ github.sha }}' >> $GITHUB_STEP_SUMMARY
101-
echo '* Commit URL: [${{ github.sha }}](/${{ github.repository }}/commit/${{ github.sha }})' >> $GITHUB_STEP_SUMMARY
102-
echo '* Initiated by: [@${{ github.actor }}](https://github.com/${{ github.actor }})' >> $GITHUB_STEP_SUMMARY
103-
echo '* Ref: ${{ github.ref_type }} "${{ github.ref_name }}"' >> $GITHUB_STEP_SUMMARY
104-
echo '* Attempt: ${{ github.run_attempt }}' >> $GITHUB_STEP_SUMMARY
135+
echo "# Packing and publishing all for commit ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
136+
echo "* Commit URL: [${{ github.sha }}](/${{ github.repository }}/commit/${{ github.sha }})" >> $GITHUB_STEP_SUMMARY
137+
echo "* Initiated by: [@${{ github.actor }}](https://github.com/${{ github.actor }})" >> $GITHUB_STEP_SUMMARY
138+
echo "* Ref: ${{ github.ref_type }} \"${{ github.ref_name }}\"" >> $GITHUB_STEP_SUMMARY
139+
echo "* Attempt: ${{ github.run_attempt }}" >> $GITHUB_STEP_SUMMARY
140+
echo "* Version updated: ${{ steps.semver-tagger.outputs.version_updated }}" >> $GITHUB_STEP_SUMMARY
141+
echo "* Should continue packing: ${{ steps.check-should-continue.outputs.should_continue }}" >> $GITHUB_STEP_SUMMARY
142+
105143
106144
pack_debian_ubuntu:
107145
name: Debian/Ubuntu packages
108146
uses: ./.github/workflows/build_template.yml
109147
needs: [pack, check_branch]
148+
if: needs.pack.outputs.should_continue == 'true'
110149
strategy:
111150
fail-fast: false
112151
matrix:
@@ -124,11 +163,14 @@ jobs:
124163
cmake --build . --target package
125164
cache_key: pack_${{ matrix.DISTR }}_${{ matrix.arch }}
126165
artifact_list: "build/manticore*deb"
166+
version: ${{ needs.pack.outputs.version }}
167+
build_tag: ${{ needs.pack.outputs.target == 'dev' && 'dev' || '' }}
127168

128169
pack_rhel:
129170
name: RHEL packages
130171
uses: ./.github/workflows/build_template.yml
131172
needs: [pack, check_branch]
173+
if: needs.pack.outputs.should_continue == 'true'
132174
strategy:
133175
fail-fast: false
134176
matrix:
@@ -149,11 +191,14 @@ jobs:
149191
cmake --build . --target package
150192
cache_key: pack_${{ matrix.DISTR }}_${{ matrix.arch }}
151193
artifact_list: "build/manticore*rpm"
194+
version: ${{ needs.pack.outputs.version }}
195+
build_tag: ${{ needs.pack.outputs.target == 'dev' && 'dev' || '' }}
152196

153197
pack_macos:
154198
name: MacOS packages
155199
uses: ./.github/workflows/build_template.yml
156200
needs: [pack, check_branch]
201+
if: needs.pack.outputs.should_continue == 'true'
157202
strategy:
158203
fail-fast: false
159204
matrix:
@@ -172,11 +217,14 @@ jobs:
172217
cmake --build . --target package
173218
cache_key: pack_${{ matrix.DISTR }}_${{ matrix.arch }}
174219
artifact_list: "build/manticore*tar.gz"
220+
version: ${{ needs.pack.outputs.version }}
221+
build_tag: ${{ needs.pack.outputs.target == 'dev' && 'dev' || '' }}
175222

176223
pack_windows:
177224
name: Windows x64 package
178225
uses: ./.github/workflows/build_template.yml
179226
needs: [pack, check_branch]
227+
if: needs.pack.outputs.should_continue == 'true'
180228
with:
181229
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
182230
DISTR: windows
@@ -191,10 +239,13 @@ jobs:
191239
cmake --build . --target package
192240
cache_key: pack_windows_x64
193241
artifact_list: "build/manticore*exe build/manticore*zip"
194-
242+
version: ${{ needs.pack.outputs.version }}
243+
build_tag: ${{ needs.pack.outputs.target == 'dev' && 'dev' || '' }}
244+
195245
build_nsis:
196246
name: Making Windows NSIS installer
197-
needs: pack_windows
247+
needs: [pack_windows, pack]
248+
if: needs.pack.outputs.should_continue == 'true'
198249
runs-on: ubuntu-22.04
199250
container:
200251
image: manticoresearch/build_nsis:1.0.0
@@ -203,14 +254,17 @@ jobs:
203254
steps:
204255
- name: Checkout repository # We have to checkout to access .github/workflows/ in further steps
205256
uses: actions/checkout@v3
257+
- name: Patch version
258+
run: |
259+
sed -i "s/0\.0\.0/${{ needs.pack.outputs.version }}/g" src/sphinxversion.h.in
206260
- name: Initialization
207261
# without adding the safe.directory the script fails to do git show ...
208262
run: git config --global --add safe.directory /__w/manticoresearch/manticoresearch
209263
- name: Make installer
210264
# TODO: remove the hardcoded paths /builds/ below
211265
run: |
212266
mkdir -p /builds/manticoresearch/dev/build/
213-
/bin/bash dist/build_dockers/nsis/nsis_src_parser.sh
267+
/bin/bash dist/build_dockers/nsis/nsis_src_parser.sh ${{ needs.pack.outputs.target }}
214268
shell: bash
215269
- run: mv /builds/manticoresearch/dev/build build
216270
- name: Upload artifact
@@ -236,7 +290,7 @@ jobs:
236290
- run: echo "Ready to publish"
237291

238292
publish_debian_ubuntu:
239-
needs: publish
293+
needs: [publish, pack]
240294
strategy:
241295
fail-fast: true
242296
matrix:
@@ -253,9 +307,10 @@ jobs:
253307
artifact: build_${{ matrix.DISTR }}_RelWithDebInfo_${{ matrix.arch }}
254308
type: deb
255309
delimiter: "-"
310+
target: ${{ needs.pack.outputs.target }}
256311

257312
publish_rhel:
258-
needs: publish
313+
needs: [publish, pack]
259314
strategy:
260315
fail-fast: true
261316
matrix:
@@ -272,10 +327,11 @@ jobs:
272327
artifact: build_rhel${{ matrix.DISTR }}_RelWithDebInfo_${{ matrix.arch }}
273328
type: rpm
274329
delimiter: "_"
330+
target: ${{ needs.pack.outputs.target }}
275331

276332
publish_macos:
277333
name: Publishing MacOS
278-
needs: publish
334+
needs: [publish, pack]
279335
strategy:
280336
fail-fast: true
281337
matrix:
@@ -290,10 +346,11 @@ jobs:
290346
artifact: build_macos_RelWithDebInfo_${{ matrix.arch }}
291347
type: arc
292348
delimiter: "-"
349+
target: ${{ needs.pack.outputs.target }}
293350

294351
publish_windows:
295352
name: Publishing Windows packages to repo.manticoresearch.com
296-
needs: publish
353+
needs: [publish, pack]
297354
runs-on: ubuntu-22.04
298355
steps:
299356
- uses: manticoresoftware/publish_to_repo@main
@@ -304,10 +361,11 @@ jobs:
304361
artifact: build_windows_RelWithDebInfo_x64
305362
type: arc
306363
delimiter: "-"
364+
target: ${{ needs.pack.outputs.target }}
307365

308366
publish_nsis:
309367
name: Publishing Windows NSIS installer
310-
needs: publish_windows
368+
needs: [publish_windows, publish, pack]
311369
runs-on: ubuntu-22.04
312370
steps:
313371
- uses: manticoresoftware/publish_to_repo@main
@@ -318,10 +376,11 @@ jobs:
318376
artifact: win_installer
319377
type: arc
320378
delimiter: "-"
379+
target: ${{ needs.pack.outputs.target }}
321380

322381
build_docker:
323382
name: Building and pushing docker
324-
needs: publish_debian_ubuntu
383+
needs: [publish_debian_ubuntu, pack]
325384
runs-on: ubuntu-22.04
326385
env:
327386
DOCKER_USER: ${{ secrets.DOCKER_USER }}
@@ -331,6 +390,9 @@ jobs:
331390
steps:
332391
- name: Checkout repository # We have to checkout to access .github/workflows/ in further steps
333392
uses: actions/checkout@v3
393+
- name: Patch version
394+
run: |
395+
sed -i "s/0\.0\.0/${{ needs.pack.outputs.version }}/g" src/sphinxversion.h.in
334396
- name: Calculate short commit hash
335397
id: sha
336398
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
@@ -350,7 +412,7 @@ jobs:
350412
image: [ "centos:7", "almalinux:8", "almalinux:9", "oraclelinux:9", "amazonlinux:latest" ]
351413
runs-on: ubuntu-22.04
352414
steps:
353-
- uses: manticoresoftware/[email protected].3
415+
- uses: manticoresoftware/[email protected].5
354416
with:
355417
image: ${{ matrix.image }}
356418
test_prefix: test/clt-tests/installation/rhel-dev-
@@ -365,7 +427,7 @@ jobs:
365427
image: [ "ubuntu:bionic", "ubuntu:focal", "ubuntu:jammy", "debian:buster", "debian:bullseye", "debian:bookworm" ]
366428
runs-on: ubuntu-22.04
367429
steps:
368-
- uses: manticoresoftware/[email protected].3
430+
- uses: manticoresoftware/[email protected].5
369431
with:
370432
image: ${{ matrix.image }}
371433
test_prefix: test/clt-tests/installation/deb-dev-

.github/workflows/pack_publish_galera.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
image: [ "centos:7", "almalinux:8", "almalinux:9", "oraclelinux:9", "amazonlinux:latest" ]
206206
runs-on: ubuntu-22.04
207207
steps:
208-
- uses: manticoresoftware/[email protected].3
208+
- uses: manticoresoftware/[email protected].5
209209
with:
210210
image: ${{ matrix.image }}
211211
test_prefix: test/clt-tests/installation/rhel-dev-
@@ -219,7 +219,7 @@ jobs:
219219
image: [ "ubuntu:bionic", "ubuntu:focal", "ubuntu:jammy", "debian:buster", "debian:bullseye", "debian:bookworm" ]
220220
runs-on: ubuntu-22.04
221221
steps:
222-
- uses: manticoresoftware/[email protected].3
222+
- uses: manticoresoftware/[email protected].5
223223
with:
224224
image: ${{ matrix.image }}
225225
test_prefix: test/clt-tests/installation/deb-dev-

.github/workflows/test_template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ jobs:
130130
files: build/junit*.xml
131131
compare_to_earlier_commit: false
132132
comment_mode: failures
133-
133+

.github/workflows/win_test_template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
id: test
7878
# --timeout may be not working https://gitlab.kitware.com/cmake/cmake/-/issues/23979
7979
# Add -VV to ctest to display extra debug info
80-
run: ctest -V -S misc/ctest/gltest.cmake --no-compress-output --timeout 600
80+
run: ctest -VV -S misc/ctest/gltest.cmake --no-compress-output --timeout 600
8181
continue-on-error: true
8282
- name: Remember status
8383
if: always()
@@ -96,4 +96,4 @@ jobs:
9696
uses: manticoresoftware/upload_artifact_with_retries@v4
9797
with:
9898
name: ${{ inputs.artifact_name }}
99-
path: "build/xml* build/test_*/test_*/report* build/test_*/error*.txt build/test_*/*log build/status*"
99+
path: "build/xml* build/test_*/test_*/report* build/test_*/error*.txt build/test_*/*log build/status*"

.patterns

Whitespace-only changes.

0 commit comments

Comments
 (0)