Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Bring back node support #217

Merged
merged 57 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c3bd48e
Ignore node_modules
jutaz Oct 28, 2021
98c5145
Add a package lock
jutaz Oct 28, 2021
e07fa14
Update CMake to build platform loop w/ libuv
jutaz Jan 14, 2022
b905fcf
Support new NAN version as well as node v10
jutaz Jan 14, 2022
423eebc
Support node 14, 16, 17
jutaz Jan 14, 2022
3e85ac0
Update the docs
jutaz Jan 14, 2022
96aecee
Revert Readme changes
jutaz Jan 16, 2022
ab40da3
Install libuv
jutaz Jan 20, 2022
ef3497e
_actually_ add libuv
jutaz Jan 20, 2022
0ec78dc
Link platform loop
jutaz Jan 20, 2022
c996193
Add Darwin build script
jutaz Jan 22, 2022
7271b39
Small fix
jutaz Jan 22, 2022
f8f8ac8
use a generic workflow name
jutaz Jan 22, 2022
e065269
Fix some mock names
jutaz Jan 22, 2022
7b3afb6
Fix tests
jutaz Jan 22, 2022
5d0145c
rename
jutaz Jan 22, 2022
f4b8f8b
Run multiple macos versions, cache homebrew
jutaz Jan 22, 2022
eebce07
Update package name, ignore rest of files for the package
jutaz Jan 22, 2022
1dab828
needs runs-on, duh
jutaz Jan 22, 2022
6276885
Run on Linux
jutaz Jan 22, 2022
92efcd3
sudo!
jutaz Jan 22, 2022
c137081
use libjpeg
jutaz Jan 22, 2022
b1fc0d3
Run in Headless mode on Linux
jutaz Jan 22, 2022
3e3d077
try xvfb
jutaz Jan 22, 2022
7bf6df5
Whooops
jutaz Jan 22, 2022
e5769e0
Ignore Qt too
jutaz Jan 22, 2022
51a1215
Simplify dependencies, remove osx deployment target
jutaz Jan 22, 2022
4a91682
Remove brew cache
jutaz Jan 22, 2022
9fd8244
Remove more deps
jutaz Jan 22, 2022
0a81774
Purge more deps
jutaz Jan 23, 2022
d877808
Revert circleCI changes
jutaz Jan 23, 2022
0cc23a2
Remove iostream include
jutaz Jan 23, 2022
61d82d1
Ignore node binaries
jutaz Jan 23, 2022
9c85518
Simplify node loop
jutaz Jan 23, 2022
7939bde
Small cleanup
jutaz Jan 23, 2022
8104d83
No need for libuv for regular builds now.
jutaz Jan 23, 2022
92ce170
Rename package lock as well
jutaz Jan 23, 2022
3b85851
Update docs
jutaz Jan 23, 2022
b6ba0a4
Fix typo
jutaz Jan 23, 2022
8e14f86
Use static_cast
jutaz Jan 23, 2022
a1426d5
Few build tweaks
jutaz Jan 23, 2022
e4cbe7d
Merge branch 'feature/bring-back-node-support' of https://github.com/…
jutaz Jan 23, 2022
57df26b
Add a CI badge
jutaz Jan 23, 2022
237f7e7
Switch Debug/Release based on branch
jutaz Jan 23, 2022
ab69c6f
Remove python deps
jutaz Jan 26, 2022
d57758a
Remove few more deps
jutaz Jan 26, 2022
827f39f
rm more deps
jutaz Jan 26, 2022
6d41d3c
Remove m0ar stuff
jutaz Jan 26, 2022
5bc5238
Missing \
jutaz Jan 26, 2022
f0d2b18
Cache based on matrix.os
jutaz Jan 26, 2022
099b2d4
Use env for build type var
jutaz Jan 26, 2022
459a09a
Remove zip, valgrind, fonts and doxygen
jutaz Jan 26, 2022
84715ee
Remove more deps, yay
jutaz Jan 26, 2022
067cfc1
We need curl
jutaz Jan 26, 2022
acb8cc9
Remove some gfx deps
jutaz Jan 26, 2022
d40b2c9
No more mesa and zlib
jutaz Jan 26, 2022
711f72f
Update instructions
jutaz Jan 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: node-ci

