Fix build type in Docker (#4249)

This commit is contained in:
Piotr Wójcik 2023-06-22 16:14:02 +02:00 committed by GitHub
commit 54593ee2a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 11 deletions

View file

@ -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

View file

@ -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 \

View file

@ -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