Skip to content
Merged
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
6 changes: 5 additions & 1 deletion .github/actions/ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ runs:
sudo apt-get install -yqq --no-install-recommends \
libclang-dev \
clang \
protobuf-compiler
protobuf-compiler \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
libc6-dev-arm64-cross
rustup update
rustup target add wasm32-unknown-unknown
rustup target add aarch64-unknown-linux-gnu
rustup component add rustfmt --toolchain nightly
rustup component add clippy rust-src
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quantus-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
path: source_code_for_build

- name: Build and push Docker image from Dockerfile
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./source_code_for_build
file: ./Dockerfile
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/quantus-hotfix-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ jobs:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
Expand All @@ -89,6 +91,13 @@ jobs:
if: runner.os == 'Windows'
uses: ./.github/actions/windows

- name: Set ARM64 cross-linker
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV

- name: Build quantus-node binary
shell: bash
run: |
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/quantus-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
Expand All @@ -96,6 +98,13 @@ jobs:
if: runner.os == 'Windows'
uses: ./.github/actions/windows

- name: Set ARM64 cross-linker
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV

- name: Build quantus-node binary
shell: bash
run: |
Expand Down
18 changes: 12 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ RUN apt-get update \

# Download the specified pre-built binary from GitHub releases
ARG VERSION_ARG # Expecting format like vX.Y.Z
RUN ARCH="x86_64-unknown-linux-gnu" \
&& echo "Attempting to download version: ${VERSION_ARG} for architecture ${ARCH}" \
&& curl -fsSL "https://github.com/Quantus-Network/chain/releases/download/${VERSION_ARG}/quantus-node-${VERSION_ARG}-${ARCH}.tar.gz" \
| tar -xzC /usr/local/bin/ \
&& chmod +x /usr/local/bin/quantus-node
RUN set -eux; \
DPKG_ARCH="$(dpkg --print-architecture)"; \
case "$DPKG_ARCH" in \
amd64) ARCH="x86_64-unknown-linux-gnu" ;; \
arm64) ARCH="aarch64-unknown-linux-gnu" ;; \
*) echo "Unsupported architecture: $DPKG_ARCH" && exit 1 ;; \
esac; \
echo "Downloading version: ${VERSION_ARG} for architecture: ${ARCH}"; \
curl -fsSL "https://github.com/Quantus-Network/chain/releases/download/${VERSION_ARG}/quantus-node-${VERSION_ARG}-${ARCH}.tar.gz" \
| tar -xzC /usr/local/bin/; \
chmod +x /usr/local/bin/quantus-node
Comment thread
cursor[bot] marked this conversation as resolved.

# Expose P2P and public WS/RPC ports
EXPOSE 30333 9944
Expand All @@ -30,4 +36,4 @@ USER 10001:10001

# Start the node
ENTRYPOINT ["quantus-node"]
CMD ["--chain", "planck_live_spec"]
CMD ["--chain", "planck_live_spec"]
8 changes: 4 additions & 4 deletions Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
FROM rust:bookworm AS builder

# Install dependencies needed for building
# clang-sys requires libclang - libclang-dev provides libclang-14.so in /usr/lib/x86_64-linux-gnu/
RUN apt-get update && \
apt-get install -y cmake clang libclang-dev protobuf-compiler && \
rm -rf /var/lib/apt/lists/*

ENV LIBCLANG_PATH=/usr/lib/x86_64-linux-gnu
# In Debian Bookworm, libclang-dev places the required .so symlink in the llvm-14 folder.
# This path is identical for BOTH Intel (x86_64) and Apple Silicon (ARM64) builds.
ENV LIBCLANG_PATH=/usr/lib/llvm-14/lib

# Add wasm target for runtime compilation
RUN rustup target add wasm32-unknown-unknown
Expand Down Expand Up @@ -49,5 +50,4 @@ RUN useradd --system --uid 10001 quantus \
USER 10001:10001

# Start the node
ENTRYPOINT ["quantus-node"]

ENTRYPOINT ["quantus-node"]
Loading