on:
workflow_dispatch:
push:
tags-ignore:
- '**'
paths-ignore:
- "platform/android/**"
- "platform/ios/**"
jutaz marked this conversation as resolved.
Show resolved Hide resolved
- "platform/qt/**"
- ".gitignore"
branches:
- master
pull_request:
branches:
- master
paths-ignore:
- "platform/android/**"
- "platform/ios/**"
- ".gitignore"

jobs:
build:
strategy:
matrix:
os:
- macos-11.0
- macos-10.15
- ubuntu-20.04
- ubuntu-18.04
runs-on: ${{ matrix.os }}
env:
BUILDTYPE: ${{github.ref == 'refs/heads/master' && 'Release' || 'Debug'}}

defaults:
run:
working-directory: ./
shell: bash

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: Install dependencies
if: runner.os == 'macOS'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: |
brew list cmake || brew install cmake
ntadej marked this conversation as resolved.
Show resolved Hide resolved
brew list ccache || brew install ccache
brew list ninja || brew install ninja
brew list pkg-config || brew install pkg-config
brew list glfw3 || brew install glfw3
brew list libuv || brew install libuv

- name: Install dependencies
if: runner.os == 'Linux'
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get install -y \
ccache \
cmake \
ninja-build \
pkg-config \
xvfb \
libcurl4-openssl-dev \
libglfw3-dev \
libuv1-dev \
g++-10 \
libc++-9-dev \
libc++abi-9-dev
/usr/sbin/update-ccache-symlinks

- name: npm ci
run: npm ci --ignore-scripts

- name: Prepare ccache
run: ccache --clear --set-config cache_dir=~/.ccache

- name: Cache ccache
uses: actions/cache@v2
env:
cache-name: ccache-v1
with:
path: ~/.ccache
key: ${{ env.cache-name }}-${{ matrix.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
restore-keys: |
${{ env.cache-name }}-${{ matrix.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ env.cache-name }}-${{ matrix.os }}-${{ github.job }}-${{ github.ref }}
${{ env.cache-name }}-${{ matrix.os }}-${{ github.job }}

- name: Clear ccache statistics
run: |
ccache --zero-stats --set-config cache_dir=~/.ccache
ccache --max-size=2G --set-config cache_dir=~/.ccache
ccache --show-stats --set-config cache_dir=~/.ccache

- name: CMake
if: runner.os == 'macOS'
run: |
cmake . -B build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} -DMBGL_WITH_COVERAGE=ON
sed -i -e 's/$(ARCHS_STANDARD)/x86_64/g' build/build.ninja
sed -i -e 's/-arch arm64e/-arch x86_64/g' build/build.ninja

- name: CMake
if: runner.os == 'Linux'
run: |
cmake . -B build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
jutaz marked this conversation as resolved.
Show resolved Hide resolved

- name: Build
run: |
cmake --build build -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)

- name: Test
if: runner.os == 'Linux'
run: xvfb-run --auto-servernum npm test

- name: Test
if: runner.os == 'macOS'
run: npm test

# On PRs make sure that the npm package can be packaged.
- name: Pack
if: github.ref != 'refs/heads/master'
run: |
npm pack --dry-run

# Uncomment to start publishing the package
# @TODO: Figure out the binary distribution method.
# - name: Publish package
# if: github.ref == 'refs/heads/master'
# run: |
# npm publish
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@
/platform/ios/platform/ios/benchmark/assets/glyphs/Roboto Condensed Italic,Noto Sans Italic
/platform/ios/platform/ios/benchmark/assets/glyphs/Noto Sans Regular
/platform/android/key.json
node_modules
# Node binaries.
/lib
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
platform/node/src
platform/node/test
Loading