Skip to content

Commit ab39f1c

Browse files
authoredAug 9, 2023
chore(ci): Cleanup CI (#7787)
**Description**: - Disable `crev` action. - Cleanup compilation check matrix. - Update `cargo-hack`.
1 parent 1c2eb88 commit ab39f1c

File tree

5 files changed

+48
-60
lines changed

5 files changed

+48
-60
lines changed
 

‎.github/workflows/CI.yml

+26-48
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,21 @@ jobs:
7575
git config --global user.name 'SWC bot'
7676
git config --global user.email 'bot@swc.rs'
7777
78-
- name: Install cargo-crev
79-
uses: baptiste0928/cargo-install@v1.1.0
80-
with:
81-
crate: cargo-crev
82-
version: "=0.23.5"
83-
locked: true
84-
85-
- name: Configure cargo-crev
86-
run: |
87-
cargo crev trust --level high https://github.com/kdy1/crev-proofs
88-
cargo crev repo fetch all
89-
90-
- name: Check dependencies
91-
run: |
92-
./scripts/crev/verify.sh
78+
# - name: Install cargo-crev
79+
# uses: baptiste0928/cargo-install@v2
80+
# with:
81+
# crate: cargo-crev
82+
# version: "=0.24.3"
83+
# # locked: true
84+
85+
# - name: Configure cargo-crev
86+
# run: |
87+
# cargo crev trust --level high https://github.com/kdy1/crev-proofs
88+
# cargo crev repo fetch all
89+
90+
# - name: Check dependencies
91+
# run: |
92+
# ./scripts/crev/verify.sh
9393

9494
cargo-deny:
9595
name: Check license of dependencies
@@ -105,7 +105,7 @@ jobs:
105105
profile: minimal
106106

107107
- name: Install cargo-deny
108-
uses: baptiste0928/cargo-install@v1.1.0
108+
uses: baptiste0928/cargo-install@v2
109109
with:
110110
crate: cargo-deny
111111
version: "0.11.3"
@@ -232,8 +232,6 @@ jobs:
232232
- crate: swc
233233
os: ubuntu-latest
234234
runner: ubuntu-latest
235-
check: |
236-
cargo hack check --feature-powerset --no-dev-deps --exclude-features debug --exclude-features plugin --exclude-features plugin_transform_schema_v1 --exclude-features plugin_transform_schema_vtest --exclude-features plugin_transform_host_js --exclude-features plugin_transform_host_native
237235
- crate: swc
238236
os: windows-latest
239237
runner: windows-latest
@@ -243,16 +241,12 @@ jobs:
243241
- crate: swc_bundler
244242
os: ubuntu-latest
245243
runner: ubuntu-latest
246-
check: |
247-
cargo hack check --feature-powerset --no-dev-deps
248244
- crate: swc_cached
249245
os: ubuntu-latest
250246
runner: ubuntu-latest
251247
- crate: swc_common
252248
os: ubuntu-latest
253249
runner: ubuntu-latest
254-
check: |
255-
cargo hack check --feature-powerset --no-dev-deps --exclude-features plugin_transform_schema_vtest --exclude-features __plugin --exclude-features __plugin_mode --exclude-features __plugin_rt --exclude-features __rkyv --exclude-features rkyv-impl
256250
- crate: swc_common
257251
os: windows-latest
258252
runner: windows-latest
@@ -310,8 +304,6 @@ jobs:
310304
- crate: swc_ecma_ast
311305
os: ubuntu-latest
312306
runner: ubuntu-latest
313-
check: |
314-
cargo hack check --feature-powerset --no-dev-deps --exclude-features __rkyv
315307
- crate: swc_ecma_codegen
316308
os: ubuntu-latest
317309
runner: ubuntu-latest
@@ -333,8 +325,6 @@ jobs:
333325
- crate: swc_ecma_loader
334326
os: ubuntu-latest
335327
runner: ubuntu-latest
336-
check: |
337-
cargo hack check --feature-powerset --no-dev-deps
338328
- crate: swc_ecma_loader
339329
os: windows-latest
340330
runner: windows-latest
@@ -365,21 +355,15 @@ jobs:
365355
- crate: swc_ecma_transforms
366356
os: ubuntu-latest
367357
runner: ubuntu-latest
368-
check: |
369-
cargo hack check --feature-powerset --no-dev-deps
370358
- crate: swc_ecma_transforms_base
371359
os: ubuntu-latest
372360
runner: ubuntu-latest
373-
check: |
374-
cargo hack check --feature-powerset --no-dev-deps
375361
- crate: swc_ecma_transforms_classes
376362
os: ubuntu-latest
377363
runner: ubuntu-latest
378364
- crate: swc_ecma_transforms_compat
379365
os: ubuntu-latest
380366
runner: ubuntu-latest
381-
check: |
382-
cargo hack check --feature-powerset --no-dev-deps
383367
- crate: swc_ecma_transforms_macros
384368
os: ubuntu-latest
385369
runner: ubuntu-latest
@@ -392,8 +376,6 @@ jobs:
392376
- crate: swc_ecma_transforms_optimization
393377
os: ubuntu-latest
394378
runner: ubuntu-latest
395-
check: |
396-
cargo hack check --feature-powerset --no-dev-deps
397379
- crate: swc_ecma_transforms_proposal
398380
os: ubuntu-latest
399381
runner: ubuntu-latest
@@ -409,16 +391,15 @@ jobs:
409391
- crate: swc_ecma_transforms_typescript
410392
os: ubuntu-latest
411393
runner: ubuntu-latest
394+
- crate: swc_ecma_usage_analyzer
395+
os: ubuntu-latest
396+
runner: ubuntu-latest
412397
- crate: swc_ecma_utils
413398
os: ubuntu-latest
414399
runner: ubuntu-latest
415-
check: |
416-
cargo hack check --feature-powerset --no-dev-deps
417400
- crate: swc_ecma_visit
418401
os: ubuntu-latest
419402
runner: ubuntu-latest
420-
check: |
421-
cargo hack check --feature-powerset --no-dev-deps
422403
- crate: swc_ecmascript
423404
os: ubuntu-latest
424405
runner: ubuntu-latest
@@ -479,9 +460,6 @@ jobs:
479460
- crate: swc_node_bundler
480461
os: ubuntu-latest
481462
runner: ubuntu-latest
482-
check: |
483-
cargo check
484-
cargo check --no-default-features --features swc_v2
485463
- crate: swc_node_bundler
486464
os: windows-latest
487465
runner: windows-latest
@@ -677,7 +655,7 @@ jobs:
677655
env:
678656
SWC_FORCE_CONCURRENT: "1"
679657
run: |
680-
./scripts/ci/test-concurrent.sh ${{ matrix.settings.crate }}
658+
./scripts/github/test-concurrent.sh ${{ matrix.settings.crate }}
681659
682660
- name: Run cargo test (swc, concurrent)
683661
shell: bash
@@ -688,16 +666,16 @@ jobs:
688666
cargo test -p swc --features concurrent
689667
690668
- name: Install cargo-hack
691-
uses: baptiste0928/cargo-install@v1.1.0
692-
if: matrix.settings.os == 'ubuntu-latest' && matrix.settings.check
669+
uses: baptiste0928/cargo-install@v2
670+
if: matrix.settings.os == 'ubuntu-latest'
693671
with:
694672
crate: cargo-hack
695-
version: "0.5.7"
673+
version: "0.5.29"
674+
locked: true
696675

697676
- name: Check compilation
698-
if: matrix.settings.check
699-
working-directory: "crates/${{ matrix.settings.crate }}"
700-
run: "${{ matrix.settings.check }}"
677+
run: |
678+
./scripts/github/run-cargo-hack.sh ${{ matrix.settings.crate }}
701679
702680
node-test:
703681
name: Test node bindings - ${{ matrix.os }}

‎scripts/github/create-matrix.sh

-11
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,6 @@ do
2727
echo " runner: ubuntu-latest"
2828
fi
2929

30-
if echo $json_str | jq -e ".check.\"$crate\"" > /dev/null; then
31-
echo " check: |"
32-
33-
check_commands=$(echo $json_str | jq -e -r ".check.\"$crate\" | .[]")
34-
35-
while IFS= read -r line; do
36-
echo " $line"
37-
done <<< "$check_commands"
38-
fi
39-
40-
4130
if echo $json_str | jq -e "select(.os.macos | index(\"$crate\"))" > /dev/null; then
4231
echo "- crate: $crate"
4332
echo " os: macos-latest"

‎scripts/github/run-cargo-hack.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
5+
6+
crate=$1
7+
8+
echo "Running cargo hack for crate $crate"
9+
10+
# yq query syntax is weird, so we have to use jq
11+
json_str="$(yq -o=json $SCRIPT_DIR/tests.yml)"
12+
13+
14+
if echo $json_str | jq -e ".check.\"$crate\"" > /dev/null; then
15+
check_commands=$(echo $json_str | jq -e -r ".check.\"$crate\" | .[]")
16+
17+
while IFS= read -r line; do
18+
echo " Running '$line'"
19+
(cd "crates/$crate" && $line)
20+
done <<< "$check_commands"
21+
fi
File renamed without changes.

‎scripts/github/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ os:
2626
check:
2727
swc:
2828
# plugin feature is verified by other tasks
29-
- "cargo hack check --feature-powerset --no-dev-deps --exclude-features debug --exclude-features plugin --exclude-features plugin_transform_schema_v1 --exclude-features plugin_transform_schema_vtest"
29+
- "cargo hack check --feature-powerset --no-dev-deps --exclude-features debug --exclude-features plugin --exclude-features plugin_transform_schema_v1 --exclude-features plugin_transform_schema_vtest --exclude-features plugin_transform_host_js"
3030
swc_bundler:
3131
- "cargo hack check --feature-powerset --no-dev-deps"
3232
swc_common:

1 commit comments

Comments
 (1)

github-actions[bot] commented on Aug 9, 2023

@github-actions[bot]

Benchmark

Benchmark suite Current: ab39f1c Previous: 5c4bfa6 Ratio
es/full/bugs-1 286794 ns/iter (± 3633) 287876 ns/iter (± 8072) 1.00
es/full/minify/libraries/antd 1298189324 ns/iter (± 13011638) 1392069168 ns/iter (± 21509729) 0.93
es/full/minify/libraries/d3 275720328 ns/iter (± 2867271) 286221066 ns/iter (± 5170727) 0.96
es/full/minify/libraries/echarts 1041604870 ns/iter (± 7919599) 1126113265 ns/iter (± 14370420) 0.92
es/full/minify/libraries/jquery 84910444 ns/iter (± 92577) 86728891 ns/iter (± 1040161) 0.98
es/full/minify/libraries/lodash 98278004 ns/iter (± 270681) 100374788 ns/iter (± 976804) 0.98
es/full/minify/libraries/moment 49851508 ns/iter (± 370297) 50652282 ns/iter (± 336059) 0.98
es/full/minify/libraries/react 18067054 ns/iter (± 33560) 18193355 ns/iter (± 92280) 0.99
es/full/minify/libraries/terser 217363535 ns/iter (± 415949) 227318308 ns/iter (± 2089697) 0.96
es/full/minify/libraries/three 382321799 ns/iter (± 1693638) 408277012 ns/iter (± 7084686) 0.94
es/full/minify/libraries/typescript 2654891649 ns/iter (± 12866069) 2786302540 ns/iter (± 14661407) 0.95
es/full/minify/libraries/victory 555142479 ns/iter (± 1962492) 602682165 ns/iter (± 9733429) 0.92
es/full/minify/libraries/vue 120331600 ns/iter (± 290509) 124075794 ns/iter (± 1819759) 0.97
es/full/codegen/es3 35429 ns/iter (± 525) 35222 ns/iter (± 141) 1.01
es/full/codegen/es5 35163 ns/iter (± 76) 35283 ns/iter (± 44) 1.00
es/full/codegen/es2015 35069 ns/iter (± 112) 35216 ns/iter (± 80) 1.00
es/full/codegen/es2016 35002 ns/iter (± 165) 35317 ns/iter (± 90) 0.99
es/full/codegen/es2017 35067 ns/iter (± 46) 35379 ns/iter (± 175) 0.99
es/full/codegen/es2018 35107 ns/iter (± 70) 35293 ns/iter (± 85) 0.99
es/full/codegen/es2019 35117 ns/iter (± 93) 35300 ns/iter (± 131) 0.99
es/full/codegen/es2020 35079 ns/iter (± 60) 35243 ns/iter (± 77) 1.00
es/full/all/es3 171061426 ns/iter (± 652835) 175053517 ns/iter (± 931359) 0.98
es/full/all/es5 163586312 ns/iter (± 1002746) 167564224 ns/iter (± 726177) 0.98
es/full/all/es2015 123771266 ns/iter (± 538832) 126000162 ns/iter (± 522150) 0.98
es/full/all/es2016 122401576 ns/iter (± 516863) 125169582 ns/iter (± 969508) 0.98
es/full/all/es2017 122077248 ns/iter (± 1158475) 124421665 ns/iter (± 787893) 0.98
es/full/all/es2018 120143042 ns/iter (± 708535) 122583385 ns/iter (± 504731) 0.98
es/full/all/es2019 119202567 ns/iter (± 360171) 121523785 ns/iter (± 589310) 0.98
es/full/all/es2020 114944648 ns/iter (± 568754) 116813534 ns/iter (± 510089) 0.98
es/full/parser 528269 ns/iter (± 5526) 544813 ns/iter (± 4894) 0.97
es/full/base/fixer 18486 ns/iter (± 51) 19796 ns/iter (± 253) 0.93
es/full/base/resolver_and_hygiene 80328 ns/iter (± 170) 80101 ns/iter (± 231) 1.00
serialization of serde 298 ns/iter (± 0) 294 ns/iter (± 0) 1.01
css/minify/libraries/bootstrap 28185302 ns/iter (± 59442) 29445167 ns/iter (± 173940) 0.96
css/visitor/compare/clone 1626839 ns/iter (± 5372) 1648675 ns/iter (± 10522) 0.99
css/visitor/compare/visit_mut_span 1761517 ns/iter (± 4942) 1774500 ns/iter (± 7587) 0.99
css/visitor/compare/visit_mut_span_panic 1832947 ns/iter (± 2749) 1857192 ns/iter (± 5493) 0.99
css/visitor/compare/fold_span 2582034 ns/iter (± 14400) 2585131 ns/iter (± 17416) 1.00
css/visitor/compare/fold_span_panic 2758340 ns/iter (± 11455) 2796233 ns/iter (± 16021) 0.99
css/lexer/bootstrap_5_1_3 4454485 ns/iter (± 3689) 4398373 ns/iter (± 11811) 1.01
css/lexer/foundation_6_7_4 3746386 ns/iter (± 1607) 3702283 ns/iter (± 4254) 1.01
css/lexer/tailwind_3_1_1 711237 ns/iter (± 1900) 706062 ns/iter (± 890) 1.01
css/parser/bootstrap_5_1_3 19410330 ns/iter (± 44810) 19716344 ns/iter (± 206080) 0.98
css/parser/foundation_6_7_4 15575381 ns/iter (± 42073) 15582165 ns/iter (± 150253) 1.00
css/parser/tailwind_3_1_1 3003729 ns/iter (± 3227) 2961769 ns/iter (± 2633) 1.01
es/codegen/colors 735934 ns/iter (± 402262) 732968 ns/iter (± 402251) 1.00
es/codegen/large 2883592 ns/iter (± 1524055) 2896613 ns/iter (± 1532586) 1.00
es/codegen/with-parser/colors 44376 ns/iter (± 478) 44909 ns/iter (± 760) 0.99
es/codegen/with-parser/large 480434 ns/iter (± 1507) 486870 ns/iter (± 1079) 0.99
es/minify/libraries/antd 1126393489 ns/iter (± 10617312) 1229511917 ns/iter (± 13552842) 0.92
es/minify/libraries/d3 241758717 ns/iter (± 482888) 252332581 ns/iter (± 5173814) 0.96
es/minify/libraries/echarts 898595253 ns/iter (± 3824781) 974249925 ns/iter (± 14429441) 0.92
es/minify/libraries/jquery 74854508 ns/iter (± 215982) 75478859 ns/iter (± 452300) 0.99
es/minify/libraries/lodash 89077938 ns/iter (± 129105) 90124422 ns/iter (± 689763) 0.99
es/minify/libraries/moment 43964552 ns/iter (± 81184) 44328631 ns/iter (± 182014) 0.99
es/minify/libraries/react 16202302 ns/iter (± 29801) 16233584 ns/iter (± 104264) 1.00
es/minify/libraries/terser 188794652 ns/iter (± 597944) 195818558 ns/iter (± 4065256) 0.96
es/minify/libraries/three 323468521 ns/iter (± 463685) 343388591 ns/iter (± 8625917) 0.94
es/minify/libraries/typescript 2286819737 ns/iter (± 5747569) 2374232299 ns/iter (± 14432648) 0.96
es/minify/libraries/victory 475845467 ns/iter (± 1098550) 520614332 ns/iter (± 22911228) 0.91
es/minify/libraries/vue 108132918 ns/iter (± 400849) 110887849 ns/iter (± 1322447) 0.98
es/visitor/compare/clone 1933969 ns/iter (± 6449) 1947856 ns/iter (± 5436) 0.99
es/visitor/compare/visit_mut_span 2278787 ns/iter (± 6851) 2295563 ns/iter (± 6774) 0.99
es/visitor/compare/visit_mut_span_panic 2317488 ns/iter (± 3396) 2339644 ns/iter (± 7005) 0.99
es/visitor/compare/fold_span 3341104 ns/iter (± 6742) 3356863 ns/iter (± 15320) 1.00
es/visitor/compare/fold_span_panic 3477466 ns/iter (± 10494) 3523436 ns/iter (± 11810) 0.99
es/lexer/colors 13271 ns/iter (± 39) 13294 ns/iter (± 9) 1.00
es/lexer/angular 6112025 ns/iter (± 4903) 6164901 ns/iter (± 11700) 0.99
es/lexer/backbone 801095 ns/iter (± 973) 804536 ns/iter (± 828) 1.00
es/lexer/jquery 4530198 ns/iter (± 4276) 4552808 ns/iter (± 3523) 1.00
es/lexer/jquery mobile 6916329 ns/iter (± 6621) 6950852 ns/iter (± 7447) 1.00
es/lexer/mootools 3589921 ns/iter (± 3773) 3603450 ns/iter (± 1031) 1.00
es/lexer/underscore 675523 ns/iter (± 839) 672262 ns/iter (± 1335) 1.00
es/lexer/three 21486697 ns/iter (± 17953) 21647864 ns/iter (± 33133) 0.99
es/lexer/yui 3841754 ns/iter (± 3345) 3922237 ns/iter (± 2616) 0.98
es/parser/colors 27254 ns/iter (± 33) 27938 ns/iter (± 113) 0.98
es/parser/angular 13459263 ns/iter (± 59499) 13929090 ns/iter (± 155762) 0.97
es/parser/backbone 1984418 ns/iter (± 12507) 2015011 ns/iter (± 8096) 0.98
es/parser/jquery 10873496 ns/iter (± 44783) 11248296 ns/iter (± 231018) 0.97
es/parser/jquery mobile 16621099 ns/iter (± 43798) 17097696 ns/iter (± 253751) 0.97
es/parser/mootools 8376271 ns/iter (± 12871) 8512785 ns/iter (± 52038) 0.98
es/parser/underscore 1717202 ns/iter (± 8584) 1747021 ns/iter (± 6983) 0.98
es/parser/three 46682373 ns/iter (± 107811) 49212160 ns/iter (± 775556) 0.95
es/parser/yui 8295505 ns/iter (± 17681) 8440791 ns/iter (± 46854) 0.98
es/preset-env/usage/builtin_type 137297 ns/iter (± 32512) 136492 ns/iter (± 33439) 1.01
es/preset-env/usage/property 17102 ns/iter (± 57) 16579 ns/iter (± 56) 1.03
es/resolver/typescript 87199347 ns/iter (± 857765) 90529665 ns/iter (± 1490751) 0.96
es/fixer/typescript 62647428 ns/iter (± 519252) 65490698 ns/iter (± 639164) 0.96
es/hygiene/typescript 129551350 ns/iter (± 1190716) 136284853 ns/iter (± 1662998) 0.95
es/resolver_with_hygiene/typescript 239060431 ns/iter (± 841759) 254207748 ns/iter (± 3764181) 0.94
es/visitor/base-perf/module_clone 58515 ns/iter (± 384) 59878 ns/iter (± 658) 0.98
es/visitor/base-perf/fold_empty 62608 ns/iter (± 485) 63831 ns/iter (± 260) 0.98
es/visitor/base-perf/fold_noop_impl_all 62706 ns/iter (± 178) 64172 ns/iter (± 481) 0.98
es/visitor/base-perf/fold_noop_impl_vec 63374 ns/iter (± 288) 65333 ns/iter (± 508) 0.97
es/visitor/base-perf/boxing_boxed_clone 57 ns/iter (± 0) 56 ns/iter (± 1) 1.02
es/visitor/base-perf/boxing_unboxed_clone 40 ns/iter (± 0) 40 ns/iter (± 0) 1
es/visitor/base-perf/boxing_boxed 107 ns/iter (± 0) 110 ns/iter (± 0) 0.97
es/visitor/base-perf/boxing_unboxed 75 ns/iter (± 0) 77 ns/iter (± 0) 0.97
es/visitor/base-perf/visit_empty 0 ns/iter (± 0) 0 ns/iter (± 0) NaN
es/visitor/base-perf/visit_contains_this 2551 ns/iter (± 22) 2513 ns/iter (± 12) 1.02
es/base/parallel/resolver/typescript 4277675482 ns/iter (± 207114186) 4423503120 ns/iter (± 269323455) 0.97
es/base/parallel/hygiene/typescript 1453684124 ns/iter (± 28918351) 1479405366 ns/iter (± 15141888) 0.98
misc/visitors/time-complexity/time 5 134 ns/iter (± 0) 134 ns/iter (± 1) 1
misc/visitors/time-complexity/time 10 378 ns/iter (± 3) 370 ns/iter (± 1) 1.02
misc/visitors/time-complexity/time 15 673 ns/iter (± 7) 668 ns/iter (± 54) 1.01
misc/visitors/time-complexity/time 20 1055 ns/iter (± 3) 878 ns/iter (± 3) 1.20
misc/visitors/time-complexity/time 40 3570 ns/iter (± 8) 3570 ns/iter (± 42) 1
misc/visitors/time-complexity/time 60 7323 ns/iter (± 22) 8235 ns/iter (± 2) 0.89
es/full-target/es2016 232904 ns/iter (± 954) 239293 ns/iter (± 995) 0.97
es/full-target/es2017 219149 ns/iter (± 446) 227778 ns/iter (± 1338) 0.96
es/full-target/es2018 208146 ns/iter (± 609) 216748 ns/iter (± 704) 0.96
es2020_nullish_coalescing 68280 ns/iter (± 474) 71051 ns/iter (± 506) 0.96
es2020_optional_chaining 79019 ns/iter (± 345) 80446 ns/iter (± 245) 0.98
es2022_class_properties 116978 ns/iter (± 323) 118280 ns/iter (± 421) 0.99
es2018_object_rest_spread 72668 ns/iter (± 215) 72755 ns/iter (± 200) 1.00
es2019_optional_catch_binding 62642 ns/iter (± 303) 63548 ns/iter (± 284) 0.99
es2017_async_to_generator 61527 ns/iter (± 455) 63262 ns/iter (± 218) 0.97
es2016_exponentiation 66576 ns/iter (± 228) 67307 ns/iter (± 197) 0.99
es2015_arrow 70180 ns/iter (± 203) 70434 ns/iter (± 182) 1.00
es2015_block_scoped_fn 66678 ns/iter (± 105) 67461 ns/iter (± 237) 0.99
es2015_block_scoping 120913 ns/iter (± 531) 120805 ns/iter (± 426) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.