Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,8 @@ on:
branches:
- master
pull_request:
schedule:
- cron: "0 0 * * *" # once a day

jobs:
build:
name: Build

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
build-args:
[
--locked --no-default-features,
--locked
]
include:
- os: ubuntu-latest
build-args: --locked --features metrics_process

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Install Rust
run: rustup component add rustfmt clippy

- name: Format
run: cargo fmt --all -- --check

- name: Build
run: cargo build ${{ matrix.build-args }} --all

- name: Test
run: cargo test ${{ matrix.build-args }} --all

- name: Clippy
run: cargo clippy -- -D warnings

integration:
name: Integration
runs-on: ubuntu-latest
Expand Down
26 changes: 12 additions & 14 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# The maintainers of electrs are not deeply familiar with Docker, so you should DYOR.
# If you are not familiar with Docker either it's probably be safer to NOT use it.

FROM debian:bookworm-slim as base
FROM debian:bookworm-slim AS base
RUN apt-get update -qqy
RUN apt-get install -qqy librocksdb-dev wget
RUN apt-get install -qqy librocksdb-dev wget git build-essential cmake pkgconf python3 libevent-dev libboost-dev libcapnp-dev capnproto

### Electrum Rust Server ###
FROM base as electrs-build
FROM base AS electrs-build
RUN apt-get install -qqy cargo clang cmake

# Install electrs
Expand All @@ -18,20 +18,18 @@ ENV ROCKSDB_LIB_DIR=/usr/lib
RUN cargo install --locked --path .

### Bitcoin Core ###
FROM base as bitcoin-build
# Download
WORKDIR /build/bitcoin
ARG ARCH=x86_64
ARG BITCOIND_VERSION=28.0
RUN wget -q https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$ARCH-linux-gnu.tar.gz
RUN tar xvf bitcoin-$BITCOIND_VERSION-$ARCH-linux-gnu.tar.gz
RUN mv -v bitcoin-$BITCOIND_VERSION/bin/bitcoind .
RUN mv -v bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli .
FROM base AS bitcoin-build
# Clone
RUN git clone --depth 1 --branch 2025_threadpool_http_server https://github.com/furszy/bitcoin-core
WORKDIR /bitcoin-core
# Build
RUN cmake -B build -DENABLE_WALLET=OFF -DBUILD_GUI=OFF -DBUILD_BENCH=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_GUI_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_UTIL=OFF -DBUILD_TX=OFF -DBUILD_WALLET_TOOL=OFF
RUN cmake --build build

FROM base as result
FROM base AS result
# Copy the binaries
COPY --from=electrs-build /root/.cargo/bin/electrs /usr/bin/electrs
COPY --from=bitcoin-build /build/bitcoin/bitcoind /build/bitcoin/bitcoin-cli /usr/bin/
COPY --from=bitcoin-build /bitcoin-core/build/bin/bitcoind /bitcoin-core/build/bin/bitcoin-cli /usr/bin/
RUN bitcoind -version && bitcoin-cli -version

### Electrum ###
Expand Down
Loading