Skip to content

Commit

Permalink
Merge branch 'main' into mc/thread-safe-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
mchenani authored Dec 16, 2024
2 parents 7189666 + 567751f commit 3098288
Show file tree
Hide file tree
Showing 49 changed files with 1,039 additions and 277 deletions.
1 change: 1 addition & 0 deletions .cargo/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[profile.default]
retries = 3
default-filter = "not test(test_stream_all_messages_does_not_lose_messages)"
1 change: 1 addition & 0 deletions .github/workflows/lint-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- "xmtp_mls/**"
- "xmtp_proto/**"
- "xmtp_v2/**"
- "xmtp_debug/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/push-xbg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Push XDBG Image

on:
push:
branches:
- main

workflow_dispatch:

jobs:
push_to_registry:
name: Push Docker Image to GitHub Packages
runs-on: warp-ubuntu-latest-x64-16x
permissions:
contents: read
packages: write
outputs:
digest: ${{ steps.push.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/xdbg
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6
id: push
with:
context: .
file: ./dev/xdbg/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions .github/workflows/test-http-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: build tests
run: cargo nextest run --no-run --tests --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api
run: cargo nextest run --config-file ".cargo/nextest.toml" --no-run --tests --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api
- name: cargo test
run: cargo nextest run --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api --test-threads 2
run: cargo nextest run --config-file ".cargo/nextest.toml" --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api --test-threads 2
52 changes: 27 additions & 25 deletions Cargo.lock

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

18 changes: 13 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ members = [
"xtask",
"xmtp_debug",
"xmtp_content_types",
"common"
"common",
]

# Make the feature resolver explicit.
Expand Down Expand Up @@ -75,7 +75,6 @@ bincode = "1.3"
console_error_panic_hook = "0.1"
const_format = "0.2"
diesel = { version = "2.2", default-features = false }
diesel-wasm-sqlite = "0.0.1"
diesel_migrations = { version = "2.2", default-features = false }
dyn-clone = "1"
fdlimit = "0.3"
Expand All @@ -87,6 +86,7 @@ libsqlite3-sys = { version = "0.29", features = [
openssl = { version = "0.10", features = ["vendored"] }
openssl-sys = { version = "0.9", features = ["vendored"] }
parking_lot = "0.12.3"
sqlite-web = "0.0.1"
tonic = { version = "0.12", default-features = false }
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3", default-features = false }
Expand All @@ -97,21 +97,29 @@ wasm-bindgen-futures = "0.4"
wasm-bindgen-test = "0.3.49"
web-sys = "0.3"
zeroize = "1.8"
criterion = { version = "0.5", features = [
"html_reports",
"async_tokio",
]}
once_cell = "1.2"

# Internal Crate Dependencies
xmtp_api_grpc = { path = "xmtp_api_grpc" }
xmtp_common = { path = "common" }
xmtp_content_types = { path = "xmtp_content_types" }
xmtp_cryptography = { path = "xmtp_cryptography" }
xmtp_id = { path = "xmtp_id" }
xmtp_mls = { path = "xmtp_mls" }
xmtp_proto = { path = "xmtp_proto" }
xmtp_content_types = { path = "xmtp_content_types" }
xmtp_common = { path = "common" }

[profile.dev]
# Disabling debug info speeds up builds a bunch,
# and we don't rely on it for debugging that much.
debug = 0

[profile.bench]
debug = true

# Setting opt-level to 3 for proc macros/build scripts
# speeds up buildtime
[profile.dev.build-override]
Expand Down Expand Up @@ -147,6 +155,6 @@ opt-level = "s"
# (cfg-specific patche support does not exist)
[patch.crates-io]
diesel = { git = "https://github.com/diesel-rs/diesel", branch = "master" }
diesel-wasm-sqlite = { git = "https://github.com/xmtp/sqlite-web-rs", branch = "main" }
diesel_derives = { git = "https://github.com/diesel-rs/diesel", branch = "master" }
diesel_migrations = { git = "https://github.com/diesel-rs/diesel", branch = "master" }
sqlite-web = { git = "https://github.com/xmtp/sqlite-web-rs", branch = "main" }
14 changes: 14 additions & 0 deletions bindings_ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ xmtp_user_preferences = { path = "../xmtp_user_preferences" }
xmtp_v2 = { path = "../xmtp_v2" }
xmtp_common.workspace = true

# Bench
criterion = { workspace = true, optional = true }
fdlimit = { version = "0.3", optional = true}


[target.'cfg(target_os = "android")'.dependencies]
paranoid-android = "0.2"

Expand All @@ -47,3 +52,12 @@ uuid = { workspace = true, features = ["v4", "fast-rng"] }
xmtp_api_grpc = { path = "../xmtp_api_grpc", features = ["test-utils"] }
xmtp_mls = { path = "../xmtp_mls", features = ["test-utils"] }
xmtp_proto = { path = "../xmtp_proto", features = ["test-utils"] }

[features]
bench = ["xmtp_mls/bench", "xmtp_common/bench", "dep:criterion", "dep:fdlimit"]

[[bench]]
harness = false
name = "create_client"
required-features = ["bench"]

Loading

0 comments on commit 3098288

Please sign in to comment.