Skip to content

Commit

Permalink
build: project
Browse files Browse the repository at this point in the history
build: project

build: project
  • Loading branch information
subotic committed Feb 22, 2025
1 parent fc9a8e2 commit e0eada1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
17 changes: 11 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ COMMIT_HASH := `git log --pretty=format:'%h' -n 1`
GIT_TAG := `git describe --tags --exact-match 2>/dev/null || true`
IMAGE_TAG := if GIT_TAG == "" { CARGO_VERSION + "-" + COMMIT_HASH } else { CARGO_VERSION }
DOCKER_IMAGE := DOCKER_REPO + ":" + IMAGE_TAG
DOCKER_LATEST := DOCKER_REPO + ":latest"

# List all recipes
default:
just --list --unsorted

# Install python requirements
python-install-requirements:
# Install python packages (as defined in pyproject.toml and uv.lock)
install:
uv sync

# Upgrade python packages (uv.lock)
upgrade:
uv lock --upgrade

# Run all fmt and clippy checks
check:
just --check --fmt --unstable
Expand All @@ -28,8 +33,8 @@ fix:
just --fmt --unstable

# Build Rust using maturin
build: python-install-requirements
uv run maturin develop --uv
build: install
uv run maturin develop

# Run ark-resolver Python unit tests which require Rust code
pytest: build
Expand All @@ -49,11 +54,11 @@ clean:

# Build linux/amd64 Docker image locally
docker-build-intel:
docker buildx build --platform linux/amd64 -t {{ DOCKER_IMAGE }} --load .
docker buildx build --platform linux/amd64 -t {{ DOCKER_IMAGE }} -t {{ DOCKER_LATEST }} --load .

# Build linux/arm64 Docker image locally
docker-build-arm:
docker buildx build --platform linux/arm64 -t {{ DOCKER_IMAGE }} --load .
docker buildx build --platform linux/arm64 -t {{ DOCKER_IMAGE }} -t {{ DOCKER_LATEST }} --load .

# Build and push linux/amd64 and linux/arm64 Docker images to Docker hub
docker-publish-intel:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies = [
"httptools",
"httpx",
"idna",
"maturin == 1.7.8",
"maturin",
"multidict",
"opentelemetry-api",
"opentelemetry-sdk",
Expand All @@ -45,6 +45,7 @@ dependencies = [
]
[dependency-groups]
dev = [
"maturin",
"pytest",
"black",
"flake8",
Expand Down
32 changes: 17 additions & 15 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e0eada1

Please sign in to comment.