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
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:

- name: Docker Build
run: DOCKER_BUILDKIT=1 docker build . -f dockerfiles/build_linux --output build

- name: Docker Build Arm64
run: DOCKER_BUILDKIT=1 docker buildx build --platform linux/arm64 . -f dockerfiles/build_linux_arm64 --output ./build/arm64

- name: Docker Build Windows
run: DOCKER_BUILDKIT=1 docker build . -f dockerfiles/build_windows --output ./build/windows
Expand All @@ -42,4 +45,6 @@ jobs:
./build/windows/wart-wallet-windows.exe
./build/windows/wart-node-windows.exe
./build/wart-node-linux
./build/wart-wallet-linux
./build/wart-wallet-linux
./build/arm64/wart-node-linux-arm64
./build/arm64/wart-wallet-linux-arm64
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Docker Release](https://github.com/warthog-network/Warthog/actions/workflows/release.yml/badge.svg)](https://github.com/JulsKawa/Warthog/actions/workflows/release.yml)
[![Docker Release](https://github.com/warthog-network/Warthog/actions/workflows/release.yml/badge.svg)](https://github.com/warthog-network/Warthog/actions/workflows/release.yml)

WARTHOG REFERENCE IMPLEMENTATION
Copyright (c) 2023 - 2024 Pumbaa, Timon & Rafiki
Expand Down Expand Up @@ -103,6 +103,12 @@ To compile from source see below or [here](https://warthog.network/docs/) for a

#### Build for Linux
* Run `DOCKER_BUILDKIT=1 docker build . -f dockerfiles/build_linux --output build` in the repo directory.
#### Build for Linux (ARM64)
* Run `export DOCKER_CLI_EXPERIMENTAL=enabled`
* Run `docker run --rm --privileged docker/binfmt`
* Run `docker buildx create --use --name multi-arch-builder`
* Run `DOCKER_BUILDKIT=1 docker buildx build --platform linux/arm64 . -f dockerfiles/build_linux_arm64 --output ./build/arm64` in the repo.
* ARM64 binaries are located in `./build/arm64` directory.
#### Build for Windows (cross-compilation on Linux)
* Run `DOCKER_BUILDKIT=1 docker build . -f dockerfiles/build_windows --output ./build/windows` in the repo.
* Windows binaries are located in `./build/windows` directory.
Expand Down
19 changes: 19 additions & 0 deletions dockerfiles/build_linux_arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM alpine:3.17.2 AS build
RUN apk add meson libgcc musl-dev gcc g++ upx
COPY . /code
RUN mkdir /build
WORKDIR /code
RUN --mount=type=cache,target=/build LDFLAGS='-static' meson /build/code --default-library static --buildtype=release
WORKDIR /build/code
RUN --mount=type=cache,target=/build ninja
RUN mkdir /install
RUN --mount=type=cache,target=/build DESTDIR=/install meson install
RUN upx /install/usr/local/bin/wart-node

FROM scratch AS export-stage
COPY --from=build install/usr/local/bin/wart-node ./wart-node-linux-arm64
COPY --from=build install/usr/local/bin/wart-wallet ./wart-wallet-linux-arm64

VOLUME ["/warthog/.warthog"]
ENTRYPOINT ["./wart-node-linux-arm64", "--chain-db=/warthog/.warthog/chain.db", "--peers-db=/warthog/.warthog/peers.db"]
EXPOSE 9186 3000