Skip to content

Commit a723149

Browse files
committed
Merge remote-tracking branch 'ldk-server/main' into ldk-server
2 parents ba16c92 + 0151b43 commit a723149

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+13552
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Continuous Integration Checks
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
platform: [
10+
ubuntu-latest,
11+
macos-latest,
12+
]
13+
toolchain:
14+
[ stable,
15+
beta,
16+
1.85.0, # MSRV, same as ldk-node
17+
]
18+
include:
19+
- toolchain: stable
20+
check-fmt: true
21+
- toolchain: 1.85.0
22+
msrv: true
23+
runs-on: ${{ matrix.platform }}
24+
steps:
25+
- name: Checkout source code
26+
uses: actions/checkout@v3
27+
- name: Install Rust ${{ matrix.toolchain }} toolchain
28+
run: |
29+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
30+
rustup override set ${{ matrix.toolchain }}
31+
if [ "${{ matrix.msrv }}" = "true" ]; then rustup component add clippy; fi
32+
- name: Check formatting
33+
if: matrix.check-fmt
34+
run: rustup component add rustfmt && cargo fmt --all -- --check
35+
- name: Pin packages to allow for MSRV
36+
if: matrix.msrv
37+
run: | # None needed yet
38+
echo "No packages need pinning for MSRV ${{ matrix.toolchain }}"
39+
- name: Build on Rust ${{ matrix.toolchain }}
40+
run: cargo build --verbose --color always
41+
- name: Check clippy if on msrv
42+
if: matrix.msrv
43+
run: cargo clippy --all-features -- -D warnings
44+
- name: Test on Rust ${{ matrix.toolchain }}
45+
run: cargo test
46+
- name: Cargo check release on Rust ${{ matrix.toolchain }}
47+
run: cargo check --release
48+
- name: Cargo check doc on Rust ${{ matrix.toolchain }}
49+
run: cargo doc --release
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Nightly rustfmt
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
schedule:
9+
- cron: "0 0 * * 0" # runs weekly on Sunday at 00:00
10+
workflow_dispatch: # allows manual triggering
11+
jobs:
12+
format:
13+
name: Nightly rustfmt
14+
runs-on: ubuntu-24.04
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: dtolnay/rust-toolchain@nightly
18+
with:
19+
components: rustfmt
20+
- name: Run Nightly rustfmt
21+
# Run the formatter and manually remove trailing whitespace.
22+
run: cargo +nightly fmt && git ls-files -- '*.rs' -z | xargs sed -E -i'' -e 's/[[:space:]]+$//'
23+
- name: Get the current date
24+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
25+
- name: Create Pull Request
26+
uses: peter-evans/create-pull-request@v7
27+
with:
28+
author: Fmt Bot <bot@example.com>
29+
title: Automated nightly rustfmt (${{ env.date }})
30+
body: |
31+
Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
32+
commit-message: ${{ env.date }} automated rustfmt nightly
33+
labels: rustfmt
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: RabbitMQ Integration Tests
2+
3+
on: [ push, pull_request ]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
integration-tests:
11+
runs-on: ubuntu-latest
12+
13+
services:
14+
rabbitmq:
15+
image: rabbitmq:3
16+
env:
17+
RABBITMQ_DEFAULT_USER: guest
18+
RABBITMQ_DEFAULT_PASS: guest
19+
ports:
20+
- 5672:5672
21+
options: >-
22+
--health-cmd "rabbitmqctl node_health_check"
23+
--health-interval 10s
24+
--health-timeout 5s
25+
--health-retries 5
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Run RabbitMQ integration tests
32+
run: cargo test --features integration-tests-events-rabbitmq --verbose --color=always -- --nocapture
33+
env:
34+
RUST_BACKTRACE: 1

ldk-server/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

0 commit comments

Comments
 (0)