|
25 | 25 | - rust-clippy |
26 | 26 | - rust-fmt |
27 | 27 | - ktlint |
28 | | - - swiftlint |
29 | | - - swiftformat |
| 28 | + - nss-bindings |
30 | 29 | - gradle |
31 | | - - ios-tests |
| 30 | + - ios-artifacts |
32 | 31 | - python-tests |
33 | 32 | """ |
34 | 33 |
|
@@ -364,39 +363,13 @@ def run_ktlint(): |
364 | 363 | run_command([GRADLE, "ktlint", "detekt"]) |
365 | 364 |
|
366 | 365 |
|
367 | | -def run_swiftlint(): |
368 | | - if on_darwin(): |
369 | | - run_command(["swiftlint", "--strict"]) |
370 | | - elif not docker_installed(): |
371 | | - print("WARNING: On non-Darwin hosts, docker is required to run swiftlint") |
372 | | - print("WARNING: skipping swiftlint on non-Darwin host") |
373 | | - else: |
374 | | - cwd = os.getcwd() |
375 | | - |
376 | | - run_command( |
377 | | - [ |
378 | | - "docker", |
379 | | - "run", |
380 | | - "-it", |
381 | | - "--rm", |
382 | | - "-v", |
383 | | - f"{cwd}:{cwd}", |
384 | | - "-w", |
385 | | - cwd, |
386 | | - "ghcr.io/realm/swiftlint:latest", |
387 | | - "swiftlint", |
388 | | - "--strict", |
389 | | - ] |
390 | | - ) |
391 | | - |
392 | | - |
393 | 366 | def run_gradle_tests(): |
394 | 367 | run_command([GRADLE, "test"]) |
395 | 368 |
|
396 | 369 |
|
397 | | -def run_ios_tests(): |
| 370 | +def build_ios_artifacts(): |
398 | 371 | if on_darwin(): |
399 | | - run_command([AUTOMATION_DIR / "run_ios_tests.sh"]) |
| 372 | + run_command([AUTOMATION_DIR / "build_ios_artifacts.sh"]) |
400 | 373 | else: |
401 | 374 | print("WARNING: skipping iOS tests on non-Darwin host") |
402 | 375 |
|
@@ -430,41 +403,6 @@ def cargo_fmt(package=None, fix_issues=False): |
430 | 403 | run_command(cmdline) |
431 | 404 |
|
432 | 405 |
|
433 | | -def swift_format(): |
434 | | - swift_format_args = [ |
435 | | - "megazords", |
436 | | - "--exclude", |
437 | | - "**/Generated", |
438 | | - "--exclude", |
439 | | - "megazords/ios-rust/Sources/MozillaRustComponentsWrapper/Nimbus/Utils", |
440 | | - "--lint", |
441 | | - "--swiftversion", |
442 | | - "5", |
443 | | - ] |
444 | | - if on_darwin(): |
445 | | - run_command(["swiftformat", *swift_format_args]) |
446 | | - elif not docker_installed(): |
447 | | - print("WARNING: On non-Darwin hosts, docker is required to run swiftformat") |
448 | | - print("WARNING: skipping swiftformat on non-Darwin host") |
449 | | - else: |
450 | | - cwd = os.getcwd() |
451 | | - |
452 | | - run_command( |
453 | | - [ |
454 | | - "docker", |
455 | | - "run", |
456 | | - "-it", |
457 | | - "--rm", |
458 | | - "-v", |
459 | | - f"{cwd}:{cwd}", |
460 | | - "-w", |
461 | | - cwd, |
462 | | - "ghcr.io/nicklockwood/swiftformat:latest", |
463 | | - *swift_format_args, |
464 | | - ] |
465 | | - ) |
466 | | - |
467 | | - |
468 | 406 | def check_for_fmt_changes(branch_changes): |
469 | 407 | print() |
470 | 408 | if branch_changes.has_unstanged_changes(): |
@@ -556,14 +494,13 @@ def calc_steps(args): |
556 | 494 | yield Step("cargo fmt", cargo_fmt) |
557 | 495 | elif args.mode == "ktlint": |
558 | 496 | yield Step("ktlint", run_ktlint) |
559 | | - elif args.mode == "swiftlint": |
560 | | - yield Step("swiftlint", run_swiftlint) |
561 | | - elif args.mode == "swiftformat": |
562 | | - yield Step("swiftformat", swift_format) |
| 497 | + elif args.mode == "nss-bindings": |
| 498 | + print_rust_environment() |
| 499 | + yield Step("NSS bindings test", run_nss_bindings_test) |
563 | 500 | elif args.mode == "gradle": |
564 | 501 | yield Step("gradle tests", run_gradle_tests) |
565 | | - elif args.mode == "ios-tests": |
566 | | - yield Step("ios tests", run_ios_tests) |
| 502 | + elif args.mode == "ios-artifacts": |
| 503 | + yield Step("ios artifacts", build_ios_artifacts) |
567 | 504 | elif args.mode == "python-tests": |
568 | 505 | yield Step("python tests", run_python_tests) |
569 | 506 | else: |
|
0 commit comments