Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Luijken committed Jul 24, 2024
2 parents 0c18688 + 02a37a6 commit 898b80b
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 31 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/cargo-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.10/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: cargo update
run: cargo update --manifest-path=stellar_rust_sdk/Cargo.toml
run: cargo update
- name: cargo test
run: |
mkdir -p ./coverage
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test --manifest-path=stellar_rust_sdk/Cargo.toml
grcov . --binary-path ./stellar_rust_sdk/target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o ./coverage/tests.lcov
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test
grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o ./coverage/tests.lcov
- name: Check test coverage
uses: tluijken/code-coverage-threshold@v1
with:
Expand All @@ -55,13 +55,12 @@ jobs:
with:
useConfigFile: true
- name: "Overwrite version numbers"
run: awk 'NR==1,/version = "0.1.0"/{sub(/version = "0.1.0"/, "version = \"'$GitVersion_SemVer'\"")} 1' stellar_rust_sdk/Cargo.toml > stellar_rust_sdk/Cargo.tmp && mv stellar_rust_sdk/Cargo.tmp stellar_rust_sdk/Cargo.toml
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
args: --allow-dirty
path: stellar_rust_sdk
run: |
awk '{gsub(/version = "0.1.0"/, "version = \"'$GitVersion_SemVer'\"")}1' stellar_rust_sdk/Cargo.toml > stellar_rust_sdk/Cargo.tmp && mv stellar_rust_sdk/Cargo.tmp stellar_rust_sdk/Cargo.toml
awk '{gsub(/version = "0.1.0"/, "version = \"'$GitVersion_SemVer'\"")}1' stellar_rust_sdk_derive/Cargo.toml > stellar_rust_sdk_derive/Cargo.tmp && mv stellar_rust_sdk_derive/Cargo.tmp stellar_rust_sdk_derive/Cargo.toml
- name: Publish to crates.io
run: |
cargo publish --token ${CRATES_TOKEN} --allow-dirty --manifest-path=stellar_rust_sdk_derive/Cargo.toml && \
cargo publish --token ${CRATES_TOKEN} --allow-dirty --manifest-path=stellar_rust_sdk/Cargo.toml
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[workspace]
members = [
"stellar_rust_sdk",
"stellar_rust_sdk_derive"
]
resolver = "2"
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 0.3.0
next-version: 0.3.2
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatchTag
assembly-informational-format: '{MajorMinorPatch}{PreReleaseTagWithDash}'
Expand Down
23 changes: 11 additions & 12 deletions stellar_rust_sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stellar-rs"
version = "0.1.0"
edition = "2021"
license = "MIT"
readme = "README.md"
readme = "../README.md"
repository = "https://github.com/Baseflow/stellar-rust-sdk"
documentation = "https://docs.rs/stellar-rs"
homepage = "https://github.com/Baseflow/stellar-rust-sdk"
Expand All @@ -14,22 +14,21 @@ keywords = ["Stellar", "SDK", "Horizon", "Blockchain", "Cryptocurrency"]
categories = [
"cryptography",
"network-programming",
"blockchain",
"cryptocurrency",
"cryptography::cryptocurrencies"
]
autobenches = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
reqwest = { version = "0.11.4", features = ["json"] }
url = "2.2.2"
reqwest = { version = "0.12.5", features = ["json"] }
url = "2.5.2"
tokio = { version = "1.15.0", features = ["full"] }
stellar-xdr = { version = "20.0.0", features = ["base64"] }
serde_json = "1.0.107"
stellar-xdr = { version = "21.2.0", features = ["base64"] }
serde_json = "1.0.120"
serde = { version = "1.0.188", features = ["derive"] }
derive-getters = "0.3.0"
derive-getters = "0.4.0"
hex = "0.4.3"
base64 = "0.21.4"
chrono = "0.4.31"
lazy_static = "1.4.0"
stellar_rust_sdk_derive = { path = "../stellar_rust_sdk_derive" }
base64 = "0.22.1"
chrono = "0.4.38"
lazy_static = "1.5.0"
stellar_rust_sdk_derive = { path = "../stellar_rust_sdk_derive", version = "0.1.0" }
8 changes: 4 additions & 4 deletions stellar_rust_sdk/src/order_book/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ pub mod tests {
use crate::horizon_client;
use crate::order_book::prelude::{Asset, AssetType, DetailsRequest};

const BIDS_N: &u32 = &6;
const BIDS_N: &u32 = &2;
const BIDS_D: &u32 = &1;
const BIDS_PRICE: &str = "6.0000000";
const ASKS_N: &u32 = &7;
const BIDS_PRICE: &str = "2.0000000";
const ASKS_N: &u32 = &5;
const ASKS_D: &u32 = &1;
const ASKS_PRICE: &str = "7.0000000";
const ASKS_PRICE: &str = "5.0000000";
const BASE_ASSET_TYPE: &str = "native";
const BASE_ASSET_CODE: &str = "IOM";
const BASE_ASSET_ISSUER: &str = "GCDE6MVFIOYF7YZCSVA6V7MDCFTNWMIOF5PQU3DWPH27AHNX4ERY6AKS";
Expand Down
17 changes: 16 additions & 1 deletion stellar_rust_sdk_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
name = "stellar_rust_sdk_derive"
version = "0.1.0"
edition = "2021"
license = "MIT"
readme = "../README.md"
repository = "https://github.com/Baseflow/stellar-rust-sdk"
documentation = "https://docs.rs/stellar-rs"
homepage = "https://github.com/Baseflow/stellar-rust-sdk"
description = """
Derive proc-macro's for the Rust SDK for the Stellar network.
"""
keywords = ["Stellar", "SDK", "Horizon", "Blockchain", "Cryptocurrency"]
categories = [
"cryptography",
"network-programming",
"cryptography::cryptocurrencies"
]
autobenches = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -11,4 +26,4 @@ proc-macro2 = "1.0"
syn = "2.0"

[lib]
proc-macro = true
proc-macro = true

0 comments on commit 898b80b

Please sign in to comment.