diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 00000000..8e4f82b3 --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,23 @@ +name: Docker Build + +on: + pull_request: + branches: + - "*" + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: docker/setup-buildx-action@v2 + + - name: Build Docker Image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: false diff --git a/Dockerfile b/Dockerfile index 2dcedc5b..c0342dd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,10 @@ COPY . . RUN apt-get update && apt-get install -yq \ git clang libssl-dev pkg-config protobuf-compiler +RUN cargo install cargo-binstall +RUN cargo binstall -y cargo-risczero +RUN cargo risczero install + RUN cargo build --release -p nomos-node # NODE IMAGE ---------------------------------------------------------- diff --git a/ci/Dockerfile b/ci/Dockerfile index bccd7e15..e39b9093 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -4,10 +4,6 @@ LABEL maintainer="augustinas@status.im" \ source="https://github.com/logos-co/nomos-node" \ description="nomos-node ci build image" -# Using backports for go 1.19 -RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' \ - >> /etc/apt/sources.list - # Dependecies for publishing documentation. RUN apt-get update && apt-get install -yq \ libssl-dev openssh-client git python3-pip clang \ @@ -16,6 +12,10 @@ RUN apt-get update && apt-get install -yq \ RUN pip install ghp-import RUN rustup component add rustfmt clippy +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 diff --git a/ci/Jenkinsfile.nightly.integration b/ci/Jenkinsfile.nightly.integration index e3757df4..82ea7430 100644 --- a/ci/Jenkinsfile.nightly.integration +++ b/ci/Jenkinsfile.nightly.integration @@ -50,8 +50,11 @@ pipeline { stage("BuildAndTest") { steps { script { + /* This will be overwritten if job succeeds */ + writeFile(file: "${WORKSPACE}/report.txt", text: "Job failed to start.") + /* To prevent rebuilding node for each test, tests are defined here */ - def tests = ['ten_nodes_happy', 'two_nodes_happy', 'ten_nodes_one_down'] + def tests = ['two_nodes_happy', 'disseminate_and_retrieve'] def report = runBuildAndTestsForFeature(FEATURE, tests) writeFile(file: "${WORKSPACE}/report.txt", text: report) diff --git a/testnet/Dockerfile b/testnet/Dockerfile index 58002d9c..c245aa62 100644 --- a/testnet/Dockerfile +++ b/testnet/Dockerfile @@ -9,6 +9,10 @@ COPY . . RUN apt-get update && apt-get install -yq \ git clang etcd-client libssl-dev pkg-config protobuf-compiler +RUN cargo install cargo-binstall +RUN cargo binstall -y cargo-risczero +RUN cargo risczero install + RUN cargo build --release --all --features metrics # NODE IMAGE ----------------------------------------------------------