Skip to content

Commit 7fcb4ad

Browse files
committed
nodejs 20 support test
1 parent 815f2d2 commit 7fcb4ad

File tree

3 files changed

+27
-21
lines changed

3 files changed

+27
-21
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
env:
16-
EM_VERSION: 2.0.6
16+
EM_VERSION: 3.1.74
1717
EM_CACHE_FOLDER: 'emsdk-cache'
1818
COMMIT_MSG: ${{ github.event.head_commit.message }}
1919

@@ -28,7 +28,7 @@ jobs:
2828
submodules: true
2929
- uses: actions/setup-node@v1
3030
with:
31-
node-version: 16
31+
node-version: 20
3232
- uses: actions/cache@v3
3333
with:
3434
path: ${{env.EM_CACHE_FOLDER}}
@@ -95,7 +95,7 @@ jobs:
9595
submodules: false
9696
- uses: actions/setup-node@v1
9797
with:
98-
node-version: 12
98+
node-version: 20
9999

100100
- name: Download webmscore package tarball
101101
uses: actions/download-artifact@v4

web/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ project(webmscore)
55

66
set(CMAKE_INCLUDE_CURRENT_DIR ON)
77

8+
# Emscripten.cmake will disable the default CMake finders to avoid incompatible packages
9+
# But we are using all our own packages so we need to enable them again
10+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
11+
812
set(CMAKE_CXX_STANDARD 17)
913
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1014

@@ -73,7 +77,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_ZLIB=1") # 1 = use z
7377
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_FREETYPE=1") # 1 = use freetype from emscripten-ports
7478
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_VORBIS=1") # 1 = use vorbis from emscripten-ports
7579
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_OGG=1") # 1 = use ogg from emscripten-ports
76-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s DEMANGLE_SUPPORT=1")
80+
81+
# Only enable this when emcc version < 3.1.54 since it's deprecated
82+
if(EMSCRIPTEN_VERSION VERSION_LESS "3.1.54")
83+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s DEMANGLE_SUPPORT=1")
84+
endif()
7785

7886
set(CMAKE_CXX_FLAGS_DEBUG "-g4 -s ASSERTIONS=2 -s STACK_OVERFLOW_CHECK=2 -s SAFE_HEAP=1")
7987
set(CMAKE_CXX_FLAGS_RELEASE "-Oz -DNDEBUG -DQT_NO_DEBUG")

web/Makefile

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11

2-
CPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)
3-
MU_ROOT := $(dir ${CURDIR})
2+
CPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)
3+
MU_ROOT := $(dir ${CURDIR})
44

55
# EMBED_PRELOADS = "OFF"
66
# BUILD_NUMBER = $(shell git rev-parse --short=7 HEAD)
77

88
# change path to include your Qt5 installation
9-
export CMAKE_PREFIX_PATH = ../../build.qt5/5.15.2/wasm_32
9+
export CMAKE_PREFIX_PATH = ../../build.qt5/5.15.2/wasm_32
1010

1111
# setup ccache
12-
export CCACHE_BASEDIR = ${MU_ROOT}
13-
export CCACHE_DIR = ${MU_ROOT}/.ccache
14-
export CCACHE_COMPRESS = true
12+
export CCACHE_BASEDIR = ${MU_ROOT}
13+
export CCACHE_DIR = ${MU_ROOT}/.ccache
14+
export CCACHE_COMPRESS = true
1515

16-
export NODE_OPTIONS = --max_old_space_size=4096
16+
export NODE_OPTIONS = --max_old_space_size=4096
1717

1818
release:
1919
if test ! -d build.release; then mkdir build.release; fi; \
2020
cd build.release; \
21-
emcmake cmake -DCMAKE_BUILD_TYPE=RELEASE \
21+
emcmake cmake -DCMAKE_BUILD_TYPE=RELEASE \
2222
-DEMBED_PRELOADS="${EMBED_PRELOADS}" \
23-
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TOOLCHAIN_FILE}" \
24-
-DCMAKE_BUILD_NUMBER="${BUILD_NUMBER}" ..; \
25-
emmake make -j ${CPUS}; \
26-
mv ./webmscore.* ../../web-public; \
23+
-DCMAKE_BUILD_NUMBER="${BUILD_NUMBER}" ..; \
24+
emmake make -j ${CPUS}; \
25+
mv ./webmscore.* ../../web-public; \
2726

2827
debug:
2928
if test ! -d build.debug; then mkdir build.debug; fi; \
3029
cd build.debug; \
31-
emcmake cmake -DCMAKE_BUILD_TYPE=DEBUG \
30+
emcmake cmake -DCMAKE_BUILD_TYPE=DEBUG \
3231
-DEMBED_PRELOADS="${EMBED_PRELOADS}" \
33-
-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TOOLCHAIN_FILE}" \
34-
-DCMAKE_BUILD_NUMBER="${BUILD_NUMBER}" ..; \
35-
emmake make -j ${CPUS}; \
36-
mv ./webmscore.* ../../web-public; \
32+
-DCMAKE_BUILD_NUMBER="${BUILD_NUMBER}" ..; \
33+
emmake make -j ${CPUS}; \
34+
mv ./webmscore.* ../../web-public; \
3735

3836
#
3937
# clean out of source build

0 commit comments

Comments
 (0)