Skip to content

Commit

Permalink
display results for copy/paste
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Jan 12, 2025
1 parent 39cf05b commit 8493bcb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/compute_size_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
emcc --version
emcc -sUSE_GLFW=3 examples/example_minimal/main.cpp -O2 -o build-with-library_glfw/index.html
ls -l build-with-library_glfw
js_size=$(stat --format="%s" build-with-library_glfw/index.js)
wasm_size=$(stat --format="%s" build-with-library_glfw/index.wasm)
total_size=$((js_size + wasm_size))
echo "js:$js_size, wasm:$wasm_size, total: $total_size"
echo "TOTAL_SIZE_LIBRARY_GLFW=$total_size" >> $GITHUB_ENV
- name: Compiling with contrib.glfw3
working-directory: ${{github.workspace}}/emscripten-glfw
Expand All @@ -44,6 +49,11 @@ jobs:
emcc --version
emcc --use-port=contrib.glfw3 examples/example_minimal/main.cpp -O2 -o build-with-port/index.html
ls -l build-with-port
js_size=$(stat --format="%s" build-with-port/index.js)
wasm_size=$(stat --format="%s" build-with-port/index.wasm)
total_size=$((js_size + wasm_size))
delta=$(echo "scale=2; $js_size / TOTAL_SIZE_LIBRARY_GLFW" | bc)
echo "js:$js_size, wasm:$wasm_size, total: $total_size | ${delta}x"
- name: Compiling with contrib.glfw3 (small)
working-directory: ${{github.workspace}}/emscripten-glfw
Expand All @@ -53,3 +63,9 @@ jobs:
emcc --version
emcc --use-port=contrib.glfw3:disableWarning=true:disableMultiWindow=true:disableJoystick=true examples/example_minimal/main.cpp -O2 -o build-with-port-small/index.html
ls -l build-with-port-small
js_size=$(stat --format="%s" build-with-port-small/index.js)
wasm_size=$(stat --format="%s" build-with-port-small/index.wasm)
total_size=$((js_size + wasm_size))
echo "js:$js_size, wasm:$wasm_size, total: $total_size"
delta=$(echo "scale=2; $js_size / TOTAL_SIZE_LIBRARY_GLFW" | bc)
echo "js:$js_size, wasm:$wasm_size, total: $total_size | ${delta}x"

0 comments on commit 8493bcb

Please sign in to comment.