Skip to content

Commit dc34be7

Browse files
committed
[publish binary] 0.7.0-alpha.0 test, build.yml added
1 parent 47f839a commit dc34be7

File tree

6 files changed

+51
-72
lines changed

6 files changed

+51
-72
lines changed

.github/workflows/publish.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: publish
2+
3+
on: [push]
4+
5+
jobs:
6+
build-and-publish:
7+
runs-on: ubuntu-22.04
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
strategy:
13+
matrix:
14+
build-type: ['debug']
15+
# build-type: ['release', 'debug']
16+
node-version: ['22']
17+
os:
18+
- name: "linux"
19+
arhcs: ["x86_64"]
20+
# node-version: ['20', '22']
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Install packages
25+
run: |
26+
sudo apt update
27+
sudo apt-get install -y libstdc++-12-dev
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
33+
- name: Install and setup
34+
run: |
35+
node -v
36+
which node
37+
clang++ -v
38+
which clang++
39+
make "${{ matrix.build-type }}"
40+
rm -rf mason_packages
41+
42+
- name: Build and publish
43+
run: |
44+
./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${{ matrix.build-type }}" == 'debug' ] && echo "true" || echo "false")

.github/workflows/test.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
contents: read
1111

1212
strategy:
13-
fail-fast: false
1413
matrix:
1514
build-type: ['debug']
1615
# build-type: ['release', 'debug']
@@ -40,6 +39,7 @@ jobs:
4039
# Run the clang-format and clang-tidy scripts. Any code formatting changes
4140
# will trigger the build to fail (idea here is to get us to pay attention
4241
# and get in the habit of running these locally before committing)
42+
# These are only run under the test-clang job because they're clang specific.
4343
- name: Run format and tidy
4444
run: |
4545
make format
@@ -56,7 +56,6 @@ jobs:
5656
contents: read
5757

5858
strategy:
59-
fail-fast: false
6059
matrix:
6160
build-type: ['debug']
6261
# build-type: ['release', 'debug']
@@ -74,6 +73,7 @@ jobs:
7473
with:
7574
node-version: ${{ matrix.node-version }}
7675

76+
# Default builds use clang, but this job overrides the compiler to use g++.
7777
- name: Install and setup
7878
env:
7979
CXX: g++-12
@@ -90,14 +90,6 @@ jobs:
9090
make "${{ matrix.build-type }}"
9191
rm -rf mason_packages
9292
93-
# Run the clang-format and clang-tidy scripts. Any code formatting changes
94-
# will trigger the build to fail (idea here is to get us to pay attention
95-
# and get in the habit of running these locally before committing)
96-
- name: Run format and tidy
97-
run: |
98-
make format
99-
make tidy
100-
10193
- name: Run node tests
10294
run: |
10395
npm test

.nvmrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
16
2-
1+
20

.travis.yml

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
language: node_js
2-
dist: bionic
3-
4-
# enable c++11/14 builds
5-
addons:
6-
apt:
7-
sources: [ 'ubuntu-toolchain-r-test' ]
8-
packages: [ 'libstdc++-6-dev' ]
9-
10-
install:
11-
- node -v
12-
- which node
13-
- clang++ -v
14-
- which clang++
15-
- make ${BUILDTYPE}
16-
# Build should be standalone now, so remove mason deps
17-
- rm -rf mason_packages
18-
19-
# *Here we run tests*
20-
# We prefer running tests in the 'before_script' section rather than 'script' to ensure fast failure.
21-
# Be aware that if you use the 'script' section it will continue running all commands in the section even if one line fails.
22-
# This is documented at https://docs.travis-ci.com/user/customizing-the-build#Breaking-the-Build
23-
# We don't want this behavior because otherwise we might risk publishing builds when the tests did not pass.
24-
# For this reason, we disable the 'script' section below, since we prefer using 'before_script'.
25-
before_script:
26-
- npm test
27-
281
script:
292
# after successful tests, publish binaries if specified in commit message
303
- ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
@@ -61,33 +34,4 @@ matrix:
6134
install:
6235
- make sanitize
6336
# Overrides `before_script` (tests are already run in `make sanitize`)
64-
before_script: true
65-
66-
## ** Builds that do not get published **
67-
68-
# g++ build (default builds all use clang++)
69-
- os: linux
70-
env: BUILDTYPE=debug CXX="g++-6" CC="gcc-6" LINK="g++-6" AR="ar" NM="nm" CXXFLAGS="-fext-numeric-literals"
71-
addons:
72-
apt:
73-
sources:
74-
- ubuntu-toolchain-r-test
75-
packages:
76-
- libstdc++-6-dev
77-
- g++-6
78-
# Overrides `install` to avoid initializing clang toolchain
79-
install:
80-
- make ${BUILDTYPE}
81-
before_script:
82-
- npm test
83-
# Overrides `script` to disable publishing
84-
script: true
85-
# Coverage build
86-
- os: linux
87-
env: BUILDTYPE=debug CXXFLAGS="--coverage" LDFLAGS="--coverage"
88-
# Overrides `script` to publish coverage data to codecov
89-
script:
90-
- export PATH=$(pwd)/mason_packages/.link/bin/:${PATH}
91-
- which llvm-cov
92-
- pip install --user codecov
93-
- codecov --gcov-exec "llvm-cov gcov -l"
37+
before_script: true

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mapbox/vtquery",
3-
"version": "0.6.0",
3+
"version": "0.7.0-alpha.0",
44
"description": "Get features from Mapbox Vector Tiles from a lng/lat query point",
55
"url": "http://github.com/mapbox/vtquery",
66
"main": "./lib/index.js",

0 commit comments

Comments
 (0)