File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
.github/actions/cdk-deploy
infrastructure/aws/lambda Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 6969 shell : bash
7070 working-directory : ${{ inputs.dir }}
7171 run : uv run npm run cdk -- synth
72-
72+
73+ - name : Check Asset Sizes
74+ shell : bash
75+ working-directory : ${{ inputs.dir }}
76+ run : |
77+ MAX_SIZE_BYTES=262144000 # 262 MB in bytes
78+ for dir in cdk.out/asset.*; do
79+ if [ -d "$dir" ]; then
80+ size=$(du -sb "$dir" | cut -f1)
81+ if [ "$size" -gt $MAX_SIZE_BYTES ]; then
82+ echo "Directory $dir exceeds 262 MB with size $size bytes (max: $MAX_SIZE_BYTES bytes)."
83+ exit 1
84+ fi
85+ echo "Asset directory $dir size: $size bytes"
86+ fi
87+ done
88+ echo "All asset directories are within size limits."
89+
7390 - name : Deploy Test
7491 if : ${{ inputs.skip_deploy == 'false' }}
7592 id : deploy_titiler_cmr_stack
Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ RUN rm -rdf /asset/numpy/doc/ /asset/bin /asset/geos_license /asset/Misc
3030RUN rm -rdf /asset/boto3*
3131RUN rm -rdf /asset/botocore*
3232
33+ # Strip debug symbols from compiled C/C++ code (except for numpy.libs!)
34+ RUN cd /asset && \
35+ find . -type f -name '*.so*' \
36+ -not -path "./numpy.libs/*" \
37+ -exec strip --strip-unneeded {} \;
38+
3339COPY infrastructure/aws/lambda/handler.py /asset/handler.py
3440
3541CMD ["echo" , "hello world" ]
You can’t perform that action at this time.
0 commit comments