Skip to content

Commit 3ee89e9

Browse files
committed
reverted b34ff78
1 parent 7c23c97 commit 3ee89e9

File tree

2 files changed

+246
-1
lines changed

2 files changed

+246
-1
lines changed

.github/workflows/test.yml

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,251 @@ jobs:
125125
wget https://repo.manticoresearch.com/repository/ci/boost_1_75_0.tgz
126126
tar -xf boost_1_75_0.tgz
127127
128+
build_linux_debug:
129+
if: (needs.changes.outputs.source == 'true') && (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
130+
needs: [changes, check_branch]
131+
name: Linux debug build
132+
uses: ./.github/workflows/build_template.yml
133+
with:
134+
CTEST_CONFIGURATION_TYPE: "Debug"
135+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
136+
artifact_name: debug_build
137+
cache_key: build_linux_debug_x86_64
138+
cmake_command: |
139+
export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
140+
ctest -VV -S misc/ctest/gltest.cmake --no-compress-output
141+
142+
test_linux_debug:
143+
if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
144+
name: Linux debug mode tests
145+
needs: [build_linux_debug, check_branch]
146+
uses: ./.github/workflows/test_template.yml
147+
with:
148+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
149+
build_artifact_name: debug_build
150+
artifact_name: debug_test_results
151+
results_name: "Linux debug test results"
152+
timeout: 10
153+
154+
build_linux_release:
155+
if: (needs.changes.outputs.source == 'true') && (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
156+
needs: [changes, check_branch]
157+
name: Linux release build
158+
uses: ./.github/workflows/build_template.yml
159+
with:
160+
artifact_name: release_build
161+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
162+
cache_key: build_linux_release_x86_64
163+
cmake_command: |
164+
export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
165+
ctest -VV -S misc/ctest/gltest.cmake --no-compress-output
166+
167+
test_linux_release:
168+
if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
169+
name: Linux release mode tests
170+
needs: [build_linux_release, check_branch]
171+
uses: ./.github/workflows/test_template.yml
172+
with:
173+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
174+
build_artifact_name: release_build
175+
artifact_name: release_test_results
176+
results_name: "Linux release test results"
177+
timeout: 10
178+
179+
180+
pack_jammy_cache_check:
181+
needs: changes
182+
name: Jammy x86_64 package [check cache]
183+
runs-on: ubuntu-22.04
184+
outputs:
185+
cache-key: ${{ steps.generate-key.outputs.cache-key }}
186+
cache-hit: ${{ steps.cache.outputs.cache-hit }}
187+
steps:
188+
- name: Checkout code
189+
uses: actions/checkout@v3
190+
191+
- name: Generate cache key
192+
id: generate-key
193+
run: |
194+
if [ "${{ github.event_name }}" == "pull_request" ]; then
195+
branch=${{ github.head_ref }}
196+
else
197+
branch=$(git rev-parse --abbrev-ref HEAD)
198+
fi
199+
cache_key="jammy-build-${branch}"
200+
echo "cache-key=${cache_key}" >> $GITHUB_OUTPUT
201+
202+
- name: Set up cache
203+
id: cache
204+
uses: actions/cache@v4
205+
with:
206+
path: build
207+
key: ${{ steps.generate-key.outputs.cache-key }}
208+
209+
- name: Override cache hit
210+
id: override-cache-hit
211+
run: |
212+
if [ "${{ needs.changes.outputs.source }}" == "true" ]; then
213+
echo "cache-hit=false" >> $GITHUB_OUTPUT
214+
fi
215+
216+
- name: Upload build artifacts from cache
217+
if: ${{ steps.override-cache-hit.outputs.cache-hit == 'true' }}
218+
uses: manticoresoftware/upload_artifact_with_retries@v4
219+
with:
220+
name: build_jammy_RelWithDebInfo_x86_64
221+
path: "build/manticore*deb"
222+
223+
pack_jammy:
224+
needs: [pack_jammy_cache_check, changes, check_branch]
225+
if: |
226+
needs.pack_jammy_cache_check.outputs.cache-hit != 'true' ||
227+
needs.changes.outputs.source == 'true'
228+
name: Jammy x86_64 package [build]
229+
uses: ./.github/workflows/build_template.yml
230+
with:
231+
DISTR: jammy
232+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
233+
arch: x86_64
234+
cmake_command: |
235+
mkdir build
236+
cd build
237+
cmake -DPACK=1 ..
238+
export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
239+
cmake --build . --target package
240+
cache_key: pack_jammy_x86_64
241+
artifact_list: "build/manticore*deb"
242+
243+
pack_jammy_cache_update:
244+
if: (needs.pack_jammy_cache_check.outputs.cache-hit != 'true') && (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
245+
name: Jammy x86_64 package [update cache]
246+
needs: [pack_jammy, pack_jammy_cache_check]
247+
runs-on: ubuntu-22.04
248+
steps:
249+
- name: Checkout repository # We have to checkout to access .github/workflows/ in further steps
250+
uses: actions/checkout@v3
251+
252+
- name: Download built x86_64 Ubuntu Jammy packages
253+
uses: manticoresoftware/download_artifact_with_retries@v3
254+
continue-on-error: true
255+
with:
256+
name: build_jammy_RelWithDebInfo_x86_64
257+
path: .
258+
259+
- name: Save cache
260+
uses: actions/cache@v4
261+
with:
262+
path: build
263+
key: ${{ needs.pack_jammy_cache_check.outputs.cache-key }}
264+
265+
test_kit_docker_build:
266+
name: Test Kit docker image
267+
needs: [pack_jammy, pack_jammy_cache_check]
268+
if: always() && needs.pack_jammy.result != 'failure'
269+
runs-on: ubuntu-22.04
270+
outputs:
271+
out-build: ${{ steps.build.outputs.build_image }}
272+
steps:
273+
- name: Checkout repository # We have to checkout to access .github/workflows/ in further steps
274+
uses: actions/checkout@v3
275+
- name: Download built x86_64 Ubuntu Jammy packages
276+
uses: manticoresoftware/download_artifact_with_retries@v3
277+
with:
278+
name: build_jammy_RelWithDebInfo_x86_64
279+
path: .
280+
# Uncomment this shortcut for debug to save time by not preparing the packages in the pack_jammy job
281+
# - run: |
282+
# wget http://dev2.manticoresearch.com/build_jammy_RelWithDebInfo_x86_64.zip
283+
# unzip build_jammy_RelWithDebInfo_x86_64.zip
284+
# tar -xvf artifact.tar
285+
- name: Calculate short commit hash
286+
id: sha
287+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
288+
- name: Building docker
289+
id: build
290+
run: |
291+
BUILD_COMMIT=${{ steps.sha.outputs.sha_short }} /bin/bash dist/test_kit_docker_build.sh
292+
echo "build_image=ghcr.io/$REPO_OWNER/manticoresearch:test-kit-${{ steps.sha.outputs.sha_short }}" >> $GITHUB_OUTPUT
293+
- name: Upload docker image artifact
294+
uses: manticoresoftware/upload_artifact_with_retries@v4
295+
with:
296+
name: manticore_test_kit.img
297+
path: manticore_test_kit.img
298+
299+
clt:
300+
if: always() && needs.test_kit_docker_build.result != 'failure'
301+
name: CLT
302+
needs: test_kit_docker_build
303+
uses: ./.github/workflows/clt_tests.yml
304+
secrets:
305+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
306+
VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }}
307+
JINA_API_KEY: ${{ secrets.JINA_API_KEY }}
308+
with:
309+
docker_image: test-kit:img
310+
artifact_name: manticore_test_kit.img
311+
repository: ${{ github.repository }}
312+
ref: ${{ github.sha }}
313+
314+
test_kit_docker_push:
315+
if: always() && needs.changes.outputs.source == 'true'
316+
needs:
317+
- changes
318+
- clt
319+
name: Push Test Kit docker image to repo
320+
runs-on: ubuntu-22.04
321+
env:
322+
GHCR_USER: ${{ vars.GHCR_USER }}
323+
GHCR_PASSWORD: ${{ secrets.GHCR_PASSWORD }}
324+
REPO_OWNER: ${{ github.repository_owner }}
325+
steps:
326+
- name: Checkout repository # We have to checkout to access .github/workflows/ in further steps
327+
uses: actions/checkout@v3
328+
- name: Download artifact
329+
uses: manticoresoftware/download_artifact_with_retries@main
330+
with:
331+
name: manticore_test_kit.img
332+
path: .
333+
- name: Calculate short commit hash
334+
id: sha
335+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
336+
- name: Pushing docker image to repo
337+
id: test-kit-push
338+
run: |
339+
TEST_RESULT=${{ needs.clt.result }} BUILD_COMMIT=${{ steps.sha.outputs.sha_short }} /bin/bash dist/test_kit_docker_push.sh
340+
341+
build_aarch64:
342+
if: (needs.changes.outputs.source == 'true') && (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
343+
needs: [changes, check_branch]
344+
name: Linux aarch64 build
345+
uses: ./.github/workflows/build_template.yml
346+
# Use -VV instead of -V below for more verbose output
347+
with:
348+
arch: aarch64
349+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
350+
cmake_command: |
351+
mkdir build
352+
cd build
353+
export CMAKE_TOOLCHAIN_FILE=$(pwd)/../dist/build_dockers/cross/linux.cmake
354+
ctest -V -S ../misc/ctest/justbuild.cmake -DCTEST_SOURCE_DIRECTORY=.. --no-compress-output
355+
cache_key: build_jammy_aarch64
356+
357+
build_freebsd:
358+
if: (needs.changes.outputs.source == 'true') && (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
359+
needs: [changes, check_branch]
360+
name: FreeBSD x86_64 build
361+
uses: ./.github/workflows/build_template.yml
362+
with:
363+
DISTR: freebsd13
364+
COLUMNAR_LOCATOR: ${{ needs.check_branch.outputs.columnar_locator }}
365+
boost_url_key: none
366+
cmake_command: |
367+
mkdir build
368+
cd build
369+
export CMAKE_TOOLCHAIN_FILE=$(pwd)/../dist/build_dockers/cross/freebsd.cmake
370+
ctest -VV -S ../misc/ctest/justbuild.cmake -DCTEST_SOURCE_DIRECTORY=.. --no-compress-output
371+
cache_key: build_freebsd_x86_64
372+
128373
build_windows:
129374
if: (needs.changes.outputs.source == 'true') && (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'update-buddy-version') != true
130375
needs: [changes, check_branch]

.github/workflows/win_test_template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
CTEST_START: ${{ inputs.CTEST_START }}
3333
CTEST_END: ${{ inputs.CTEST_END }}
3434
# The following is useful to test a specific test, just uncomment it, no need to disable CTEST_START/END
35-
CTEST_REGEX: test_307
35+
# CTEST_REGEX: test_234
3636
NO_BUILD: 1
3737
COLUMNAR_LOCATOR: ${{ inputs.COLUMNAR_LOCATOR }}
3838
steps:

0 commit comments

Comments
 (0)