Skip to content

Commit 48874a9

Browse files
btsimonhchearon
authored andcommitted
remove artifacts of build that have no use in release
(cherry picked from commit d011854)
1 parent 8b238be commit 48874a9

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

.github/workflows/prebuild.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ jobs:
261261
- name: Bundle pt 2
262262
shell: msys2 {0}
263263
run: |
264+
# removes object files and debug
265+
. prebuild/Windows/bundle.sh
264266
./depends.exe -c -oc depends.csv build\\Release\\canvas.node || true
265267
[ -f depends.csv ] || { echo "error invoking depends.exe"; exit 1; }
266268
@@ -272,7 +274,7 @@ jobs:
272274
for dll in $copies; do
273275
cp /ucrt64/bin/$dll build/Release
274276
done;
275-
277+
276278
- name: Test binary
277279
# By not running in msys2, this doesn't have access to the msys2 libs
278280
run: npm test

prebuild/Linux/bundle.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ apt install -y patchelf pax-utils
44

55
copies=$(lddtree -l build/Release/canvas.node | sed -r -e '/^\/lib/d' -e '/canvas.node$/d');
66

7+
# remove the big artifacts we will not use.
8+
rm -r build/Release/.deps
9+
rm -r build/Release/obj.target
10+
711
for so in $copies; do
812
cp $so build/Release
913
# Set the run_path for all dependencies.

prebuild/Windows/bundle.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# remove the big artifacts we will not use.
2+
# on windows this is >45mbytes.
3+
rm -r build/Release/obj
4+
rm -r build/Release/canvas.exp
5+
rm -r build/Release/canvas.iobj
6+
rm -r build/Release/canvas.ipdb
7+
rm -r build/Release/canvas.lib
8+
rm -r build/Release/canvas.pdb
9+

prebuild/macOS/bundle.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
build=build/Release
22

3+
# remove the big artifacts we will not use.
4+
rm -r build/Release/.deps
5+
rm -r build/Release/obj.target
6+
37
~/Library/Python/*/bin/macpack build/Release/canvas.node -d .
48

0 commit comments

Comments
 (0)