-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: embedings #74
Open
donhardman
wants to merge
13
commits into
master
Choose a base branch
from
ci/embeddings-lib
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CI: embedings #74
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1e31306
implemented integration with embeddings library
glookka f85ce34
Merge branch 'master' into embeddings
glookka e6afd1d
added support for batching
glookka bb77b12
new interface for embeddings; load embeddings lib on daemon startup
glookka 06605f2
Integrate embedding lib and add building of it to CI
donhardman c2507a5
Add embeddings lib building integration workflow
donhardman cb6ede4
Fix
donhardman f3aca7d
Revert "Fix"
donhardman 63f8965
Fix double underscore
donhardman 5215341
Cd to build before we upload artifact
donhardman 78fcf1b
Try to download in different way
donhardman e0b16f1
Another try
donhardman fd1399d
Change prefix for embeddings artifact
donhardman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,14 +31,17 @@ on: | |
required: false | ||
type: string | ||
default: boost_nov22 | ||
embeddings_artifact: | ||
required: true | ||
type: string | ||
artifact_list: | ||
required: false | ||
type: string | ||
default: "build/columnar/lib_manticore_columnar.so build/secondary/lib_manticore_secondary.so build/_deps/manticore-build/src/searchd build/_deps/manticore-build/src/indexer build/_deps/manticore-build/src/indextool build/_deps/manticore-build/config/*.c build/_deps/manticore-build/config/*.h" | ||
HOMEBREW_PREFIX: | ||
required: false | ||
type: string | ||
default: | ||
default: "" | ||
MANTICORE_LOCATOR: | ||
required: false | ||
type: string | ||
|
@@ -74,10 +77,20 @@ jobs: | |
token: ${{ secrets.GITHUB_TOKEN }} | ||
set-safe-directory: true | ||
|
||
- name: Download embeddings lib | ||
uses: manticoresoftware/download_artifact_with_retries@v2 | ||
continue-on-error: true | ||
with: | ||
name: ${{ inputs.embeddings_artifact }} | ||
path: ./embeddings-lib/ | ||
|
||
- name: Initialization | ||
run: | # without adding the safe.directory cmake fails to do git log -1 --date=short --format=%cd | ||
bash /sysroot/root/entry_point.sh | ||
git config --global --add safe.directory /__w/columnar/columnar | ||
mkdir -p embeddings/target/release | ||
mv ./embeddings-lib/build/* embeddings/target/release/ | ||
rm -fr ./embeddings-lib | ||
|
||
- name: Check out main cache before building | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Embeddings Build Template | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
runner: | ||
required: false | ||
type: string | ||
default: "ubuntu-22.04" | ||
distr: | ||
required: true | ||
type: string | ||
arch: | ||
required: true | ||
type: string | ||
artifact_list: | ||
required: false | ||
type: string | ||
default: "target/release/lib*.so" | ||
setup: | ||
required: false | ||
type: string | ||
default: "" | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ inputs.runner }} | ||
defaults: | ||
run: | ||
shell: bash | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Setup | ||
if: ${{ inputs.setup }} | ||
run: | | ||
${{ inputs.setup }} | ||
|
||
- name: Check distribution type | ||
id: vars | ||
run: | | ||
declare -A target_map=( | ||
[linux]="unknown-linux-musl" | ||
[macos]="apple-darwin" | ||
[windows]="pc-windows-msvc" | ||
) | ||
|
||
if [[ -n "${target_map[${{ inputs.distr }}]}" ]]; then | ||
target="${{ inputs.arch }}-${target_map[${{ inputs.distr }}]}" | ||
echo "target=${target}" >> $GITHUB_OUTPUT | ||
else | ||
echo "Unsupported distribution type: ${{ inputs.distr }}" | ||
exit 1 | ||
fi | ||
|
||
lib_dir="./embeddings/target/${target}/release" | ||
echo "lib_dir=${lib_dir}" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
toolchain: stable | ||
target: ${{ steps.vars.outputs.target }} | ||
override: true | ||
- name: Prepare build args | ||
id: params | ||
run: | | ||
args=( | ||
"--target" | ||
"${{ steps.vars.outputs.target }}" | ||
"--lib" | ||
"--release" | ||
"--manifest-path" | ||
"./embeddings/Cargo.toml" | ||
) | ||
echo "args=${args[@]}" >> $GITHUB_OUTPUT | ||
|
||
- name: Build | ||
if: ${{ inputs.distr == 'linux' || inputs.distr == 'macos' }} | ||
run: | | ||
if [[ "${{ inputs.distr }}" == "macos" ]]; then | ||
export CC=o64-clang | ||
export CXX=o64-clang++ | ||
fi | ||
docker run --rm \ | ||
-e CC -e CXX \ | ||
-v $(pwd):/src \ | ||
-w /src \ | ||
joseluisq/rust-linux-darwin-builder:1.83.0 \ | ||
sh -c "cargo build ${{ steps.params.outputs.args }}" | ||
|
||
sudo chown -hR $(id -u):$(id -g) ${{ steps.vars.outputs.lib_dir }} | ||
|
||
- name: Build | ||
if: ${{ inputs.distr == 'windows' }} | ||
run: | | ||
rustup target add ${{ steps.vars.outputs.target }} | ||
cargo build ${{ steps.params.outputs.args }} | ||
|
||
- run: | | ||
mkdir build | ||
lib_dir="${{ steps.vars.outputs.lib_dir }}" | ||
ls -la $lib_dir/* | ||
find $lib_dir -type f \( -name "libmanticoresearch*.a" -o -name "manticoresearch*.lib" \) -ls -exec mv {} ./build \; | ||
|
||
- name: Upload build artifacts | ||
if: success() | ||
uses: manticoresoftware/upload_artifact_with_retries@v2 | ||
with: | ||
name: build_${{ inputs.distr }}_${{ inputs.arch }} | ||
path: ./build/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
visual_wrap = true | ||
max_line_length = 120 | ||
|
||
[*] | ||
indent_style = tab | ||
indent_size = 2 | ||
|
||
[**.yaml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[**.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[**.md] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
target/** | ||
.cache | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we rename the embedding artifact names to distinguish them from the other artifacts not related with embeddings.