diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8141838d0..483dd5cb0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 diff --git a/Dockerfile.ci b/Dockerfile.ci index 18806c7f1..42894c478 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -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 @@ -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 ###