Skip to content

Commit

Permalink
CI: Jenkins risczero setup (logos-co#770)
Browse files Browse the repository at this point in the history
* Remove dep

* Use cargo as jenkins user

* Ensure that toolchain directory is setup before installation

* Debian 12 and gcc deps

* Env variables for risc zero dev mode

* Update testnet and base dockerfiles

* Env vars comments
  • Loading branch information
bacv authored Sep 26, 2024
1 parent d83380c commit a30a809
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# BUILD IMAGE ---------------------------------------------------------

FROM rust:1.80.0-slim-bullseye AS builder
FROM rust:1.80.0-slim-bookworm AS builder

WORKDIR /nomos
COPY . .

# Install dependencies needed for building RocksDB.
RUN apt-get update && apt-get install -yq \
git clang libssl-dev pkg-config protobuf-compiler
git gcc g++ clang libssl-dev pkg-config \
protobuf-compiler

RUN cargo install cargo-binstall
RUN cargo binstall -y cargo-risczero
Expand Down
23 changes: 15 additions & 8 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
FROM rust:1.80.0-slim-bullseye
FROM rust:1.80.0-slim-bookworm

LABEL maintainer="augustinas@status.im" \
source="https://github.com/logos-co/nomos-node" \
description="nomos-node ci build image"

# Dependecies for publishing documentation.
RUN apt-get update && apt-get install -yq \
libssl-dev openssh-client git python3-pip clang \
pkg-config protobuf-compiler
libssl-dev openssh-client git gcc g++ \
clang pkg-config protobuf-compiler

RUN pip install ghp-import
RUN rustup component add rustfmt clippy

# Jenkins user needs a specific UID/GID to work.
RUN groupadd -g 1001 jenkins \
&& useradd -u 1001 -g jenkins jenkins

# Create necessary directories and assign correct permissions
RUN mkdir -p /home/jenkins/.local/share/cargo-risczero/toolchains \
&& chown -R jenkins:jenkins /home/jenkins/.local \
&& mkdir -p /home/jenkins/.cargo \
&& chown -R jenkins:jenkins /home/jenkins/.cargo

USER jenkins

RUN cargo install cargo-binstall
RUN cargo binstall -y cargo-risczero
RUN cargo risczero install

# Jenkins user needs a specific UID/GID to work.
RUN groupadd -g 1001 jenkins \
&& useradd -u 1001 -g jenkins jenkins
7 changes: 4 additions & 3 deletions ci/Jenkinsfile.nightly.integration
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ pipeline {
}

environment {
/* Avoid cache poisoning by other jobs. */
GOCACHE = "${env.WORKSPACE_TMP}/go-build"
GOPATH = "${env.WORKSPACE_TMP}/go"
RUST_BACKTRACE = 1
/* Use increased slot time in Nomos consensus */
CONSENSUS_SLOT_TIME = 5
/* Run Nomos tests in risc0 development mode */
RISC0_DEV_MODE = true
}

options {
Expand Down
5 changes: 3 additions & 2 deletions testnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# BUILD IMAGE ---------------------------------------------------------

FROM rust:1.80.0-slim-bullseye AS builder
FROM rust:1.80.0-slim-bookworm AS builder

WORKDIR /nomos
COPY . .

# Install dependencies needed for building RocksDB and etcd.
RUN apt-get update && apt-get install -yq \
git clang etcd-client libssl-dev pkg-config protobuf-compiler
git gcc g++ clang etcd-client libssl-dev \
pkg-config protobuf-compiler

RUN cargo install cargo-binstall
RUN cargo binstall -y cargo-risczero
Expand Down

0 comments on commit a30a809

Please sign in to comment.