Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[build] Publish node packages with RelWithDebInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoabinader committed Jul 14, 2017
1 parent 48ddfef commit 460643b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ 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")
# -Wno-error=unused-command-line-argument is required due to https://llvm.org/bugs/show_bug.cgi?id=7798
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")


Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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]")
Expand Down
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion mapbox-gl-js
2 changes: 1 addition & 1 deletion platform/node/bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions platform/node/scripts/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 460643b

Please sign in to comment.