Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/offsite/scw-libxmtp' into coda/m…
Browse files Browse the repository at this point in the history
…ls-validation-service
  • Loading branch information
codabrink committed Oct 2, 2024
2 parents bac6571 + c358109 commit 10a7ae4
Show file tree
Hide file tree
Showing 73 changed files with 3,217 additions and 1,308 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/lint-ffi-bindings.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
name: Lint FFI Bindings

on:
push:
branches:
- main

pull_request:
paths:
- "bindings_ffi/**"
- ".github/workflows/lint-ffi-bindings.yaml"
- "rustfmt.toml"

env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update rust toolchains
run: rustup update

- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
bindings_ffi
- name: Run clippy and fail on warnings
run: cargo clippy --manifest-path bindings_ffi/Cargo.toml --all-features --all-targets --no-deps -- -Dwarnings

- name: Run format check
run: cargo fmt --manifest-path bindings_ffi/Cargo.toml --check
3 changes: 2 additions & 1 deletion .github/workflows/lint-node-bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- "bindings_node/**"
- ".github/workflows/lint-node-bindings.yaml"
- "rustfmt.toml"

env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
- "Cargo.lock"
- "rust-toolchain"
- "rustfmt.toml"
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
branches:
- main
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/test-ffi-bindings.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Test FFI Bindings

on:
push:
branches:
- main

pull_request:
# only run tests when related changes are made
paths:
Expand All @@ -21,27 +19,24 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"

env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update rust toolchains
run: rustup update

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
bindings_ffi
- name: Start Docker containers
run: dev/up

- name: Setup Kotlin
run: |
sudo apt update -q
Expand All @@ -50,8 +45,9 @@ jobs:
cd bindings_ffi
make install-jar
echo "$(make echo-jar | tail -n 1 | sed -e 's/\.*export //')" >> "$GITHUB_ENV"
- name: Run cargo test on FFI bindings
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run cargo nextest on FFI bindings
run: |
export CLASSPATH="${{ env.CLASSPATH }}"
cargo test --manifest-path bindings_ffi/Cargo.toml -- --test-threads=2
cargo nextest run --manifest-path bindings_ffi/Cargo.toml --test-threads 2
8 changes: 6 additions & 2 deletions .github/workflows/test-http-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
Expand All @@ -36,5 +38,7 @@ jobs:
.
- name: Start Docker containers
run: dev/up
- name: Run cargo test on main workspace
run: cargo test --workspace --exclude xmtp_api_grpc --features http-api -- --test-threads=2
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run cargo nextest on main workspace
run: cargo nextest run --workspace --exclude xmtp_api_grpc --features http-api --test-threads 2
8 changes: 6 additions & 2 deletions .github/workflows/test-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
Expand All @@ -36,5 +38,7 @@ jobs:
.
- name: Start Docker containers
run: dev/up
- name: Run cargo test on main workspace
run: cargo test -- --test-threads=2
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run cargo nextest on main workspace
run: cargo nextest run --test-threads 2
33 changes: 5 additions & 28 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ futures = "0.3.30"
futures-core = "0.3.30"
getrandom = { version = "0.2", default-features = false }
hex = "0.4.3"
log = { version = "0.4" }
openmls = { git = "https://github.com/xmtp/openmls", rev = "87e7e257d8eb15d6662b104518becfc75ef6db76", default-features = false }
openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "87e7e257d8eb15d6662b104518becfc75ef6db76" }
openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "87e7e257d8eb15d6662b104518becfc75ef6db76" }
Expand All @@ -55,7 +54,7 @@ thiserror = "1.0"
tls_codec = "0.4.1"
tokio = { version = "1.35.1", default-features = false }
tonic = "^0.12"
tracing = { version = "0.1" }
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = "0.3"
url = "2.5.0"

Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ COPY --chown=xmtp:xmtp rust-toolchain .
ENV RUSTUP_PERMIT_COPY_RENAME "yes"

RUN rustup update
RUN curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="rustdev" \
Expand Down
Loading

0 comments on commit 10a7ae4

Please sign in to comment.