From 9cbb811fbc66cb36aa3101d798874d1144d2b092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Thu, 22 Jun 2023 14:21:39 +0200 Subject: [PATCH] Fix build type in Docker --- .github/workflows/unit_tests.yml | 7 ++++--- ci/build-tests.sh | 6 ------ docker/node/Dockerfile | 6 ++++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 451d705b68..f24e214eec 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -13,7 +13,7 @@ jobs: - ${{ startsWith(github.ref, 'refs/tags/') }} env: BACKEND: ${{ matrix.BACKEND }} - RELEASE: ${{ matrix.RELEASE }} + BUILD_TYPE: ${{ matrix.RELEASE && 'RelWithDebInfo' || 'Debug' }} TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }} DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }} runs-on: macos-12 @@ -78,7 +78,7 @@ jobs: env: COMPILER: ${{ matrix.COMPILER }} BACKEND: ${{ matrix.BACKEND }} - RELEASE: ${{ matrix.RELEASE }} + BUILD_TYPE: ${{ matrix.RELEASE && 'RelWithDebInfo' || 'Debug' }} TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }} DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository @@ -144,8 +144,9 @@ jobs: runs-on: windows-latest env: BACKEND: ${{ matrix.BACKEND }} - RELEASE: ${{ matrix.RELEASE }} + BUILD_TYPE: ${{ matrix.RELEASE && 'RelWithDebInfo' || 'Debug' }} TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }} + DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - name: Checkout diff --git a/ci/build-tests.sh b/ci/build-tests.sh index c916ba4411..3203347bed 100755 --- a/ci/build-tests.sh +++ b/ci/build-tests.sh @@ -1,12 +1,6 @@ #!/bin/bash set -euox pipefail -BUILD_TYPE="Debug" -if [[ "${RELEASE:-false}" == "true" ]]; then - BUILD_TYPE="RelWithDebInfo" -fi - -BUILD_TYPE=$BUILD_TYPE \ NANO_TEST=ON \ NANO_NETWORK=dev \ NANO_GUI=ON \ diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile index ec0ea85663..53bd060df3 100644 --- a/docker/node/Dockerfile +++ b/docker/node/Dockerfile @@ -1,6 +1,8 @@ FROM ubuntu:22.04 as builder ARG COMPILER=gcc +ARG BUILD_TYPE=RelWithDebInfo +ARG SANITIZER ARG NANO_NETWORK=live ARG CI_TAG=DEV_BUILD ARG CI_BUILD=OFF @@ -20,7 +22,7 @@ RUN echo ${NANO_NETWORK} >/etc/nano-network FROM ubuntu:22.04 RUN groupadd --gid 1000 nanocurrency && \ -useradd --uid 1000 --gid nanocurrency --shell /bin/bash --create-home nanocurrency + useradd --uid 1000 --gid nanocurrency --shell /bin/bash --create-home nanocurrency COPY --from=builder /tmp/src/build/nano_node /usr/bin COPY --from=builder /tmp/src/build/nano_rpc /usr/bin @@ -41,4 +43,4 @@ ENTRYPOINT ["/usr/bin/entry.sh"] CMD ["nano_node", "daemon", "-l"] ARG REPOSITORY=nanocurrency/nano-node -LABEL org.opencontainers.image.source https://github.com/$REPOSITORY +LABEL org.opencontainers.image.source https://github.com/$REPOSITORY \ No newline at end of file