Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ jobs:
run: |
rustup toolchain install ${{ matrix.rust-version }}
rustup default ${{ matrix.rust-version }}
- name: Run examples
shell: bash
working-directory: examples
run: |
set -x
METADATA=$( cargo metadata --format-version=1 --no-deps )
EXAMPLES=$( echo "$METADATA" | jq -r '.packages[] | select(.name == "examples") | .targets[].name' | tr -d '\r' )
while read -r example; do
if [ -n "$example" ]; then
echo "Running example: $example"
cargo run --bin "$example"
fi
done <<< "$EXAMPLES"
- name: Setup Java
uses: actions/setup-java@v5
with:
Expand All @@ -96,15 +109,6 @@ jobs:
- name: Run unit tests
shell: bash
run: cargo x test
- name: Run examples
shell: bash
working-directory: examples
run: |
set -x
EXAMPLES=( hll_update )
for example in $EXAMPLES; do
cargo run --bin "$example"
done

required:
name: Required
Expand Down
22 changes: 19 additions & 3 deletions tools/generate_serialization_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ def generate_java_files(workspace_dir, project_dir):

# 4. Clone repository
repo_url = "https://github.com/apache/datasketches-java.git"
run_command(["git", "clone", repo_url, str(temp_dir)])
branch = "9.0.0" # FIXME: temporarily use fixed branch until mvn issue is resolved
run_command([
"git", "clone",
"--depth", "1",
"--branch", branch,
"--single-branch",
repo_url,
str(temp_dir)
])

# 5. Run Maven to generate files
mvn_cmd = ["mvn", "test", "-P", "generate-java-files"]
Expand Down Expand Up @@ -125,7 +133,15 @@ def generate_cpp_files(workspace_dir, project_root):

# 4. Clone repository
repo_url = "https://github.com/apache/datasketches-cpp.git"
run_command(["git", "clone", repo_url, str(temp_dir)])
branch = "master"
run_command([
"git", "clone",
"--depth", "1",
"--branch", branch,
"--single-branch",
repo_url,
str(temp_dir)
])

# 5. Build and Run CMake
build_dir = temp_dir / "build"
Expand All @@ -152,7 +168,7 @@ def generate_cpp_files(workspace_dir, project_root):
files_copied = 0
# Search recursively in build directory for *_cpp.sk
for file_path in build_dir.rglob("*_cpp.sk"):
# Avoid copying from CMakeFiles or other intermediate dirs if possible, but the pattern is specific enough
# Avoid copying from CMakeFiles or other intermediate dirs if possible, but the pattern is specific enough
shutil.copy2(file_path, output_dir)
print(f"Copied: {file_path.name}")
files_copied += 1
Expand Down