From 594dbe292d36b14b8382c09da292e80ebb5b80db Mon Sep 17 00:00:00 2001 From: ptrus Date: Thu, 2 Nov 2023 22:30:17 +0100 Subject: [PATCH] debugging --- .buildkite/code.pipeline.yml | 1 + docker/oasis-core-dev/Dockerfile | 27 +++++++++++++++------------ go/Makefile | 1 + 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.buildkite/code.pipeline.yml b/.buildkite/code.pipeline.yml index 03398827dd7..d1b4c811000 100644 --- a/.buildkite/code.pipeline.yml +++ b/.buildkite/code.pipeline.yml @@ -202,6 +202,7 @@ steps: - "build-rust-runtimes" command: - trap 'buildkite-agent artifact upload "coverage-*.txt;/tmp/oasis-node-test_*/test-node.log"' EXIT + - sleep 100000 - .buildkite/go/test_and_coverage.sh retry: <<: *retry_agent_failure diff --git a/docker/oasis-core-dev/Dockerfile b/docker/oasis-core-dev/Dockerfile index a0d687f9762..0151c8c05eb 100644 --- a/docker/oasis-core-dev/Dockerfile +++ b/docker/oasis-core-dev/Dockerfile @@ -34,6 +34,8 @@ RUN apt-get update -qq && apt-get upgrade -qq && apt-get install -qq \ # for seccomp Go bindings support libseccomp-dev \ bubblewrap && \ + # Compression libs for RocksDB. + zlib1g-dev libbz2-dev liblz4-dev libzstd-dev && \ apt-get autoclean && apt-get autoremove && rm -rf /var/cache/apt/archives/* && \ # for linting Git commits pip install gitlint @@ -82,18 +84,6 @@ RUN wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \ go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} && \ go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} -# Install RocksDB. -RUN \ - wget -q https://github.com/facebook/rocksdb/archive/v${ROCKSDB_VERSION}.tar.gz \ - # Ensure checksum matches. TODO - && tar -zxf v${ROCKSDB_VERSION}.tar.gz \ - && cd rocksdb-${ROCKSDB_VERSION} \ - && DEBUG_LEVEL=0 make -j4 shared_lib \ - && make install-shared \ - && ldconfig \ - && cd .. \ - && rm -rf v${ROCKSDB}.tar.gz rocksdb-${ROCKSDB} - # Install jemalloc (used by BadgerDB). RUN wget -O jemalloc.tar.bz2 \ https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2 && \ @@ -108,3 +98,16 @@ RUN wget -O jemalloc.tar.bz2 \ make && \ make install && \ cd .. && rm jemalloc.tar.bz2 && rm -rf jemalloc-${JEMALLOC_VERSION} + +# Install RocksDB. +RUN \ + wget -q https://github.com/facebook/rocksdb/archive/v${ROCKSDB_VERSION}.tar.gz \ + # Ensure checksum matches. TODO + && tar -zxf v${ROCKSDB_VERSION}.tar.gz \ + && cd rocksdb-${ROCKSDB_VERSION} \ + # TODO: clashes with jemalloc used by BadgerDB. + && DEBUG_LEVEL=0 ROCKSDB_DISABLE_JEMALLOC=1 make -j4 shared_lib \ + && make install-shared \ + && ldconfig \ + && cd .. \ + && rm -rf v${ROCKSDB_VERSION}.tar.gz rocksdb-${ROCKSDB_VERSION} diff --git a/go/Makefile b/go/Makefile index 51786fe8432..6dacde631fb 100644 --- a/go/Makefile +++ b/go/Makefile @@ -6,6 +6,7 @@ ifneq ($(GOLDFLAGS),) endif # Initialize GO_TAGS variable to hold the build tags. +# TODO: actually only oasis-node needs to be built with these, other binaries not. GO_TAGS := # Include jemalloc tag unless explicitly disabled (used by badgerdb).