1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-22 14:33:09 +01:00

Add Cirrus CI for ARM & x86 builds (#896)

This commit is contained in:
Roman Zeyde 2023-06-28 18:39:15 +03:00 committed by GitHub
parent c473556401
commit dd21df19db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 17 deletions

42
.cirrus.yml Normal file
View file

@ -0,0 +1,42 @@
# task:
# name: test [x86]
# container:
# image: rust:1.63.0
# cpu: 8
# memory: 15G
# registry_cache:
# folder: $CARGO_HOME/registry
# fingerprint_script: cat Cargo.lock
# target_cache:
# folder: target
# fingerprint_script:
# - rustc --version
# - cat Cargo.lock
# build_script:
# - apt-get update
# - apt-get install -qqy clang
# - rustup component add clippy rustfmt
# - cargo build --all --locked
# test_script:
# - cargo test --all --locked
# - cargo clippy -- -D warnings
# - cargo fmt --all -- --check
# before_cache_script: rm -rf $CARGO_HOME/registry/index
task:
name: integration [ARM]
arm_container:
dockerfile: Dockerfile.ci
docker_arguments:
ARCH: aarch64
test_script:
tests/run.sh
task:
name: integration [x86]
container:
dockerfile: Dockerfile.ci
docker_arguments:
ARCH: x86_64
test_script:
tests/run.sh

View file

@ -42,15 +42,13 @@ jobs:
- name: Clippy
run: cargo clippy -- -D warnings
integration:
name: Integration
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: docker build -f Dockerfile.ci . --rm -t electrs:tests
- name: Test
run: docker run -v $PWD/contrib/:/contrib -v $PWD/tests/:/tests --rm electrs:tests bash /tests/run.sh
# integration:
# name: Integration
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Build
# run: docker build -f Dockerfile.ci . --rm -t electrs:tests
# - name: Test
# run: docker run -v $PWD/contrib/:/contrib -v $PWD/tests/:/tests --rm electrs:tests bash /tests/run.sh

View file

@ -4,11 +4,11 @@
FROM debian:bookworm-slim as base
RUN apt-get update -qqy
RUN apt-get install -qqy librocksdb-dev curl
RUN apt-get install -qqy librocksdb-dev
### Electrum Rust Server ###
FROM base as electrs-build
RUN apt-get install -qqy cargo clang cmake build-essential
RUN apt-get install -qqy cargo clang cmake
# Install electrs
WORKDIR /build/electrs

View file

@ -8,7 +8,7 @@ RUN apt-get install -qqy librocksdb-dev wget
### Electrum Rust Server ###
FROM base as electrs-build
RUN apt-get install -qqy cargo clang cmake build-essential
RUN apt-get install -qqy cargo clang cmake
# Install electrs
WORKDIR /build/electrs
@ -21,9 +21,10 @@ RUN cargo install --locked --path .
FROM base as bitcoin-build
# Download
WORKDIR /build/bitcoin
ARG ARCH=x86_64
ARG BITCOIND_VERSION=25.0
RUN wget -q https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz
RUN tar xvf bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz
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 .