Skip to content

Commit

Permalink
update relase scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
diptanu committed Jul 4, 2024
1 parent 321287a commit 207347f
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 11 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/publish_indexify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@ jobs:
- uses: actions/checkout@v4
- run: rustup toolchain install nightly --component rustfmt
- run: cargo +nightly fmt --check
- run: sudo apt update && sudo apt install protobuf-compiler protobuf-compiler-grpc
- run: cargo install cargo-deb
- run: make package-ui
- run: cargo build --release
- run: cargo deb --no-build --no-strip
- run: make build-release-ubuntu20.04
- run: cargo deb --no-build --no-strip --target x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v4
with:
name: indexify-linux-amd64
path: target/release/indexify
path: target/x86_64-unknown-linux-gnu/release/indexify
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: indexify-deb-linux-amd64
path: target/debian/indexify_*.deb
path: target/x86_64-unknown-linux-gnu/debian/indexify_*.deb
if-no-files-found: error

build-linux-arm64-package:
Expand All @@ -50,7 +48,6 @@ jobs:
- uses: actions/checkout@v4
- run: rustup toolchain install nightly --component rustfmt
- run: cargo +nightly fmt --check
- run: make package-ui
- run: make build-release-aarch64
- run: cargo install cargo-deb
- run: cargo deb --no-build --no-strip --target aarch64-unknown-linux-gnu
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "indexify"
version = "0.1.16"
version = "0.1.17"
edition = "2021"
authors = ["Diptanu Gon Choudhury <[email protected]>"]
license = "Apache-2.0"
Expand Down
7 changes: 7 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ pre-build = [
"chown -R 1000:1000 /.npm"
]

[target.x86_64-unknown-linux-gnu]
dockerfile = "dockerfiles/Dockerfile_20.04.cross"
pre-build = [
"apt-get update && apt-get install --assume-yes build-essential npm curl protobuf-compiler",
"mkdir -p /.npm",
"chown -R 1000:1000 /.npm"
]
[build.env]
passthrough = [
"PYO3_PYTHON=/usr/bin/python3.11",
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ build: ## Build rust application
build-release: ## Build rust release
cargo build --release

build-release-ubuntu20.04:
cargo install cross
cross build --target x86_64-unknown-linux-gnu --release

build-release-aarch64:
cargo install cross
cross build --target aarch64-unknown-linux-gnu --release
Expand Down Expand Up @@ -98,4 +102,4 @@ serve-docs:
cd docs && pip install -r requirements.txt
mkdir -p docs/docs/example_code
cp -r examples/* docs/docs/example_code
cd docs && mkdocs serve
cd docs && mkdocs serve
22 changes: 22 additions & 0 deletions dockerfiles/Dockerfile_20.04.cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM --platform=linux/arm64/v8 python:3.11 AS python

FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
g++-aarch64-linux-gnu \
libc6-dev-arm64-cross git clang

ENV CROSS_TOOLCHAIN_PREFIX=aarch64-linux-gnu-
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \
AR_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \
CC_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc \
CXX_aarch64_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++ \
RUST_TEST_THREADS=1 \
PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"

RUN apt install -y python3.11 python3.11-dev

COPY --from=python /usr/local/lib/ /opt/sysroot/usr/lib/

ENV RUSTFLAGS="-L /opt/sysroot/usr/lib"
4 changes: 2 additions & 2 deletions src/data_manager.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{
collections::HashMap,
collections::{hash_map::DefaultHasher, HashMap},
fmt,
hash::{DefaultHasher, Hash, Hasher},
hash::{Hash, Hasher},
str::FromStr,
sync::Arc,
time::SystemTime,
Expand Down

0 comments on commit 207347f

Please sign in to comment.