From c231d3388133a92bf5a62f9b66178ff990a61dea Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 13 Jul 2017 14:54:09 +0300 Subject: [build] Publish node packages with RelWithDebInfo --- CMakeLists.txt | 3 ++- Makefile | 3 ++- circle.yml | 4 ++-- mapbox-gl-js | 2 +- platform/node/bitrise.yml | 2 +- platform/node/scripts/after_success.sh | 9 ++++++--- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4a6e4d8c9..d709f1117c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ if(WITH_COVERAGE) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage") endif(WITH_COVERAGE) -set(CMAKE_CONFIGURATION_TYPES Debug Release Sanitize) +set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebugInfo Sanitize) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -ftemplate-depth=1024 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Werror -Wno-variadic-macros -Wno-unknown-pragmas") if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") @@ -76,6 +76,7 @@ if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-command-line-argument") endif() set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG") set(CMAKE_CXX_FLAGS_SANITIZE "-O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls") diff --git a/Makefile b/Makefile index b6e4b608fa..dfa5c8b640 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,11 @@ export BUILDTYPE ?= Debug export WITH_CXX11ABI ?= $(shell scripts/check-cxx11abi.sh) ifeq ($(BUILDTYPE), Release) +else ifeq ($(BUILDTYPE), RelWithDebInfo) else ifeq ($(BUILDTYPE), Sanitize) else ifeq ($(BUILDTYPE), Debug) else - $(error BUILDTYPE must be Debug, Sanitize or Release) + $(error BUILDTYPE must be Debug, Sanitize, Release or RelWithDebInfo) endif buildtype := $(shell echo "$(BUILDTYPE)" | tr "[A-Z]" "[a-z]") diff --git a/circle.yml b/circle.yml index 7722bc2115..6b725934d4 100644 --- a/circle.yml +++ b/circle.yml @@ -265,7 +265,7 @@ jobs: environment: LIBSYSCONFCPUS: 4 JOBS: 4 - BUILDTYPE: Release + BUILDTYPE: RelWithDebInfo WITH_EGL: 1 PACKAGE_JSON_VERSION: $(node -e "console.log(require('./package.json').version)") PUBLISH: $([[ "${CIRCLE_BRANCH}" == "node-v${PACKAGE_JSON_VERSION}" ]] && echo true) @@ -289,7 +289,7 @@ jobs: environment: LIBSYSCONFCPUS: 4 JOBS: 4 - BUILDTYPE: Release + BUILDTYPE: RelWithDebInfo WITH_EGL: 1 PACKAGE_JSON_VERSION: $(node -e "console.log(require('./package.json').version)") PUBLISH: $([[ "${CIRCLE_BRANCH}" == "node-v${PACKAGE_JSON_VERSION}" ]] && echo true) diff --git a/mapbox-gl-js b/mapbox-gl-js index 4c1ce2d2c1..f27666813d 160000 --- a/mapbox-gl-js +++ b/mapbox-gl-js @@ -1 +1 @@ -Subproject commit 4c1ce2d2c1a504a1984073672d15288f92302b4d +Subproject commit f27666813dd8e3d738a3962b3d86d0ec799b6fc7 diff --git a/platform/node/bitrise.yml b/platform/node/bitrise.yml index 00005f0f36..fab3093d6e 100644 --- a/platform/node/bitrise.yml +++ b/platform/node/bitrise.yml @@ -64,7 +64,7 @@ workflows: brew install cmake awscli node@4 node@6 brew link node@4 --force gem install xcpretty --no-rdoc --no-ri - export BUILDTYPE=Release + export BUILDTYPE=RelWithDebInfo export PUBLISH=true make test-node && ./platform/node/scripts/after_success.sh brew unlink node@4 diff --git a/platform/node/scripts/after_success.sh b/platform/node/scripts/after_success.sh index a050dbce07..d761d4110f 100755 --- a/platform/node/scripts/after_success.sh +++ b/platform/node/scripts/after_success.sh @@ -3,10 +3,13 @@ set -e set -o pipefail -if [[ "${PUBLISH:-}" == "true" ]]; then - if [[ "${BUILDTYPE}" == "Release" ]]; then +if [[ -n ${PUBLISH:-} ]]; then + if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then ./node_modules/.bin/node-pre-gyp package publish info - else + elif [[ "${BUILDTYPE}" == "Debug" ]]; then ./node_modules/.bin/node-pre-gyp package publish info --debug + else + echo "error: must provide either Debug or RelWithDebInfo for BUILDTYPE" + exit 1 fi fi -- cgit v1.2.1