File tree Expand file tree Collapse file tree 5 files changed +30
-41
lines changed Expand file tree Collapse file tree 5 files changed +30
-41
lines changed Original file line number Diff line number Diff line change 11name : CI
22
33on : workflow_dispatch
4- # push:
5- # pull_request:
4+ push :
5+ pull_request :
66
77jobs :
88 build :
@@ -138,3 +138,25 @@ jobs:
138138 with :
139139 name : artifacts
140140 path : ./out/artifacts
141+
142+ wasm :
143+ runs-on : ubuntu-latest
144+ steps :
145+ - uses : actions/checkout@v3
146+ - uses : mymindstorm/setup-emsdk@v11
147+ with :
148+ version : 3.1.16
149+ - uses : actions/setup-node@v3
150+ with :
151+ node-version : 16
152+ - run : node -v
153+ - run : emcc -v
154+ - run : sudo apt-get update -qq
155+ - run : sudo apt-get install -qq nasm g++-multilib gcc-multilib libc6-dev-i386
156+ - run : make gmp-bootstrap
157+ - run : make gtest-bootstrap
158+ - run : bash ./build/mktargets.sh
159+ - run : ( cd test/encoder_binary_comparison ; ./run_PrepareAllTestData.sh 64 wasm )
160+ - run : ./run_Test.sh BinaryCompareWasm BA_MW_D.264
161+ - run : ./run_Test.sh BinaryCompareWasm Adobe_PDF_sample_a_1024x768_50Frms.264
162+ - run : ./run_Test.sh BinaryCompareWasm Zhling_1280x720.264
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -194,8 +194,10 @@ endif
194194
195195test : codec_unittest$(EXEEXT )
196196ifeq ($(BUILD_UT_EXE ) , Yes)
197+ ifneq (wasm,$(OS ) )
197198 ./codec_unittest
198199endif
200+ endif
199201
200202else
201203test :
Original file line number Diff line number Diff line change @@ -268,16 +268,7 @@ def find_sources():
268268if args .binary is not None :
269269 f .write ("%s$(EXEEXT): $(%s_OBJS) $(%s_DEPS)\n " % (args .binary , PREFIX , PREFIX ))
270270 f .write ("\t $(QUIET_CXX)$(CXX) $(CXX_LINK_O) $(%s_OBJS) $(%s_LDFLAGS) $(LDFLAGS)\n \n " % (PREFIX , PREFIX ))
271- # for wasm build
272- f .write ("%s.html: $(%s_OBJS) $(%s_DEPS)\n " % (args .binary , PREFIX , PREFIX ))
273- f .write ("\t $(QUIET_CXX)$(CXX) $(CXX_LINK_O) $(%s_OBJS) $(%s_LDFLAGS) $(LDFLAGS)\n \n " % (PREFIX , PREFIX ))
274-
275- f .write ("ifeq ($(OS), wasm)\n " )
276- f .write ("binaries: %s.html\n " % args .binary )
277- f .write ("BINARIES += %s.html\n " % args .binary )
278- f .write ("else\n " )
279271 f .write ("binaries: %s$(EXEEXT)\n " % args .binary )
280272 f .write ("BINARIES += %s$(EXEEXT)\n " % args .binary )
281- f .write ("endif" )
282273
283274f .close ()
Original file line number Diff line number Diff line change 11include $(SRC_PATH ) build/arch.mk
2+ EXEEXT = .html
23SHAREDLIBSUFFIX = so
34SHAREDLIBSUFFIXFULLVER =$(SHAREDLIBSUFFIX ) .$(FULL_VERSION )
45SHAREDLIBSUFFIXMAJORVER =$(SHAREDLIBSUFFIX ) .$(SHAREDLIB_MAJORVERSION )
56SHLDFLAGS = -Wl,-soname,$(LIBPREFIX )$(PROJECT_NAME ) .$(SHAREDLIBSUFFIXMAJORVER )
67CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
78# fix undifined symbol: __stack_chk_guard bug
89# flags needed to build wasm
9- CFLAGS += -U_FORTIFY_SOURCE -pthread -DWASMSIMD -msimd128 -sINITIAL_MEMORY=104857600
10- CXXFLAGS += -U_FORTIFY_SOURCE -pthread -DWASMSIMD -msimd128 -sINITIAL_MEMORY=104857600
11- LDFLAGS += -U_FORTIFY_SOURCE -pthread -msimd128 -sINITIAL_MEMORY=104857600
10+ CFLAGS += -U_FORTIFY_SOURCE -pthread -DWASMSIMD -msimd128 -sINITIAL_MEMORY=134217728 -sALLOW_MEMORY_GROWTH -sPROXY_TO_PTHREAD -sEXIT_RUNTIME
11+ CXXFLAGS += -U_FORTIFY_SOURCE -pthread -DWASMSIMD -msimd128 -sINITIAL_MEMORY=134217728 -sALLOW_MEMORY_GROWTH -sPROXY_TO_PTHREAD -sEXIT_RUNTIME
12+ LDFLAGS += -U_FORTIFY_SOURCE -pthread -msimd128 -sINITIAL_MEMORY=134217728 -sALLOW_MEMORY_GROWTH -sPROXY_TO_PTHREAD -sEXIT_RUNTIME
1213ifeq ($(EMFS ) , nodefs)
1314CFLAGS += -DNODEFS
1415CXXFLAGS += -DNODEFS
You can’t perform that action at this time.
0 commit comments