diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 000000000..4fa1aa87e --- /dev/null +++ b/.cirrus.yml @@ -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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index dab2347cb..3949c6d62 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 7e1dbdd6d..e193ded29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.ci b/Dockerfile.ci index 8639cf726..d91ad2f9e 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -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 .