Skip to content

Commit

Permalink
Use nightly cargo and enable arm64 builds again
Browse files Browse the repository at this point in the history
  • Loading branch information
knorrium committed Nov 11, 2024
1 parent cb79811 commit 760944c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:
- name: Checkout project
uses: actions/checkout@v3

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# id: qemu
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
id: qemu

- name: Setup Docker buildx action
uses: docker/setup-buildx-action@v3
Expand All @@ -90,7 +90,7 @@ jobs:
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64 \
--platform linux/amd64,linux/arm64 \
--tag ${{ secrets.DOCKER_HUB_USER }}/electrs:$TAG \
--tag ${{ secrets.DOCKER_HUB_USER }}/electrs:latest \
--output "type=registry" . \
Expand Down
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
FROM debian:bookworm-slim AS base

ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

RUN apt update -qy
RUN apt install -qy librocksdb-dev
RUN apt install -qy librocksdb-dev curl

FROM base as build

RUN apt install -qy git cargo clang cmake
RUN apt install -qy git clang cmake

ENV RUSTUP_HOME=/rust
ENV CARGO_HOME=/cargo
ENV PATH=/cargo/bin:/rust/bin:$PATH

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly

WORKDIR /build
COPY . .

RUN cargo build --release --bin electrs
RUN cargo +nightly build --release -Z sparse-registry --bin electrs

FROM base as deploy

Expand Down

0 comments on commit 760944c

Please sign in to comment.