measur-tools-suite 1.0.11-beta.36 → 1.0.11-beta.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/bin/package.json +1 -1
- package/docker-compose.dev.yml +42 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ To make it easy for developers local building and testing, it is dockerized. To
|
|
|
75
75
|
- Download the repository
|
|
76
76
|
- Open command line tool, change directory to the repository run `docker compose up -d`
|
|
77
77
|
- To stop the running container run `docker compose down`
|
|
78
|
+
- For quicker development with a cached WASM build (ex. when developing javascript tests), run `docker compose -f docker-compose.dev.yml up`
|
|
78
79
|
- Running Unit Tests
|
|
79
80
|
- WASM: in a browser, launch [http://localhost:3000/](http://localhost:3000/)
|
|
80
81
|
- C++: run `docker exec -it measur-tools-suite-build /bin/bash` and run the executable `/home/MEASUR-Tools-Suite/build-cpp/cpp_tests`
|
package/bin/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
services:
|
|
2
|
+
measur-tools-suite:
|
|
3
|
+
build: .
|
|
4
|
+
container_name: measur-tools-suite-build-dev
|
|
5
|
+
restart: always
|
|
6
|
+
command:
|
|
7
|
+
- /bin/sh
|
|
8
|
+
- -c
|
|
9
|
+
- |
|
|
10
|
+
# Only rebuild WASM/CPP if does not exist
|
|
11
|
+
if [ ! -f "/MEASUR-Tools-Suite/build-cpp/built.flag" ]; then
|
|
12
|
+
echo "Building WASM C++ components..."
|
|
13
|
+
mkdir -p /MEASUR-Tools-Suite/build-cpp/
|
|
14
|
+
cd /MEASUR-Tools-Suite/build-cpp/
|
|
15
|
+
cmake ..
|
|
16
|
+
cmake --build . -j 8
|
|
17
|
+
|
|
18
|
+
mkdir -p /MEASUR-Tools-Suite/build-wasm/
|
|
19
|
+
cd /MEASUR-Tools-Suite/build-wasm/
|
|
20
|
+
source /home/emsdk/emsdk_env.sh
|
|
21
|
+
emcmake cmake -D BUILD_WASM=ON ..
|
|
22
|
+
emmake make -j 8
|
|
23
|
+
|
|
24
|
+
# Create flag file in the source directory
|
|
25
|
+
touch /MEASUR-Tools-Suite/build-cpp/built.flag
|
|
26
|
+
else
|
|
27
|
+
echo "Using cached C++ build..."
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
cd /MEASUR-Tools-Suite/
|
|
31
|
+
npm install
|
|
32
|
+
npm run test-wasm
|
|
33
|
+
volumes:
|
|
34
|
+
- ../MEASUR-Tools-Suite:/MEASUR-Tools-Suite
|
|
35
|
+
ports:
|
|
36
|
+
- "3000:3000"
|
|
37
|
+
networks:
|
|
38
|
+
- ts-net
|
|
39
|
+
|
|
40
|
+
networks:
|
|
41
|
+
ts-net:
|
|
42
|
+
name: ts-build-network
|