Skip to content

Commit

Permalink
Merge pull request #119 from mapbox/ozqu/add-support-to-node-14-16
Browse files Browse the repository at this point in the history
- Node 16 built binaries of c++ implemented library
- libstdc++-6-dev
- Updated dependencies: node-addon-ap@^4.3.0
- Updated dev-dependencies: @mapbox/node-pre-gyp@^1.0.8, @mapbox/cloudfriend: ^5.1.0, @mapbox/mvt-fixtures@^3.7.0, @mapbox/sphericalmercator: ^1.2.0, @mapbox/tilebelt@^1.0.2, aws-sdk@^2.1074.0, bytes@^3.1.2, d3-queue@^3.0.7, mapnik@^4.5.9, pbf@^3.2.1, tape@^4.5.2
  • Loading branch information
OzQu committed Mar 3, 2022
2 parents 872d47d + 3e0a83d commit ffdea5a
Show file tree
Hide file tree
Showing 7 changed files with 1,734 additions and 529 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
32 changes: 16 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
language: node_js

node_js: 12
dist: bionic

# enable c++11/14 builds
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'libstdc++-4.9-dev' ]
packages: [ 'libstdc++-6-dev' ]

install:
- node -v
- which node
- clang++ -v
- which clang++
- make ${BUILDTYPE}
# Build should be standalone now, so remove mason deps
- rm -rf mason_packages

# *Here we run tests*
# We prefer running tests in the 'before_script' section rather than 'script' to ensure fast failure.
Expand All @@ -34,8 +35,7 @@ matrix:
include:

## ** Builds that are published **

# linux cfi build node v10/release
# linux cfi build node release
- os: linux
env: BUILDTYPE=release TOOLSET=cfi CXXFLAGS="-flto -fsanitize=cfi -fvisibility=hidden" LDFLAGS="-flto -fsanitize=cfi"
# linux publishable node release
Expand Down Expand Up @@ -73,19 +73,19 @@ matrix:
# Overrides `install` to avoid initializing clang toolchain
install:
- make ${BUILDTYPE}
before_script:
- npm test
# Overrides `script` to disable publishing
script: true
# # Coverage build
# - os: linux
# env: BUILDTYPE=debug CXXFLAGS="--coverage" LDFLAGS="--coverage"
# # Overrides `script` to publish coverage data to codecov
# script:
# - export PATH=$(pwd)/mason_packages/.link/bin/:${PATH}
# - PATH=`echo $PATH | sed -e 's/:\.\/node_modules\/\.bin//'` # remove relative path ^^
# - which llvm-cov
# - curl -S -f https://codecov.io/bash -o codecov
# - chmod +x codecov
# - ./codecov -x "llvm-cov gcov" -Z
# Coverage build
- os: linux
env: BUILDTYPE=debug CXXFLAGS="--coverage" LDFLAGS="--coverage"
# Overrides `script` to publish coverage data to codecov
script:
- export PATH=$(pwd)/mason_packages/.link/bin/:${PATH}
- which llvm-cov
- pip install --user codecov
- codecov --gcov-exec "llvm-cov gcov -l"
# Clang format build
- os: linux
env: CLANG_FORMAT
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# 0.6.1
- Build binaries with node v16 -> works at runtime with node v8 -> v16 (and likely others)
- Remove `-D_GLIBCXX_USE_CXX11_ABI=0` build flag
- Upgrade dependencies [#119](https://github.com/mapbox/vtcomposite/pull/119)
- `node-addon-api` ^4.3.0
- `@mapbox/node-pre-gyp` ^1.0.8
- `@mapbox/cloudfriend` ^5.1.0
- `@mapbox/mvt-fixtures` ^3.7.0
- `@mapbox/sphericalmercator` ^1.2.0
- `@mapbox/tilebelt` ^1.0.2
- `aws-sdk` ^2.1074.0
- `bytes` ^3.1.2
- `d3-queue` ^3.0.
- `mapnik` ^4.5.9
- `pbf` ^3.2.1
- `tape` ^4.5.2

# 0.6.0

- Return empty `Buffer` if a composite operation results in a empty tile, even if `compress: true` is set. This can happen if a tile is overzoomed and results in no layers, but the resulting buffer was gzipped, which leads to a non-empty gzipped buffer with no data, specifically: `<Buffer 1f 8b 08 00 00 00 00 00 00 13 03 00 00 00 00 00 00 00 00 00>`. The result of this change is that users should check the response `buffer.length > 0` if they need to handle empty tiles separately from non-empty tiles.
Expand Down
12 changes: 1 addition & 11 deletions common.gypi
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
{
'target_defaults': {
'default_configuration': 'Release',
'cflags_cc' : [
'-std=c++14',
# The assumption is that projects based on node-cpp-skel will also
# depend on mason packages. Currently (this will change in future mason versions)
# mason packages default to being built/linked with the CXX11_ABI=0.
# So we need to link this way too. This allows source
# compiling your module on any ubuntu version, even the latest
# where the CXX11_ABI default has flipped to 1
# More details at https://github.com/mapbox/mason/issues/319
'-D_GLIBCXX_USE_CXX11_ABI=0'
],
'cflags_cc' : ['-std=c++14'],
'cflags_cc!': ['-std=gnu++0x', '-fno-rtti', '-fno-exceptions'],
'configurations': {
'Debug': {
Expand Down
Loading

0 comments on commit ffdea5a

Please sign in to comment.