Skip to content

Commit e938d58

Browse files
authored
FIX Avoid compressing files twice when deploying (pyodide#1767)
1 parent 66b3322 commit e938d58

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.circleci/config.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- restore_cache:
4343
keys:
44-
- -{{ checksum "Makefile.envs" }}-v20201205-
44+
- -{{ checksum "Makefile.envs" }}-v20201205-
4545

4646
- run:
4747
name: build emsdk
@@ -88,7 +88,6 @@ jobs:
8888
paths:
8989
- .
9090

91-
9291
- store_artifacts:
9392
path: /root/repo/build/
9493

@@ -102,7 +101,7 @@ jobs:
102101

103102
- restore_cache:
104103
keys:
105-
- -{{ checksum "Makefile.envs" }}-v20201205-
104+
- -{{ checksum "Makefile.envs" }}-v20201205-
106105

107106
- run:
108107
name: build packages
@@ -207,7 +206,6 @@ jobs:
207206
npm install
208207
npm test
209208
210-
211209
benchmark:
212210
<<: *defaults
213211
steps:
@@ -252,7 +250,7 @@ jobs:
252250
- run:
253251
name: Deploy to pyodide-cdn2.iodide.io
254252
command: |
255-
find build/ -type f -exec sh -c "echo \"Compressing {}\"; gzip {}; mv {}.gz {};" \;
253+
find build/ -type f -print0 | xargs -0 -n1 -I@ bash -c "echo \"Compressing @\"; gzip @; mv @.gz @;"
256254
aws s3 sync build/ "s3://pyodide-cdn2.iodide.io/v${CIRCLE_TAG}/full/" --exclude '*.data' --cache-control 'max-age=30758400, immutable, public' --content-encoding 'gzip' # 1 year cache
257255
aws s3 sync build/ "s3://pyodide-cdn2.iodide.io/v${CIRCLE_TAG}/full/" --exclude '*' --include '*.data' --cache-control 'max-age=30758400, immutable, public' --content-type 'application/wasm' --content-encoding 'gzip' # 1 year
258256
# update 301 redirect for the /latest/* route.
@@ -281,7 +279,7 @@ jobs:
281279
- run:
282280
name: Deploy to pyodide-cdn2.iodide.io
283281
command: |
284-
find build/ -type f -exec sh -c "echo \"Compressing {}\"; gzip {}; mv {}.gz {};" \;
282+
find build/ -type f -print0 | xargs -0 -n1 -I@ bash -c "echo \"Compressing @\"; gzip @; mv @.gz @;"
285283
aws s3 rm --recursive "s3://pyodide-cdn2.iodide.io/dev/full/"
286284
aws s3 sync build/ "s3://pyodide-cdn2.iodide.io/dev/full/" --exclude '*.data' --cache-control 'max-age=3600, public' --content-encoding 'gzip' # 1 hour cache
287285
aws s3 sync build/ "s3://pyodide-cdn2.iodide.io/dev/full/" --exclude '*' --include '*.data' --cache-control 'max-age=3600, public' --content-type 'application/wasm' --content-encoding 'gzip' # 1 hour cache
@@ -344,7 +342,6 @@ workflows:
344342
tags:
345343
only: /.*/
346344

347-
348345
- test-main:
349346
name: test-core-chrome-webworker
350347
test-params: -k chrome src/tests/test_webworker.py
@@ -363,7 +360,6 @@ workflows:
363360
tags:
364361
only: /.*/
365362

366-
367363
- test-main:
368364
name: test-packages-chrome
369365
test-params: -k chrome packages/test* packages/*/test*
@@ -391,7 +387,6 @@ workflows:
391387
tags:
392388
only: /.*/
393389

394-
395390
- test-emsdk:
396391
requires:
397392
- build-core

0 commit comments

Comments
 (0)