You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/06/07 08:41:00 UTC
[avro] branch avro-3529-fix-rust-sdk-dist-build-target created (now ba9aabd8c)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a change to branch avro-3529-fix-rust-sdk-dist-build-target
in repository https://gitbox.apache.org/repos/asf/avro.git
at ba9aabd8c AVRO-3529: Rust: Use git-archive to make a source distribution of the Rust SDK
This branch includes the following new commits:
new ba9aabd8c AVRO-3529: Rust: Use git-archive to make a source distribution of the Rust SDK
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[avro] 01/01: AVRO-3529: Rust: Use git-archive to make a source distribution of the Rust SDK
Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch avro-3529-fix-rust-sdk-dist-build-target
in repository https://gitbox.apache.org/repos/asf/avro.git
commit ba9aabd8c77fd183313bcda3dd7b869c68609bd9
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Jun 7 11:38:03 2022 +0300
AVRO-3529: Rust: Use git-archive to make a source distribution of the Rust SDK
Re-order the modules in the main Cargo.toml so that 'cargo ...' commands
are executed in the preferred order.
Export special Rust env vars for better diagnostics for the interop
tasks.
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
lang/rust/Cargo.toml | 4 ++--
lang/rust/build.sh | 20 +++++++++-----------
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/lang/rust/Cargo.toml b/lang/rust/Cargo.toml
index 527bfb3fe..bcda788a7 100644
--- a/lang/rust/Cargo.toml
+++ b/lang/rust/Cargo.toml
@@ -18,6 +18,6 @@
[workspace]
members = [
"avro_test_helper",
- "avro",
- "avro_derive"
+ "avro_derive",
+ "avro"
]
diff --git a/lang/rust/build.sh b/lang/rust/build.sh
index e8f9bf69f..502bd8259 100755
--- a/lang/rust/build.sh
+++ b/lang/rust/build.sh
@@ -20,12 +20,9 @@ set -e # exit on error
build_dir="../../build/rust"
dist_dir="../../dist/rust"
-
function clean {
- if [ -d $build_dir ]; then
- find $build_dir | xargs chmod 755
- rm -rf $build_dir
- fi
+ rm -rf $build_dir
+ rm -rf $dist_dir
}
@@ -49,20 +46,21 @@ do
cargo test
;;
dist)
- cargo build --release --lib --all-features
- cargo package
- mkdir -p ../../dist/rust
- cp target/package/apache-avro-*.crate $dist_dir
+ mkdir -p ${dist_dir}
+ cargo build --release --lib --all-features --workspace
+ git archive --output=apache-avro.tgz HEAD
+ mv apache-avro.tgz ${dist_dir}/
;;
interop-data-generate)
prepare_build
export RUST_LOG=apache_avro=debug
export RUST_BACKTRACE=1
- cargo run --features snappy,zstandard,bzip,xz --example generate_interop_data
+ cargo run --features snappy,zstandard,bzip,xz --example generate_interop_data
;;
-
interop-data-test)
prepare_build
+ export RUST_LOG=apache_avro=debug
+ export RUST_BACKTRACE=1
echo "Running interop data tests"
cargo run --features snappy,zstandard,bzip,xz --example test_interop_data
echo -e "\nRunning single object encoding interop data tests"