mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
.github/workflows/ci.yml: updated dependencies, contrib/docker/*: updated dependencies and minor cleanup
Only Dockerfile.alpine was tested, it works. Rest should also work. NFA, DYOR
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
- name: Install dependencies (Linux)
|
- name: Install dependencies (Linux)
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt -y install jq build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
|
sudo apt -y install jq build-essential clang libclang-dev llvm-dev libudev-dev pkg-config libasound2-dev
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
||||||
- name: Install dependencies (macOS)
|
- name: Install dependencies (macOS)
|
||||||
@@ -67,7 +67,7 @@ jobs:
|
|||||||
- name: Install dependencies (Linux)
|
- name: Install dependencies (Linux)
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt -y install jq build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
|
sudo apt -y install jq build-essential clang libclang-dev llvm-dev libudev-dev pkg-config libasound2-dev
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
||||||
- name: Install dependencies (macOS)
|
- name: Install dependencies (macOS)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Use: docker build . --pull --network=host -t darkfi:alpine -f ./contrib/docker/Dockerfile.alpine
|
# Use: docker build . --pull --network=host -t darkfi:alpine -f ./contrib/docker/Dockerfile.alpine
|
||||||
# optionally with: --build-arg ALPINE_VER=3.17 --build-arg RUST_VER=nightly
|
# optionally with: --build-arg ALPINE_VER=3.18 --build-arg RUST_VER=nightly
|
||||||
|
|
||||||
ARG RUST_VER=1.67
|
ARG RUST_VER=1.70 # 1.67
|
||||||
ARG ALPINE_VER=3.17
|
ARG ALPINE_VER=3.18 # 3.17
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VER} as rust_builder
|
FROM alpine:${ALPINE_VER} as rust_builder
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ RUN apk update
|
|||||||
RUN apk add cmake jq wget clang curl gcc make llvm-dev \
|
RUN apk add cmake jq wget clang curl gcc make llvm-dev \
|
||||||
openssl-dev expat-dev freetype-dev libudev-zero-dev \
|
openssl-dev expat-dev freetype-dev libudev-zero-dev \
|
||||||
libgudev-dev pkgconf clang-dev fontconfig-dev bash \
|
libgudev-dev pkgconf clang-dev fontconfig-dev bash \
|
||||||
ttf-opensans musl-dev
|
ttf-opensans musl-dev alsa-lib-dev
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}" --default-host x86_64-unknown-linux-musl
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}" --default-host x86_64-unknown-linux-musl
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
|||||||
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
RUN cargo search whatever # creates .cargo cache
|
RUN cargo search whatever # creates .cargo cache
|
||||||
|
|
||||||
# 2. stage
|
# 2. stage
|
||||||
FROM rust_builder as builder
|
FROM rust_builder as builder
|
||||||
@@ -37,7 +37,7 @@ RUN make clean
|
|||||||
|
|
||||||
RUN rm -rf ./target/
|
RUN rm -rf ./target/
|
||||||
|
|
||||||
RUN bash -c 'make -j test && make -j'
|
RUN bash -c 'make -j test && make -j'
|
||||||
|
|
||||||
# 3. stage
|
# 3. stage
|
||||||
FROM alpine:${ALPINE_VER}
|
FROM alpine:${ALPINE_VER}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Beware, uses emulation, with AMD 24 threads: Building 7788.3s
|
# Beware, uses emulation, with AMD 24 threads: Building 7788.3s
|
||||||
# Use: docker build . --platform=linux/arm64 --pull -t darkfi:alpine_arm64 -f ./contrib/docker/Dockerfile.alpineARMviaEmulation
|
# Use: docker build . --platform=linux/arm64 --pull -t darkfi:alpine_arm64 -f ./contrib/docker/Dockerfile.alpineARMviaEmulation
|
||||||
# optionally with: --build-arg OS_VER=3.17 --build-arg RUST_VER=nightly
|
# optionally with: --build-arg OS_VER=3.18 --build-arg RUST_VER=nightly
|
||||||
|
|
||||||
ARG RUST_VER=1.67
|
ARG RUST_VER=1.70 # 1.67
|
||||||
ARG OS_VER=3.17
|
ARG OS_VER=3.18 # 3.17
|
||||||
ARG REPOSITORY=arm64v8/alpine
|
ARG REPOSITORY=arm64v8/alpine
|
||||||
|
|
||||||
FROM --platform=$TARGETPLATFORM ${REPOSITORY}:${OS_VER} as rust_builder
|
FROM --platform=$TARGETPLATFORM ${REPOSITORY}:${OS_VER} as rust_builder
|
||||||
@@ -19,7 +19,7 @@ RUN apk update
|
|||||||
RUN apk add cmake jq wget clang curl gcc make llvm-dev \
|
RUN apk add cmake jq wget clang curl gcc make llvm-dev \
|
||||||
openssl-dev expat-dev freetype-dev libudev-zero-dev \
|
openssl-dev expat-dev freetype-dev libudev-zero-dev \
|
||||||
libgudev-dev pkgconf clang-dev fontconfig-dev bash \
|
libgudev-dev pkgconf clang-dev fontconfig-dev bash \
|
||||||
ttf-opensans musl-dev
|
ttf-opensans musl-dev alsa-lib-dev
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
|||||||
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
RUN cargo search whatever # creates .cargo cache
|
RUN cargo search whatever # creates .cargo cache
|
||||||
|
|
||||||
# 2. stage
|
# 2. stage
|
||||||
FROM --platform=$TARGETPLATFORM rust_builder as builder
|
FROM --platform=$TARGETPLATFORM rust_builder as builder
|
||||||
@@ -42,7 +42,7 @@ RUN make clean
|
|||||||
|
|
||||||
RUN rm -rf ./target/
|
RUN rm -rf ./target/
|
||||||
|
|
||||||
RUN bash -c 'make -j test && make -j'
|
RUN bash -c 'make -j test && make -j'
|
||||||
|
|
||||||
# 3. stage
|
# 3. stage
|
||||||
FROM --platform=$TARGETPLATFORM ${REPOSITORY}:${OS_VER}
|
FROM --platform=$TARGETPLATFORM ${REPOSITORY}:${OS_VER}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
|
|
||||||
# Use: docker build . --pull --network=host -t darkfi:debian -f ./contrib/docker/Dockerfile.debian
|
# Use: docker build . --pull --network=host -t darkfi:debian -f ./contrib/docker/Dockerfile.debian
|
||||||
# optionally with: --build-arg BUILD_OS_VER=slim-buster --build-arg RUN_OS_VER=buster-slim --build-arg RUST_VER=1.65
|
# optionally with: --build-arg BUILD_OS_VER=slim-buster --build-arg RUN_OS_VER=buster-slim --build-arg RUST_VER=1.70
|
||||||
# rust nightly with: BUILD_OS_VER=bullseye-slim RUN_OS_VER=bullseye-slim RUST_VER=nightly REPOSITORY=rustlang/rust
|
# rust nightly with: BUILD_OS_VER=bullseye-slim RUN_OS_VER=bullseye-slim RUST_VER=nightly REPOSITORY=rustlang/rust
|
||||||
|
|
||||||
ARG RUST_VER=1.67 # 1.65
|
ARG RUST_VER=1.70 # 1.67
|
||||||
ARG BUILD_OS_VER=slim-bookworm # (12); slim-bullseye (11); slim-buster (10)
|
ARG BUILD_OS_VER=slim-bookworm # (12); slim-bullseye (11); slim-buster (10)
|
||||||
ARG RUN_OS_VER=bookworm-slim # (12); bullseye-slim (11); buster-slim (10)
|
ARG RUN_OS_VER=bookworm-slim # (12); bullseye-slim (11); buster-slim (10)
|
||||||
ARG REPOSITORY=rust # rustlang/rust
|
ARG REPOSITORY=rust # rustlang/rust
|
||||||
|
|
||||||
FROM ${REPOSITORY}:${RUST_VER}-${BUILD_OS_VER} as builder
|
FROM ${REPOSITORY}:${RUST_VER}-${BUILD_OS_VER} as builder
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y build-essential cmake jq wget \
|
RUN apt-get update && apt-get install -y build-essential cmake jq wget \
|
||||||
pkg-config clang libclang-dev llvm-dev libudev-dev libfreetype6-dev \
|
pkg-config clang libclang-dev llvm-dev libudev-dev libfreetype6-dev \
|
||||||
libexpat1-dev curl gcc make libssl-dev fonts-lato libfontconfig-dev
|
libexpat1-dev curl gcc make libssl-dev fonts-lato libfontconfig-dev \
|
||||||
|
libasound2-dev
|
||||||
|
|
||||||
RUN mkdir /opt/darkfi
|
RUN mkdir /opt/darkfi
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ RUN make clean
|
|||||||
|
|
||||||
RUN rm -rf ./target/*
|
RUN rm -rf ./target/*
|
||||||
|
|
||||||
RUN bash -c 'make -j test && make -j all'
|
RUN bash -c 'make -j test && make -j all'
|
||||||
|
|
||||||
# 2. stage
|
# 2. stage
|
||||||
FROM debian:${RUN_OS_VER}
|
FROM debian:${RUN_OS_VER}
|
||||||
@@ -38,4 +38,4 @@ WORKDIR /opt/darkfi
|
|||||||
|
|
||||||
COPY --from=builder /opt/darkfi/drk /opt/darkfi/darkfid \
|
COPY --from=builder /opt/darkfi/drk /opt/darkfi/darkfid \
|
||||||
/opt/darkfi/ircd /opt/darkfi/dnetview /opt/darkfi/faucetd \
|
/opt/darkfi/ircd /opt/darkfi/dnetview /opt/darkfi/faucetd \
|
||||||
/opt/darkfi/zkas /opt/darkfi/vanityaddr ./
|
/opt/darkfi/zkas /opt/darkfi/vanityaddr ./
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
# Use: docker build . --pull --network=host -t darkfi:fedora -f ./contrib/docker/Dockerfile.fedora
|
# Use: docker build . --pull --network=host -t darkfi:fedora -f ./contrib/docker/Dockerfile.fedora
|
||||||
# optionally with: --build-arg OS_VER=fedora:36 --build-arg RUST_VER=nightly
|
# optionally with: --build-arg OS_VER=fedora:36 --build-arg RUST_VER=nightly
|
||||||
|
|
||||||
ARG RUST_VER=1.67 # stable nightly beta 1.65
|
ARG RUST_VER=1.70 # stable nightly beta 1.67
|
||||||
ARG OS_VER=fedora:37 # fedora:36
|
ARG OS_VER=fedora:37 # fedora:36
|
||||||
|
|
||||||
FROM ${OS_VER} as rust_builder
|
FROM ${OS_VER} as rust_builder
|
||||||
|
|
||||||
@@ -12,7 +11,7 @@ ARG RUST_VER
|
|||||||
RUN dnf -y install gcc gcc-c++ kernel-headers cmake jq wget \
|
RUN dnf -y install gcc gcc-c++ kernel-headers cmake jq wget \
|
||||||
pkg-config clang clang-libs llvm-libs \
|
pkg-config clang clang-libs llvm-libs \
|
||||||
openssl-devel findutils fontconfig-devel \
|
openssl-devel findutils fontconfig-devel \
|
||||||
lato-fonts
|
lato-fonts alsa-lib-devel
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
||||||
|
|
||||||
@@ -20,7 +19,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
|||||||
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
RUN cargo search whatever # creates .cargo cache
|
RUN cargo search whatever # creates .cargo cache
|
||||||
|
|
||||||
# 2. stage
|
# 2. stage
|
||||||
FROM rust_builder as builder
|
FROM rust_builder as builder
|
||||||
@@ -33,7 +32,7 @@ RUN make clean
|
|||||||
|
|
||||||
RUN rm -rf ./target/
|
RUN rm -rf ./target/
|
||||||
|
|
||||||
RUN bash -c 'make -j test && make -j all'
|
RUN bash -c 'make -j test && make -j all'
|
||||||
|
|
||||||
# 3. stage
|
# 3. stage
|
||||||
FROM ${OS_VER}
|
FROM ${OS_VER}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
# Use: docker build . --network=host --pull -t darkfi:ubuntu -f ./contrib/docker/Dockerfile.ubuntu
|
# Use: docker build . --network=host --pull -t darkfi:ubuntu -f ./contrib/docker/Dockerfile.ubuntu
|
||||||
# optionally with: --build-arg BUILD_OS_VER=20.04 --build-arg RUST_VER=1.65
|
# optionally with: --build-arg BUILD_OS_VER=20.04 --build-arg RUST_VER=1.70
|
||||||
|
|
||||||
ARG RUST_VER=1.67 # stable nightly beta
|
ARG RUST_VER=1.70 # stable nightly beta 1.67
|
||||||
ARG BUILD_OS_VER=22.04 # 20.04
|
ARG BUILD_OS_VER=22.04 # 20.04
|
||||||
ARG RUN_OS_VER=${BUILD_OS_VER}
|
ARG RUN_OS_VER=${BUILD_OS_VER}
|
||||||
ARG REPOSITORY=ubuntu
|
ARG REPOSITORY=ubuntu
|
||||||
|
|
||||||
@@ -14,7 +13,8 @@ ARG RUST_VER
|
|||||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
|
||||||
build-essential cmake jq wget curl \
|
build-essential cmake jq wget curl \
|
||||||
pkg-config clang libclang-dev llvm-dev libudev-dev libfreetype6-dev \
|
pkg-config clang libclang-dev llvm-dev libudev-dev libfreetype6-dev \
|
||||||
libexpat1-dev curl gcc make libssl-dev fonts-lato libfontconfig-dev
|
libexpat1-dev curl gcc make libssl-dev fonts-lato libfontconfig-dev \
|
||||||
|
libasound2-dev
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
|||||||
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
RUN cargo search whatever # creates .cargo cache
|
RUN cargo search whatever # creates .cargo cache
|
||||||
|
|
||||||
# 2. stage
|
# 2. stage
|
||||||
FROM rust_builder as builder
|
FROM rust_builder as builder
|
||||||
@@ -35,7 +35,7 @@ RUN make clean
|
|||||||
|
|
||||||
RUN rm -rf ./target/*
|
RUN rm -rf ./target/*
|
||||||
|
|
||||||
RUN bash -c 'make -j test && make -j all'
|
RUN bash -c 'make -j test && make -j all'
|
||||||
|
|
||||||
# 3. stage
|
# 3. stage
|
||||||
FROM ${REPOSITORY}:${RUN_OS_VER}
|
FROM ${REPOSITORY}:${RUN_OS_VER}
|
||||||
@@ -47,5 +47,4 @@ WORKDIR /opt/darkfi
|
|||||||
|
|
||||||
COPY --from=builder /opt/darkfi/drk /opt/darkfi/darkfid \
|
COPY --from=builder /opt/darkfi/drk /opt/darkfi/darkfid \
|
||||||
/opt/darkfi/ircd /opt/darkfi/dnetview /opt/darkfi/faucetd \
|
/opt/darkfi/ircd /opt/darkfi/dnetview /opt/darkfi/faucetd \
|
||||||
/opt/darkfi/zkas /opt/darkfi/vanityaddr ./
|
/opt/darkfi/zkas /opt/darkfi/vanityaddr ./
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
# Beware, uses emulation, with AMD 24 threads: Building 6047.7s
|
# Beware, uses emulation, with AMD 24 threads: Building 6047.7s
|
||||||
# Use: docker build . --platform=linux/arm64 --pull -t darkfi:ubuntu_arm64 -f contrib/docker/Dockerfile.ubuntuARMviaEmulation
|
# Use: docker build . --platform=linux/arm64 --pull -t darkfi:ubuntu_arm64 -f contrib/docker/Dockerfile.ubuntuARMviaEmulation
|
||||||
# optionally with: --build-arg BUILD_OS_VER=20.04 --build-arg RUST_VER=1.65
|
# optionally with: --build-arg BUILD_OS_VER=20.04 --build-arg RUST_VER=1.70
|
||||||
|
|
||||||
ARG RUST_VER=1.67 # stable nightly beta
|
ARG RUST_VER=1.70 # stable nightly beta 1.67
|
||||||
ARG BUILD_OS_VER=22.04 # 20.04
|
ARG BUILD_OS_VER=22.04 # 20.04
|
||||||
ARG RUN_OS_VER=${BUILD_OS_VER}
|
ARG RUN_OS_VER=${BUILD_OS_VER}
|
||||||
ARG REPOSITORY=ubuntu
|
ARG REPOSITORY=ubuntu
|
||||||
|
|
||||||
@@ -17,7 +16,8 @@ RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
|
|||||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
|
||||||
build-essential cmake jq wget curl \
|
build-essential cmake jq wget curl \
|
||||||
pkg-config clang libclang-dev llvm-dev libudev-dev libfreetype6-dev \
|
pkg-config clang libclang-dev llvm-dev libudev-dev libfreetype6-dev \
|
||||||
libexpat1-dev curl gcc make libssl-dev fonts-lato libfontconfig-dev
|
libexpat1-dev curl gcc make libssl-dev fonts-lato libfontconfig-dev \
|
||||||
|
libasound2-dev
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
|||||||
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
RUN rustup target add aarch64-unknown-linux-gnu
|
RUN rustup target add aarch64-unknown-linux-gnu
|
||||||
RUN cargo search whatever # creates .cargo cache
|
RUN cargo search whatever # creates .cargo cache
|
||||||
RUN cargo install -f cross
|
RUN cargo install -f cross
|
||||||
|
|
||||||
# 2. stage
|
# 2. stage
|
||||||
@@ -39,7 +39,7 @@ RUN make clean
|
|||||||
|
|
||||||
RUN rm -rf ./target/*
|
RUN rm -rf ./target/*
|
||||||
|
|
||||||
RUN bash -c 'make -j test && make -j all'
|
RUN bash -c 'make -j test && make -j all'
|
||||||
|
|
||||||
# 3. stage
|
# 3. stage
|
||||||
FROM --platform=$TARGETPLATFORM ${REPOSITORY}:${RUN_OS_VER}
|
FROM --platform=$TARGETPLATFORM ${REPOSITORY}:${RUN_OS_VER}
|
||||||
@@ -51,5 +51,4 @@ WORKDIR /opt/darkfi
|
|||||||
|
|
||||||
COPY --from=builder /opt/darkfi/drk /opt/darkfi/darkfid \
|
COPY --from=builder /opt/darkfi/drk /opt/darkfi/darkfid \
|
||||||
/opt/darkfi/ircd /opt/darkfi/dnetview /opt/darkfi/faucetd \
|
/opt/darkfi/ircd /opt/darkfi/dnetview /opt/darkfi/faucetd \
|
||||||
/opt/darkfi/zkas /opt/darkfi/vanityaddr ./
|
/opt/darkfi/zkas /opt/darkfi/vanityaddr ./
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user