@invarn/cibuild 2.9.4 → 2.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-35SI42CD.mjs +1 -0
- package/dist/chunk-IC45KVLJ.mjs +1 -0
- package/dist/chunk-XDY4V23V.mjs +1 -0
- package/dist/cli.cjs +14 -14
- package/dist/commands.mjs +1 -0
- package/dist/lib.mjs +3934 -0
- package/package.json +6 -10
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -399
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts +0 -38
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.js +0 -222
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts +0 -41
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.js +0 -324
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts +0 -2
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts.map +0 -1
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.js +0 -382
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts +0 -29
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts.map +0 -1
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.js +0 -160
- package/dist/src/commands/android-gms-guard.test.d.ts +0 -9
- package/dist/src/commands/android-gms-guard.test.d.ts.map +0 -1
- package/dist/src/commands/android-gms-guard.test.js +0 -78
- package/dist/src/commands/android-java-version.test.d.ts +0 -12
- package/dist/src/commands/android-java-version.test.d.ts.map +0 -1
- package/dist/src/commands/android-java-version.test.js +0 -209
- package/dist/src/commands/android-scanner-java.test.d.ts +0 -2
- package/dist/src/commands/android-scanner-java.test.d.ts.map +0 -1
- package/dist/src/commands/android-scanner-java.test.js +0 -130
- package/dist/src/commands/android-scanner.d.ts +0 -250
- package/dist/src/commands/android-scanner.d.ts.map +0 -1
- package/dist/src/commands/android-scanner.js +0 -1639
- package/dist/src/commands/build.d.ts +0 -215
- package/dist/src/commands/build.d.ts.map +0 -1
- package/dist/src/commands/build.js +0 -1433
- package/dist/src/commands/build.test.d.ts +0 -13
- package/dist/src/commands/build.test.d.ts.map +0 -1
- package/dist/src/commands/build.test.js +0 -121
- package/dist/src/commands/detect-platform.d.ts +0 -13
- package/dist/src/commands/detect-platform.d.ts.map +0 -1
- package/dist/src/commands/detect-platform.js +0 -51
- package/dist/src/commands/detect-project.d.ts +0 -7
- package/dist/src/commands/detect-project.d.ts.map +0 -1
- package/dist/src/commands/detect-project.js +0 -12
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts +0 -26
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts.map +0 -1
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.js +0 -196
- package/dist/src/commands/edit.d.ts +0 -12
- package/dist/src/commands/edit.d.ts.map +0 -1
- package/dist/src/commands/edit.js +0 -652
- package/dist/src/commands/edit.test.d.ts +0 -6
- package/dist/src/commands/edit.test.d.ts.map +0 -1
- package/dist/src/commands/edit.test.js +0 -45
- package/dist/src/commands/fidelity-trim.d.ts +0 -13
- package/dist/src/commands/fidelity-trim.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.js +0 -21
- package/dist/src/commands/fidelity-trim.test.d.ts +0 -8
- package/dist/src/commands/fidelity-trim.test.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.test.js +0 -79
- package/dist/src/commands/file-secret-collector.d.ts +0 -50
- package/dist/src/commands/file-secret-collector.d.ts.map +0 -1
- package/dist/src/commands/file-secret-collector.js +0 -217
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts +0 -38
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts.map +0 -1
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.js +0 -300
- package/dist/src/commands/github-workflow.d.ts +0 -5
- package/dist/src/commands/github-workflow.d.ts.map +0 -1
- package/dist/src/commands/github-workflow.js +0 -45
- package/dist/src/commands/index.d.ts +0 -33
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -33
- package/dist/src/commands/init.d.ts +0 -20
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js +0 -264
- package/dist/src/commands/ios-scanner.d.ts +0 -104
- package/dist/src/commands/ios-scanner.d.ts.map +0 -1
- package/dist/src/commands/ios-scanner.js +0 -492
- package/dist/src/commands/ios-scheme-ranking.test.d.ts +0 -2
- package/dist/src/commands/ios-scheme-ranking.test.d.ts.map +0 -1
- package/dist/src/commands/ios-scheme-ranking.test.js +0 -264
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts +0 -30
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/local-properties-reaches-every-workflow.test.js +0 -146
- package/dist/src/commands/reset.d.ts +0 -7
- package/dist/src/commands/reset.d.ts.map +0 -1
- package/dist/src/commands/reset.js +0 -81
- package/dist/src/commands/run.d.ts +0 -22
- package/dist/src/commands/run.d.ts.map +0 -1
- package/dist/src/commands/run.js +0 -141
- package/dist/src/commands/secrets-sync-workflow.d.ts +0 -15
- package/dist/src/commands/secrets-sync-workflow.d.ts.map +0 -1
- package/dist/src/commands/secrets-sync-workflow.js +0 -255
- package/dist/src/commands/secrets-upload.d.ts +0 -21
- package/dist/src/commands/secrets-upload.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.js +0 -177
- package/dist/src/commands/secrets-upload.test.d.ts +0 -5
- package/dist/src/commands/secrets-upload.test.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.test.js +0 -60
- package/dist/src/commands/validate.d.ts +0 -10
- package/dist/src/commands/validate.d.ts.map +0 -1
- package/dist/src/commands/validate.js +0 -46
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -47
- package/dist/src/envman/cli.d.ts +0 -21
- package/dist/src/envman/cli.d.ts.map +0 -1
- package/dist/src/envman/cli.js +0 -240
- package/dist/src/envman/envman.d.ts +0 -83
- package/dist/src/envman/envman.d.ts.map +0 -1
- package/dist/src/envman/envman.js +0 -361
- package/dist/src/envman/envman.test.d.ts +0 -5
- package/dist/src/envman/envman.test.d.ts.map +0 -1
- package/dist/src/envman/envman.test.js +0 -236
- package/dist/src/envman/envstore-round-trip.test.d.ts +0 -27
- package/dist/src/envman/envstore-round-trip.test.d.ts.map +0 -1
- package/dist/src/envman/envstore-round-trip.test.js +0 -130
- package/dist/src/envman/index.d.ts +0 -23
- package/dist/src/envman/index.d.ts.map +0 -1
- package/dist/src/envman/index.js +0 -23
- package/dist/src/envman/shim.d.ts +0 -16
- package/dist/src/envman/shim.d.ts.map +0 -1
- package/dist/src/envman/shim.js +0 -66
- package/dist/src/envman/types.d.ts +0 -55
- package/dist/src/envman/types.d.ts.map +0 -1
- package/dist/src/envman/types.js +0 -12
- package/dist/src/lib.d.ts +0 -33
- package/dist/src/lib.d.ts.map +0 -1
- package/dist/src/lib.js +0 -37
- package/dist/src/pipeline.d.ts +0 -3
- package/dist/src/pipeline.d.ts.map +0 -1
- package/dist/src/pipeline.js +0 -57
- package/dist/src/runner-node-step.test.d.ts +0 -12
- package/dist/src/runner-node-step.test.d.ts.map +0 -1
- package/dist/src/runner-node-step.test.js +0 -61
- package/dist/src/runner.d.ts +0 -31
- package/dist/src/runner.d.ts.map +0 -1
- package/dist/src/runner.js +0 -240
- package/dist/src/shared/detect-project.d.ts +0 -57
- package/dist/src/shared/detect-project.d.ts.map +0 -1
- package/dist/src/shared/detect-project.js +0 -219
- package/dist/src/shared/detect-project.test.d.ts +0 -2
- package/dist/src/shared/detect-project.test.d.ts.map +0 -1
- package/dist/src/shared/detect-project.test.js +0 -161
- package/dist/src/shared/git.d.ts +0 -25
- package/dist/src/shared/git.d.ts.map +0 -1
- package/dist/src/shared/git.js +0 -53
- package/dist/src/shared/git.test.d.ts +0 -9
- package/dist/src/shared/git.test.d.ts.map +0 -1
- package/dist/src/shared/git.test.js +0 -66
- package/dist/src/shared/gitignore.d.ts +0 -6
- package/dist/src/shared/gitignore.d.ts.map +0 -1
- package/dist/src/shared/gitignore.js +0 -26
- package/dist/src/shared/gradle-settings.d.ts +0 -49
- package/dist/src/shared/gradle-settings.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.js +0 -138
- package/dist/src/shared/gradle-settings.test.d.ts +0 -2
- package/dist/src/shared/gradle-settings.test.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.test.js +0 -65
- package/dist/src/shared/prompts.d.ts +0 -30
- package/dist/src/shared/prompts.d.ts.map +0 -1
- package/dist/src/shared/prompts.js +0 -121
- package/dist/src/shared/xcode-container.test.d.ts +0 -2
- package/dist/src/shared/xcode-container.test.d.ts.map +0 -1
- package/dist/src/shared/xcode-container.test.js +0 -123
- package/dist/src/step-marker.d.ts +0 -12
- package/dist/src/step-marker.d.ts.map +0 -1
- package/dist/src/step-marker.js +0 -29
- package/dist/src/step-marker.test.d.ts +0 -11
- package/dist/src/step-marker.test.d.ts.map +0 -1
- package/dist/src/step-marker.test.js +0 -45
- package/dist/src/types.d.ts +0 -58
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts +0 -28
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts.map +0 -1
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.js +0 -223
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts +0 -20
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.js +0 -201
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts +0 -37
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.js +0 -255
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts +0 -32
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts.map +0 -1
- package/dist/src/yaml/a-missing-credential-is-loud.test.js +0 -301
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts +0 -18
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts.map +0 -1
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.js +0 -66
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts +0 -34
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.js +0 -218
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts +0 -27
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.js +0 -126
- package/dist/src/yaml/bitrise-compat.d.ts +0 -65
- package/dist/src/yaml/bitrise-compat.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.js +0 -206
- package/dist/src/yaml/bitrise-compat.test.d.ts +0 -5
- package/dist/src/yaml/bitrise-compat.test.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.test.js +0 -347
- package/dist/src/yaml/cache-key-missing-file.test.d.ts +0 -12
- package/dist/src/yaml/cache-key-missing-file.test.d.ts.map +0 -1
- package/dist/src/yaml/cache-key-missing-file.test.js +0 -116
- package/dist/src/yaml/converter.d.ts +0 -103
- package/dist/src/yaml/converter.d.ts.map +0 -1
- package/dist/src/yaml/converter.js +0 -420
- package/dist/src/yaml/converter.test.d.ts +0 -5
- package/dist/src/yaml/converter.test.d.ts.map +0 -1
- package/dist/src/yaml/converter.test.js +0 -548
- package/dist/src/yaml/e2e.test.d.ts +0 -6
- package/dist/src/yaml/e2e.test.d.ts.map +0 -1
- package/dist/src/yaml/e2e.test.js +0 -446
- package/dist/src/yaml/env-resolver.d.ts +0 -218
- package/dist/src/yaml/env-resolver.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.js +0 -591
- package/dist/src/yaml/env-resolver.test.d.ts +0 -5
- package/dist/src/yaml/env-resolver.test.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.test.js +0 -502
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts +0 -16
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts.map +0 -1
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.js +0 -126
- package/dist/src/yaml/fidelity-input-digest.d.ts +0 -37
- package/dist/src/yaml/fidelity-input-digest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.js +0 -208
- package/dist/src/yaml/fidelity-input-digest.test.d.ts +0 -2
- package/dist/src/yaml/fidelity-input-digest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.test.js +0 -167
- package/dist/src/yaml/fidelity-manifest.d.ts +0 -126
- package/dist/src/yaml/fidelity-manifest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.js +0 -134
- package/dist/src/yaml/fidelity-manifest.test.d.ts +0 -12
- package/dist/src/yaml/fidelity-manifest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.test.js +0 -251
- package/dist/src/yaml/interactive-prompts.d.ts +0 -71
- package/dist/src/yaml/interactive-prompts.d.ts.map +0 -1
- package/dist/src/yaml/interactive-prompts.js +0 -260
- package/dist/src/yaml/meta-helpers.d.ts +0 -28
- package/dist/src/yaml/meta-helpers.d.ts.map +0 -1
- package/dist/src/yaml/meta-helpers.js +0 -46
- package/dist/src/yaml/missing-env-handler.d.ts +0 -45
- package/dist/src/yaml/missing-env-handler.d.ts.map +0 -1
- package/dist/src/yaml/missing-env-handler.js +0 -64
- package/dist/src/yaml/parser.d.ts +0 -33
- package/dist/src/yaml/parser.d.ts.map +0 -1
- package/dist/src/yaml/parser.js +0 -148
- package/dist/src/yaml/parser.test.d.ts +0 -5
- package/dist/src/yaml/parser.test.d.ts.map +0 -1
- package/dist/src/yaml/parser.test.js +0 -83
- package/dist/src/yaml/pipeline-with-secrets.d.ts +0 -25
- package/dist/src/yaml/pipeline-with-secrets.d.ts.map +0 -1
- package/dist/src/yaml/pipeline-with-secrets.js +0 -76
- package/dist/src/yaml/platform-detector.d.ts +0 -83
- package/dist/src/yaml/platform-detector.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.js +0 -189
- package/dist/src/yaml/platform-detector.test.d.ts +0 -5
- package/dist/src/yaml/platform-detector.test.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.test.js +0 -525
- package/dist/src/yaml/preflight-validation.d.ts +0 -29
- package/dist/src/yaml/preflight-validation.d.ts.map +0 -1
- package/dist/src/yaml/preflight-validation.js +0 -21
- package/dist/src/yaml/secrets-manager.d.ts +0 -87
- package/dist/src/yaml/secrets-manager.d.ts.map +0 -1
- package/dist/src/yaml/secrets-manager.js +0 -230
- package/dist/src/yaml/shell-assignments.d.ts +0 -40
- package/dist/src/yaml/shell-assignments.d.ts.map +0 -1
- package/dist/src/yaml/shell-assignments.js +0 -77
- package/dist/src/yaml/step-validator-check-failure.test.d.ts +0 -24
- package/dist/src/yaml/step-validator-check-failure.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-check-failure.test.js +0 -130
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts +0 -23
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-self-assigned.test.js +0 -191
- package/dist/src/yaml/step-validator.d.ts +0 -67
- package/dist/src/yaml/step-validator.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.js +0 -466
- package/dist/src/yaml/step-validator.test.d.ts +0 -18
- package/dist/src/yaml/step-validator.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.test.js +0 -140
- package/dist/src/yaml/steps/android-sign.d.ts +0 -35
- package/dist/src/yaml/steps/android-sign.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-sign.js +0 -147
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts +0 -2
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-variant-resolution.test.js +0 -260
- package/dist/src/yaml/steps/android-version.d.ts +0 -26
- package/dist/src/yaml/steps/android-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.js +0 -128
- package/dist/src/yaml/steps/android-version.test.d.ts +0 -5
- package/dist/src/yaml/steps/android-version.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.test.js +0 -196
- package/dist/src/yaml/steps/android.d.ts +0 -156
- package/dist/src/yaml/steps/android.d.ts.map +0 -1
- package/dist/src/yaml/steps/android.js +0 -1084
- package/dist/src/yaml/steps/app-store-deploy.d.ts +0 -48
- package/dist/src/yaml/steps/app-store-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/app-store-deploy.js +0 -167
- package/dist/src/yaml/steps/base.d.ts +0 -263
- package/dist/src/yaml/steps/base.d.ts.map +0 -1
- package/dist/src/yaml/steps/base.js +0 -380
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts +0 -26
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.js +0 -200
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.test.js +0 -280
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts +0 -22
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.js +0 -144
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.test.js +0 -331
- package/dist/src/yaml/steps/bitrise-slack.d.ts +0 -49
- package/dist/src/yaml/steps/bitrise-slack.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.js +0 -280
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.test.js +0 -484
- package/dist/src/yaml/steps/bitrise-ssh.d.ts +0 -27
- package/dist/src/yaml/steps/bitrise-ssh.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.js +0 -134
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.test.js +0 -205
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-daemon.test.js +0 -212
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts +0 -42
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.js +0 -209
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-push-daemon.test.js +0 -171
- package/dist/src/yaml/steps/cache.d.ts +0 -59
- package/dist/src/yaml/steps/cache.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache.js +0 -1027
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts +0 -42
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.js +0 -140
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts +0 -11
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.js +0 -176
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts +0 -22
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.js +0 -97
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.js +0 -282
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.js +0 -132
- package/dist/src/yaml/steps/envstore-loader.test.d.ts +0 -15
- package/dist/src/yaml/steps/envstore-loader.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/envstore-loader.test.js +0 -143
- package/dist/src/yaml/steps/fastlane.d.ts +0 -27
- package/dist/src/yaml/steps/fastlane.d.ts.map +0 -1
- package/dist/src/yaml/steps/fastlane.js +0 -79
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts +0 -53
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.js +0 -72
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts +0 -11
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.js +0 -50
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts +0 -87
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.js +0 -111
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts +0 -22
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.js +0 -118
- package/dist/src/yaml/steps/file.d.ts +0 -52
- package/dist/src/yaml/steps/file.d.ts.map +0 -1
- package/dist/src/yaml/steps/file.js +0 -108
- package/dist/src/yaml/steps/flutter.d.ts +0 -63
- package/dist/src/yaml/steps/flutter.d.ts.map +0 -1
- package/dist/src/yaml/steps/flutter.js +0 -215
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts +0 -16
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.js +0 -127
- package/dist/src/yaml/steps/git-clone.d.ts +0 -32
- package/dist/src/yaml/steps/git-clone.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone.js +0 -171
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts +0 -10
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.js +0 -162
- package/dist/src/yaml/steps/git-fetch-retry.d.ts +0 -62
- package/dist/src/yaml/steps/git-fetch-retry.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.js +0 -155
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts +0 -5
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.test.js +0 -86
- package/dist/src/yaml/steps/google-play-deploy.d.ts +0 -37
- package/dist/src/yaml/steps/google-play-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.js +0 -193
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts +0 -5
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.test.js +0 -310
- package/dist/src/yaml/steps/gradle-memory.d.ts +0 -61
- package/dist/src/yaml/steps/gradle-memory.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.js +0 -311
- package/dist/src/yaml/steps/gradle-memory.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-memory.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.test.js +0 -297
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts +0 -28
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.js +0 -107
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.js +0 -183
- package/dist/src/yaml/steps/index.d.ts +0 -10
- package/dist/src/yaml/steps/index.d.ts.map +0 -1
- package/dist/src/yaml/steps/index.js +0 -1461
- package/dist/src/yaml/steps/ios-deps.d.ts +0 -78
- package/dist/src/yaml/steps/ios-deps.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.js +0 -279
- package/dist/src/yaml/steps/ios-deps.test.d.ts +0 -5
- package/dist/src/yaml/steps/ios-deps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.test.js +0 -90
- package/dist/src/yaml/steps/ios-signing.d.ts +0 -31
- package/dist/src/yaml/steps/ios-signing.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-signing.js +0 -144
- package/dist/src/yaml/steps/ios-version.d.ts +0 -47
- package/dist/src/yaml/steps/ios-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-version.js +0 -151
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts +0 -10
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/java-home-version-spec.test.js +0 -58
- package/dist/src/yaml/steps/linting.d.ts +0 -47
- package/dist/src/yaml/steps/linting.d.ts.map +0 -1
- package/dist/src/yaml/steps/linting.js +0 -148
- package/dist/src/yaml/steps/phase2.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase2.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase2.test.js +0 -197
- package/dist/src/yaml/steps/phase3.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase3.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase3.test.js +0 -144
- package/dist/src/yaml/steps/phase4.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase4.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase4.test.js +0 -166
- package/dist/src/yaml/steps/phase5.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase5.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase5.test.js +0 -263
- package/dist/src/yaml/steps/registry.d.ts +0 -88
- package/dist/src/yaml/steps/registry.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.js +0 -125
- package/dist/src/yaml/steps/registry.test.d.ts +0 -5
- package/dist/src/yaml/steps/registry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.test.js +0 -235
- package/dist/src/yaml/steps/release.d.ts +0 -50
- package/dist/src/yaml/steps/release.d.ts.map +0 -1
- package/dist/src/yaml/steps/release.js +0 -154
- package/dist/src/yaml/steps/render-post-processor.d.ts +0 -100
- package/dist/src/yaml/steps/render-post-processor.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.js +0 -270
- package/dist/src/yaml/steps/render-post-processor.test.d.ts +0 -13
- package/dist/src/yaml/steps/render-post-processor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.test.js +0 -220
- package/dist/src/yaml/steps/script.d.ts +0 -23
- package/dist/src/yaml/steps/script.d.ts.map +0 -1
- package/dist/src/yaml/steps/script.js +0 -63
- package/dist/src/yaml/steps/spec-validation.test.d.ts +0 -6
- package/dist/src/yaml/steps/spec-validation.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/spec-validation.test.js +0 -130
- package/dist/src/yaml/steps/steps.test.d.ts +0 -6
- package/dist/src/yaml/steps/steps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/steps.test.js +0 -881
- package/dist/src/yaml/steps/structural-facts.d.ts +0 -992
- package/dist/src/yaml/steps/structural-facts.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.js +0 -3276
- package/dist/src/yaml/steps/structural-facts.test.d.ts +0 -12
- package/dist/src/yaml/steps/structural-facts.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.test.js +0 -3039
- package/dist/src/yaml/steps/test-config.d.ts +0 -5
- package/dist/src/yaml/steps/test-config.d.ts.map +0 -1
- package/dist/src/yaml/steps/test-config.js +0 -25
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts +0 -28
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align-corpus.test.js +0 -383
- package/dist/src/yaml/steps/trim-align.d.ts +0 -87
- package/dist/src/yaml/steps/trim-align.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.js +0 -367
- package/dist/src/yaml/steps/trim-align.test.d.ts +0 -11
- package/dist/src/yaml/steps/trim-align.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.test.js +0 -261
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts +0 -66
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.js +0 -251
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts +0 -13
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.js +0 -302
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts +0 -134
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.js +0 -173
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts +0 -11
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.test.js +0 -210
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts +0 -155
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.js +0 -1389
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts +0 -2
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.js +0 -1106
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts +0 -230
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.js +0 -1597
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts +0 -18
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.test.js +0 -1871
- package/dist/src/yaml/steps/xcode-app-product.d.ts +0 -90
- package/dist/src/yaml/steps/xcode-app-product.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.js +0 -247
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts +0 -2
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.test.js +0 -202
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts +0 -30
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-derived-data.test.js +0 -253
- package/dist/src/yaml/steps/xcode-destination.d.ts +0 -47
- package/dist/src/yaml/steps/xcode-destination.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.js +0 -202
- package/dist/src/yaml/steps/xcode-destination.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-destination.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.test.js +0 -227
- package/dist/src/yaml/steps/xcode-new.test.d.ts +0 -5
- package/dist/src/yaml/steps/xcode-new.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-new.test.js +0 -211
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-resolve-retry.test.js +0 -146
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts +0 -53
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.js +0 -98
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts +0 -21
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.test.js +0 -155
- package/dist/src/yaml/steps/xcode.d.ts +0 -230
- package/dist/src/yaml/steps/xcode.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode.js +0 -1340
- package/dist/src/yaml/types.d.ts +0 -76
- package/dist/src/yaml/types.d.ts.map +0 -1
- package/dist/src/yaml/types.js +0 -5
- package/dist/src/yaml/validation-types.d.ts +0 -102
- package/dist/src/yaml/validation-types.d.ts.map +0 -1
- package/dist/src/yaml/validation-types.js +0 -8
- package/dist/src/yaml/yaml-updater.d.ts +0 -24
- package/dist/src/yaml/yaml-updater.d.ts.map +0 -1
- package/dist/src/yaml/yaml-updater.js +0 -128
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gradle's daemon heaps, fitted to the machine the build runs on.
|
|
3
|
-
*
|
|
4
|
-
* A project's `gradle.properties` sizes its heaps for a developer laptop. On a
|
|
5
|
-
* 10 GiB build guest, `org.gradle.jvmargs=-Xmx8G` (which the Kotlin daemon
|
|
6
|
-
* inherits) or `-Xmx6g` beside `kotlin.daemon.jvmargs=-Xmx8g` asks for more
|
|
7
|
-
* than the machine has, and the kernel kills a daemon mid-build. All the log
|
|
8
|
-
* then says is "Gradle build daemon disappeared unexpectedly". IacobIonut01/ReFra
|
|
9
|
-
* and vitorpamplona/amethyst are the two measured cases; ReFra's own CI lowers
|
|
10
|
-
* its heap to 4g before building.
|
|
11
|
-
*
|
|
12
|
-
* Two things, both at run time, in the Gradle project directory:
|
|
13
|
-
*
|
|
14
|
-
* 1. **Cap.** Read the machine's memory and the declared `-Xmx` of the Gradle
|
|
15
|
-
* daemon and the Kotlin daemon. When their sum is past
|
|
16
|
-
* `GRADLE_HEAP_SHARE_PERCENT` of memory, run one heap instead: the Gradle
|
|
17
|
-
* daemon gets the whole budget (`-Dorg.gradle.jvmargs=`) and Kotlin
|
|
18
|
-
* compiles in it (`-Pkotlin.compiler.execution.strategy=in-process`). One
|
|
19
|
-
* line names the old values and the new. Two heaps did not fit: halved,
|
|
20
|
-
* ReFra's Kotlin compile ran out of heap; split 60/40, its Kotlin daemon
|
|
21
|
-
* was lost mid-compile, and mifos-mobile's Gradle daemon ran out of its
|
|
22
|
-
* 40 % on a 6 GiB guest.
|
|
23
|
-
* 2. **Say so.** When a Gradle run exits 137, its output says the daemon
|
|
24
|
-
* disappeared, or the Kotlin daemon was lost mid-compile, print the
|
|
25
|
-
* kernel's out-of-memory lines and one sentence with the machine's memory
|
|
26
|
-
* and what the build asked for.
|
|
27
|
-
* 3. **Workers.** A heap cap does not bound what runs beside the heaps:
|
|
28
|
-
* off-heap memory, and native compilers run in parallel. IacobIonut01/ReFra
|
|
29
|
-
* was killed again at a capped -Xmx3712m, one JVM holding ~5.1 GiB
|
|
30
|
-
* resident; its own CI also sets `org.gradle.workers.max=2`. A pipeline
|
|
31
|
-
* may ask for a worker count, passed as `--max-workers=<n>`.
|
|
32
|
-
*
|
|
33
|
-
* Precedence, measured with Gradle 8.14.3 and 9.5.0 (daemon and --no-daemon):
|
|
34
|
-
* `-Dorg.gradle.jvmargs` on the command line beats both the Gradle user
|
|
35
|
-
* home's and the project's `gradle.properties` for the daemon's heap, and
|
|
36
|
-
* `-P` beats `gradle.properties` for a Gradle property, which is how the
|
|
37
|
-
* Kotlin Gradle plugin reads `kotlin.daemon.jvmargs` and
|
|
38
|
-
* `kotlin.compiler.execution.strategy`: with
|
|
39
|
-
* `-Pkotlin.compiler.execution.strategy=in-process`, no Kotlin daemon starts
|
|
40
|
-
* even where the project's file says `daemon`. `--max-workers` beats
|
|
41
|
-
* `org.gradle.workers.max` in both files (`gradle.startParameter.maxWorkerCount`).
|
|
42
|
-
* `GRADLE_OPTS` is not used: it sizes the client JVM, not the daemon.
|
|
43
|
-
*
|
|
44
|
-
* Written as shell functions so what ships is what the tests run. Its lines
|
|
45
|
-
* start with "Gradle memory:", never with a step-progress marker.
|
|
46
|
-
*/
|
|
47
|
-
/** The share of the machine's memory the two daemon heaps may take together. */
|
|
48
|
-
export declare const GRADLE_HEAP_SHARE_PERCENT = 75;
|
|
49
|
-
export declare const GRADLE_MEMORY_FUNCTIONS = "# This machine's memory in MiB, or nothing when it cannot be read.\ncibuild_mem_mib() {\n if [ -r /proc/meminfo ]; then\n awk '/^MemTotal:/ { print int($2 / 1024); exit }' /proc/meminfo\n else\n local bytes\n bytes=$(sysctl -n hw.memsize 2>/dev/null || true)\n if [ -n \"$bytes\" ]; then echo $(( bytes / 1048576 )); fi\n fi\n}\n\n# $1 a .properties file, $2 a key. Prints \"<line number><TAB><value>\" for the\n# last assignment of the key, or nothing.\ncibuild_prop_line() {\n [ -f \"$1\" ] || return 0\n awk -v key=\"$2\" '\n { line = $0; sub(/^[ \\t]+/, \"\", line) }\n line ~ /^[#!]/ { next }\n {\n k = line; sub(/[ \\t]*[=:].*$/, \"\", k)\n if (k == key) { v = line; sub(/^[^=:]*[=:][ \\t]*/, \"\", v); sub(/[ \\t\\r]+$/, \"\", v); found = NR \"\\t\" v }\n }\n END { if (found != \"\") print found }\n ' \"$1\"\n}\n\n# The -Xmx of a JVM argument string in MiB (the last one wins, as in the JVM),\n# or nothing when it has none.\ncibuild_xmx_mib() {\n printf '%s\\n' \"$1\" | tr ' \\t' '\\n\\n' | awk '\n /^-Xmx[0-9]+[kKmMgGtT]?$/ {\n n = substr($0, 5); u = substr(n, length(n))\n if (u ~ /[0-9]/) { v = n / 1048576 }\n else {\n n = substr(n, 1, length(n) - 1)\n if (u ~ /[kK]/) v = n / 1024\n else if (u ~ /[mM]/) v = n\n else if (u ~ /[gG]/) v = n * 1024\n else v = n * 1048576\n }\n r = int(v)\n }\n END { if (r != \"\") print r }'\n}\n\n# $1 a JVM argument string, $2 a heap in MiB: the same arguments with every\n# -Xmx replaced by that one (added in front when there was none).\ncibuild_with_xmx() (\n set -f\n out=\"\"\n replaced=0\n for arg in $1; do\n case \"$arg\" in\n -Xmx*) if [ \"$replaced\" -eq 0 ]; then out=\"$out -Xmx${2}m\"; replaced=1; fi ;;\n *) out=\"$out $arg\" ;;\n esac\n done\n [ \"$replaced\" -eq 1 ] || out=\" -Xmx${2}m$out\"\n printf '%s' \"${out# }\"\n)\n\n# MiB as GiB with one decimal.\ncibuild_gib() {\n awk -v m=\"$1\" 'BEGIN { printf \"%.1f\", m / 1024 }'\n}\n\n# A heap scaled by budget/total, rounded down to 64 MiB, never below 512 MiB.\ncibuild_scaled_heap() {\n local v=$(( $1 * $2 / $3 / 64 * 64 ))\n [ \"$v\" -ge 512 ] || v=512\n echo \"$v\"\n}\n\n# The plan, from its inputs only, so a test can run it:\n# $1 this machine's memory in MiB (empty when unknown)\n# $2 the project's gradle.properties $3 the Gradle user home's\n# $4 JVM arguments the pipeline asks for instead (may be empty)\n# Sets CIBUILD_GRADLE_MEMORY_ARGS (extra Gradle arguments),\n# CIBUILD_GRADLE_MEMORY_LINE (what to print before Gradle runs; empty when\n# nothing changes) and CIBUILD_GRADLE_MEMORY_SENTENCE (what to print if a\n# daemon is killed).\n#\n# Precedence is Gradle's own: the command line beats GRADLE_USER_HOME's\n# gradle.properties, which beats the project's. A Kotlin daemon with no -Xmx of\n# its own inherits the Gradle daemon's, and in-process compilation has no\n# Kotlin daemon at all.\ncibuild_gradle_memory_plan() {\n local mem=\"$1\" project=\"$2\" user=\"$3\" preferred=\"$4\" l\n local jvm=\"\" jvm_at=\"\" kd=\"\" kd_at=\"\" strategy=\"\"\n CIBUILD_GRADLE_MEMORY_ARGS=()\n CIBUILD_GRADLE_MEMORY_LINE=\"\"\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"\"\n\n if [ -n \"$preferred\" ]; then jvm=\"$preferred\"; jvm_at=\"the pipeline\"; fi\n for f in \"$user\" \"$project\"; do\n if [ -z \"$jvm_at\" ]; then\n l=$(cibuild_prop_line \"$f\" org.gradle.jvmargs)\n if [ -n \"$l\" ]; then jvm=\"${l#*\t}\"; jvm_at=\"$f:${l%%\t*}\"; fi\n fi\n if [ -z \"$kd_at\" ]; then\n l=$(cibuild_prop_line \"$f\" kotlin.daemon.jvmargs)\n if [ -n \"$l\" ]; then kd=\"${l#*\t}\"; kd_at=\"$f:${l%%\t*}\"; fi\n fi\n if [ -z \"$strategy\" ]; then\n l=$(cibuild_prop_line \"$f\" kotlin.compiler.execution.strategy)\n strategy=\"${l#*\t}\"\n fi\n done\n\n local g k kd_own=\"\"\n g=$(cibuild_xmx_mib \"$jvm\")\n [ -n \"$g\" ] || g=512\n if [ \"$strategy\" = \"in-process\" ]; then\n k=0\n else\n kd_own=$(cibuild_xmx_mib \"$kd\")\n k=\"${kd_own:-$g}\"\n fi\n local total=$(( g + k ))\n\n local asked\n if [ -n \"$jvm_at\" ]; then asked=\"org.gradle.jvmargs=$jvm at ${jvm_at}\"; else asked=\"Gradle's default -Xmx512m\"; fi\n if [ \"$k\" -eq 0 ]; then\n asked=\"$asked; Kotlin compiles in-process\"\n elif [ -n \"$kd_own\" ]; then\n asked=\"$asked, kotlin.daemon.jvmargs=$kd at ${kd_at}\"\n else\n asked=\"$asked; the Kotlin daemon inherits its -Xmx\"\n fi\n\n if [ -z \"$mem\" ]; then\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"This build's Gradle and Kotlin daemons asked for $(cibuild_gib \"$total\") GiB ($asked); this machine's memory could not be read.\"\n if [ -n \"$preferred\" ]; then CIBUILD_GRADLE_MEMORY_ARGS=(\"-Dorg.gradle.jvmargs=$preferred\"); fi\n return 0\n fi\n\n local budget=$(( mem * 75 / 100 ))\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"The build machine has $(cibuild_gib \"$mem\") GiB; this build's Gradle and Kotlin daemons asked for $(cibuild_gib \"$total\") GiB ($asked).\"\n\n if [ \"$total\" -le \"$budget\" ]; then\n if [ -n \"$preferred\" ]; then\n CIBUILD_GRADLE_MEMORY_ARGS=(\"-Dorg.gradle.jvmargs=$preferred\")\n CIBUILD_GRADLE_MEMORY_LINE=\"Gradle memory: org.gradle.jvmargs=$preferred, as the pipeline asks (-Dorg.gradle.jvmargs on the command line).\"\n fi\n return 0\n fi\n\n case \"$jvm\" in\n *\\\\)\n CIBUILD_GRADLE_MEMORY_LINE=\"Gradle memory: the declared heaps ask for $(cibuild_gib \"$total\") GiB of this machine's $(cibuild_gib \"$mem\") GiB, but org.gradle.jvmargs at ${jvm_at} continues onto another line, so it is left as it is.\"\n return 0\n ;;\n esac\n\n # One heap, the whole budget. Two did not fit: ReFra's Kotlin daemon was\n # lost mid-compile at a 60/40 split, and mifos-mobile's Gradle daemon ran out\n # of its 40 %. In-process, Kotlin compiles in the Gradle daemon's heap.\n local ng now\n ng=$(cibuild_scaled_heap \"$budget\" 1 1)\n CIBUILD_GRADLE_MEMORY_ARGS=(\"-Dorg.gradle.jvmargs=$(cibuild_with_xmx \"$jvm\" \"$ng\")\")\n now=\"Gradle -Xmx${ng}m\"\n if [ \"$k\" -gt 0 ]; then\n CIBUILD_GRADLE_MEMORY_ARGS+=(\"-Pkotlin.compiler.execution.strategy=in-process\")\n now=\"$now and Kotlin compiled in-process in it (kotlin.compiler.execution.strategy=in-process: one heap, not a Gradle and a Kotlin daemon)\"\n fi\n CIBUILD_GRADLE_MEMORY_LINE=\"Gradle memory: this machine has $(cibuild_gib \"$mem\") GiB and the declared heaps ask for $(cibuild_gib \"$total\") GiB ($asked), past the $(cibuild_gib \"$budget\") GiB this build allows them. Running with $now, set on the command line.\"\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"$CIBUILD_GRADLE_MEMORY_SENTENCE This build ran them capped: $now.\"\n}\n\n# $1 the number of Gradle workers the pipeline asks for (may be empty). Adds\n# --max-workers to the plan's arguments; run after cibuild_gradle_memory_plan.\n# Sets CIBUILD_GRADLE_WORKERS_LINE (what to print; empty when nothing asked).\ncibuild_gradle_workers_plan() {\n CIBUILD_GRADLE_WORKERS_LINE=\"\"\n [ -n \"$1\" ] || return 0\n case \"$1\" in\n *[!0-9]*|0*)\n CIBUILD_GRADLE_WORKERS_LINE=\"Gradle memory: max_workers=$1 is not a positive whole number, so it is not passed and Gradle picks its own worker count.\"\n return 0\n ;;\n esac\n CIBUILD_GRADLE_MEMORY_ARGS+=(\"--max-workers=$1\")\n CIBUILD_GRADLE_WORKERS_LINE=\"Gradle memory: running with --max-workers=$1, as the pipeline asks (set on the command line, over any org.gradle.workers.max).\"\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"$CIBUILD_GRADLE_MEMORY_SENTENCE Gradle ran with --max-workers=$1.\"\n}\n\n# The kernel's out-of-memory lines, if this user may read the kernel log.\n# Linux guests restrict dmesg to root by default; their build user has\n# non-interactive sudo, so that is the second try.\ncibuild_kernel_oom_lines() {\n { dmesg 2>/dev/null || sudo -n dmesg 2>/dev/null || true; } |\n grep -i -E 'out of memory|oom-kill|oom_reaper|killed process' | tail -n 20 || true\n}\n\n# $1 Gradle's exit status, $2 a file holding its output. Says so when the\n# failure is a killed daemon rather than a failed build.\ncibuild_gradle_memory_report() {\n local kotlin_lost=\"\"\n if grep -q \"Connection to the Kotlin daemon has been unexpectedly lost\" \"$2\" 2>/dev/null; then kotlin_lost=1; fi\n if [ \"$1\" -ne 137 ] && [ -z \"$kotlin_lost\" ] && ! grep -q \"daemon disappeared unexpectedly\" \"$2\" 2>/dev/null; then\n return 0\n fi\n local oom\n oom=$(cibuild_kernel_oom_lines)\n echo \"\"\n if [ -n \"$kotlin_lost\" ]; then\n echo \"Gradle memory: the Kotlin daemon was lost mid-compile rather than the build failing (exit $1). Kotlin then compiled without it, in the Gradle daemon's heap.\"\n else\n echo \"Gradle memory: a Gradle daemon was killed rather than failing the build (exit $1).\"\n fi\n if [ -n \"$oom\" ]; then\n echo \"The kernel's out-of-memory lines:\"\n printf '%s\\n' \"$oom\" | sed 's/^/ /'\n else\n echo \"The kernel log shows no out-of-memory kill, or this machine does not let the build read it.\"\n fi\n if [ -n \"$CIBUILD_GRADLE_MEMORY_SENTENCE\" ]; then echo \"$CIBUILD_GRADLE_MEMORY_SENTENCE\"; fi\n}\n\n# Runs Gradle with the plan's arguments, and reports a killed daemon.\ncibuild_gradle() {\n local log rc\n log=$(mktemp)\n set +e\n \"$CIBUILD_GRADLE_BIN\" \"${CIBUILD_GRADLE_MEMORY_ARGS[@]}\" \"$@\" 2>&1 | tee \"$log\"\n rc=${PIPESTATUS[0]}\n set -e\n if [ \"$rc\" -ne 0 ]; then cibuild_gradle_memory_report \"$rc\" \"$log\" || true; fi\n rm -f \"$log\"\n return \"$rc\"\n}\n\n# $1 JVM arguments the pipeline asks for, $2 the Gradle workers it asks for\n# (either may be empty). Run in the Gradle project directory, after GRADLE_CMD\n# is chosen.\ncibuild_gradle_memory_cap() {\n cibuild_gradle_memory_plan \"$(cibuild_mem_mib || true)\" \"gradle.properties\" \\\n \"${GRADLE_USER_HOME:-$HOME/.gradle}/gradle.properties\" \"$1\"\n cibuild_gradle_workers_plan \"$2\"\n if [ -n \"$CIBUILD_GRADLE_MEMORY_LINE\" ]; then echo \"$CIBUILD_GRADLE_MEMORY_LINE\"; fi\n if [ -n \"$CIBUILD_GRADLE_WORKERS_LINE\" ]; then echo \"$CIBUILD_GRADLE_WORKERS_LINE\"; fi\n CIBUILD_GRADLE_BIN=\"$GRADLE_CMD\"\n GRADLE_CMD=cibuild_gradle\n}";
|
|
50
|
-
/**
|
|
51
|
-
* The commands a Gradle step runs once it has chosen `GRADLE_CMD` and is in
|
|
52
|
-
* the project directory. Afterwards `$GRADLE_CMD` runs Gradle with the plan's
|
|
53
|
-
* arguments and reports a killed daemon.
|
|
54
|
-
*
|
|
55
|
-
* `jvmargs` is what the pipeline asks for instead of the project's
|
|
56
|
-
* `org.gradle.jvmargs` (a value the repository's own CI sets, say); the cap
|
|
57
|
-
* still applies to it. `maxWorkers` is the worker count it asks for (the
|
|
58
|
-
* repository CI's `org.gradle.workers.max`), passed as `--max-workers`.
|
|
59
|
-
*/
|
|
60
|
-
export declare function gradleMemoryCommands(jvmargs: string, escape: (value: string) => string, maxWorkers?: string): string[];
|
|
61
|
-
//# sourceMappingURL=gradle-memory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gradle-memory.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/gradle-memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAG5C,eAAO,MAAM,uBAAuB,ohUAmPlC,CAAC;AAEH;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EACjC,UAAU,SAAK,GACd,MAAM,EAAE,CAOV"}
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gradle's daemon heaps, fitted to the machine the build runs on.
|
|
3
|
-
*
|
|
4
|
-
* A project's `gradle.properties` sizes its heaps for a developer laptop. On a
|
|
5
|
-
* 10 GiB build guest, `org.gradle.jvmargs=-Xmx8G` (which the Kotlin daemon
|
|
6
|
-
* inherits) or `-Xmx6g` beside `kotlin.daemon.jvmargs=-Xmx8g` asks for more
|
|
7
|
-
* than the machine has, and the kernel kills a daemon mid-build. All the log
|
|
8
|
-
* then says is "Gradle build daemon disappeared unexpectedly". IacobIonut01/ReFra
|
|
9
|
-
* and vitorpamplona/amethyst are the two measured cases; ReFra's own CI lowers
|
|
10
|
-
* its heap to 4g before building.
|
|
11
|
-
*
|
|
12
|
-
* Two things, both at run time, in the Gradle project directory:
|
|
13
|
-
*
|
|
14
|
-
* 1. **Cap.** Read the machine's memory and the declared `-Xmx` of the Gradle
|
|
15
|
-
* daemon and the Kotlin daemon. When their sum is past
|
|
16
|
-
* `GRADLE_HEAP_SHARE_PERCENT` of memory, run one heap instead: the Gradle
|
|
17
|
-
* daemon gets the whole budget (`-Dorg.gradle.jvmargs=`) and Kotlin
|
|
18
|
-
* compiles in it (`-Pkotlin.compiler.execution.strategy=in-process`). One
|
|
19
|
-
* line names the old values and the new. Two heaps did not fit: halved,
|
|
20
|
-
* ReFra's Kotlin compile ran out of heap; split 60/40, its Kotlin daemon
|
|
21
|
-
* was lost mid-compile, and mifos-mobile's Gradle daemon ran out of its
|
|
22
|
-
* 40 % on a 6 GiB guest.
|
|
23
|
-
* 2. **Say so.** When a Gradle run exits 137, its output says the daemon
|
|
24
|
-
* disappeared, or the Kotlin daemon was lost mid-compile, print the
|
|
25
|
-
* kernel's out-of-memory lines and one sentence with the machine's memory
|
|
26
|
-
* and what the build asked for.
|
|
27
|
-
* 3. **Workers.** A heap cap does not bound what runs beside the heaps:
|
|
28
|
-
* off-heap memory, and native compilers run in parallel. IacobIonut01/ReFra
|
|
29
|
-
* was killed again at a capped -Xmx3712m, one JVM holding ~5.1 GiB
|
|
30
|
-
* resident; its own CI also sets `org.gradle.workers.max=2`. A pipeline
|
|
31
|
-
* may ask for a worker count, passed as `--max-workers=<n>`.
|
|
32
|
-
*
|
|
33
|
-
* Precedence, measured with Gradle 8.14.3 and 9.5.0 (daemon and --no-daemon):
|
|
34
|
-
* `-Dorg.gradle.jvmargs` on the command line beats both the Gradle user
|
|
35
|
-
* home's and the project's `gradle.properties` for the daemon's heap, and
|
|
36
|
-
* `-P` beats `gradle.properties` for a Gradle property, which is how the
|
|
37
|
-
* Kotlin Gradle plugin reads `kotlin.daemon.jvmargs` and
|
|
38
|
-
* `kotlin.compiler.execution.strategy`: with
|
|
39
|
-
* `-Pkotlin.compiler.execution.strategy=in-process`, no Kotlin daemon starts
|
|
40
|
-
* even where the project's file says `daemon`. `--max-workers` beats
|
|
41
|
-
* `org.gradle.workers.max` in both files (`gradle.startParameter.maxWorkerCount`).
|
|
42
|
-
* `GRADLE_OPTS` is not used: it sizes the client JVM, not the daemon.
|
|
43
|
-
*
|
|
44
|
-
* Written as shell functions so what ships is what the tests run. Its lines
|
|
45
|
-
* start with "Gradle memory:", never with a step-progress marker.
|
|
46
|
-
*/
|
|
47
|
-
/** The share of the machine's memory the two daemon heaps may take together. */
|
|
48
|
-
export const GRADLE_HEAP_SHARE_PERCENT = 75;
|
|
49
|
-
export const GRADLE_MEMORY_FUNCTIONS = `# This machine's memory in MiB, or nothing when it cannot be read.
|
|
50
|
-
cibuild_mem_mib() {
|
|
51
|
-
if [ -r /proc/meminfo ]; then
|
|
52
|
-
awk '/^MemTotal:/ { print int($2 / 1024); exit }' /proc/meminfo
|
|
53
|
-
else
|
|
54
|
-
local bytes
|
|
55
|
-
bytes=$(sysctl -n hw.memsize 2>/dev/null || true)
|
|
56
|
-
if [ -n "$bytes" ]; then echo $(( bytes / 1048576 )); fi
|
|
57
|
-
fi
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
# $1 a .properties file, $2 a key. Prints "<line number><TAB><value>" for the
|
|
61
|
-
# last assignment of the key, or nothing.
|
|
62
|
-
cibuild_prop_line() {
|
|
63
|
-
[ -f "$1" ] || return 0
|
|
64
|
-
awk -v key="$2" '
|
|
65
|
-
{ line = $0; sub(/^[ \\t]+/, "", line) }
|
|
66
|
-
line ~ /^[#!]/ { next }
|
|
67
|
-
{
|
|
68
|
-
k = line; sub(/[ \\t]*[=:].*$/, "", k)
|
|
69
|
-
if (k == key) { v = line; sub(/^[^=:]*[=:][ \\t]*/, "", v); sub(/[ \\t\\r]+$/, "", v); found = NR "\\t" v }
|
|
70
|
-
}
|
|
71
|
-
END { if (found != "") print found }
|
|
72
|
-
' "$1"
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
# The -Xmx of a JVM argument string in MiB (the last one wins, as in the JVM),
|
|
76
|
-
# or nothing when it has none.
|
|
77
|
-
cibuild_xmx_mib() {
|
|
78
|
-
printf '%s\\n' "$1" | tr ' \\t' '\\n\\n' | awk '
|
|
79
|
-
/^-Xmx[0-9]+[kKmMgGtT]?$/ {
|
|
80
|
-
n = substr($0, 5); u = substr(n, length(n))
|
|
81
|
-
if (u ~ /[0-9]/) { v = n / 1048576 }
|
|
82
|
-
else {
|
|
83
|
-
n = substr(n, 1, length(n) - 1)
|
|
84
|
-
if (u ~ /[kK]/) v = n / 1024
|
|
85
|
-
else if (u ~ /[mM]/) v = n
|
|
86
|
-
else if (u ~ /[gG]/) v = n * 1024
|
|
87
|
-
else v = n * 1048576
|
|
88
|
-
}
|
|
89
|
-
r = int(v)
|
|
90
|
-
}
|
|
91
|
-
END { if (r != "") print r }'
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
# $1 a JVM argument string, $2 a heap in MiB: the same arguments with every
|
|
95
|
-
# -Xmx replaced by that one (added in front when there was none).
|
|
96
|
-
cibuild_with_xmx() (
|
|
97
|
-
set -f
|
|
98
|
-
out=""
|
|
99
|
-
replaced=0
|
|
100
|
-
for arg in $1; do
|
|
101
|
-
case "$arg" in
|
|
102
|
-
-Xmx*) if [ "$replaced" -eq 0 ]; then out="$out -Xmx\${2}m"; replaced=1; fi ;;
|
|
103
|
-
*) out="$out $arg" ;;
|
|
104
|
-
esac
|
|
105
|
-
done
|
|
106
|
-
[ "$replaced" -eq 1 ] || out=" -Xmx\${2}m$out"
|
|
107
|
-
printf '%s' "\${out# }"
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
# MiB as GiB with one decimal.
|
|
111
|
-
cibuild_gib() {
|
|
112
|
-
awk -v m="$1" 'BEGIN { printf "%.1f", m / 1024 }'
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
# A heap scaled by budget/total, rounded down to 64 MiB, never below 512 MiB.
|
|
116
|
-
cibuild_scaled_heap() {
|
|
117
|
-
local v=$(( $1 * $2 / $3 / 64 * 64 ))
|
|
118
|
-
[ "$v" -ge 512 ] || v=512
|
|
119
|
-
echo "$v"
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
# The plan, from its inputs only, so a test can run it:
|
|
123
|
-
# $1 this machine's memory in MiB (empty when unknown)
|
|
124
|
-
# $2 the project's gradle.properties $3 the Gradle user home's
|
|
125
|
-
# $4 JVM arguments the pipeline asks for instead (may be empty)
|
|
126
|
-
# Sets CIBUILD_GRADLE_MEMORY_ARGS (extra Gradle arguments),
|
|
127
|
-
# CIBUILD_GRADLE_MEMORY_LINE (what to print before Gradle runs; empty when
|
|
128
|
-
# nothing changes) and CIBUILD_GRADLE_MEMORY_SENTENCE (what to print if a
|
|
129
|
-
# daemon is killed).
|
|
130
|
-
#
|
|
131
|
-
# Precedence is Gradle's own: the command line beats GRADLE_USER_HOME's
|
|
132
|
-
# gradle.properties, which beats the project's. A Kotlin daemon with no -Xmx of
|
|
133
|
-
# its own inherits the Gradle daemon's, and in-process compilation has no
|
|
134
|
-
# Kotlin daemon at all.
|
|
135
|
-
cibuild_gradle_memory_plan() {
|
|
136
|
-
local mem="$1" project="$2" user="$3" preferred="$4" l
|
|
137
|
-
local jvm="" jvm_at="" kd="" kd_at="" strategy=""
|
|
138
|
-
CIBUILD_GRADLE_MEMORY_ARGS=()
|
|
139
|
-
CIBUILD_GRADLE_MEMORY_LINE=""
|
|
140
|
-
CIBUILD_GRADLE_MEMORY_SENTENCE=""
|
|
141
|
-
|
|
142
|
-
if [ -n "$preferred" ]; then jvm="$preferred"; jvm_at="the pipeline"; fi
|
|
143
|
-
for f in "$user" "$project"; do
|
|
144
|
-
if [ -z "$jvm_at" ]; then
|
|
145
|
-
l=$(cibuild_prop_line "$f" org.gradle.jvmargs)
|
|
146
|
-
if [ -n "$l" ]; then jvm="\${l#* }"; jvm_at="$f:\${l%% *}"; fi
|
|
147
|
-
fi
|
|
148
|
-
if [ -z "$kd_at" ]; then
|
|
149
|
-
l=$(cibuild_prop_line "$f" kotlin.daemon.jvmargs)
|
|
150
|
-
if [ -n "$l" ]; then kd="\${l#* }"; kd_at="$f:\${l%% *}"; fi
|
|
151
|
-
fi
|
|
152
|
-
if [ -z "$strategy" ]; then
|
|
153
|
-
l=$(cibuild_prop_line "$f" kotlin.compiler.execution.strategy)
|
|
154
|
-
strategy="\${l#* }"
|
|
155
|
-
fi
|
|
156
|
-
done
|
|
157
|
-
|
|
158
|
-
local g k kd_own=""
|
|
159
|
-
g=$(cibuild_xmx_mib "$jvm")
|
|
160
|
-
[ -n "$g" ] || g=512
|
|
161
|
-
if [ "$strategy" = "in-process" ]; then
|
|
162
|
-
k=0
|
|
163
|
-
else
|
|
164
|
-
kd_own=$(cibuild_xmx_mib "$kd")
|
|
165
|
-
k="\${kd_own:-$g}"
|
|
166
|
-
fi
|
|
167
|
-
local total=$(( g + k ))
|
|
168
|
-
|
|
169
|
-
local asked
|
|
170
|
-
if [ -n "$jvm_at" ]; then asked="org.gradle.jvmargs=$jvm at \${jvm_at}"; else asked="Gradle's default -Xmx512m"; fi
|
|
171
|
-
if [ "$k" -eq 0 ]; then
|
|
172
|
-
asked="$asked; Kotlin compiles in-process"
|
|
173
|
-
elif [ -n "$kd_own" ]; then
|
|
174
|
-
asked="$asked, kotlin.daemon.jvmargs=$kd at \${kd_at}"
|
|
175
|
-
else
|
|
176
|
-
asked="$asked; the Kotlin daemon inherits its -Xmx"
|
|
177
|
-
fi
|
|
178
|
-
|
|
179
|
-
if [ -z "$mem" ]; then
|
|
180
|
-
CIBUILD_GRADLE_MEMORY_SENTENCE="This build's Gradle and Kotlin daemons asked for $(cibuild_gib "$total") GiB ($asked); this machine's memory could not be read."
|
|
181
|
-
if [ -n "$preferred" ]; then CIBUILD_GRADLE_MEMORY_ARGS=("-Dorg.gradle.jvmargs=$preferred"); fi
|
|
182
|
-
return 0
|
|
183
|
-
fi
|
|
184
|
-
|
|
185
|
-
local budget=$(( mem * ${GRADLE_HEAP_SHARE_PERCENT} / 100 ))
|
|
186
|
-
CIBUILD_GRADLE_MEMORY_SENTENCE="The build machine has $(cibuild_gib "$mem") GiB; this build's Gradle and Kotlin daemons asked for $(cibuild_gib "$total") GiB ($asked)."
|
|
187
|
-
|
|
188
|
-
if [ "$total" -le "$budget" ]; then
|
|
189
|
-
if [ -n "$preferred" ]; then
|
|
190
|
-
CIBUILD_GRADLE_MEMORY_ARGS=("-Dorg.gradle.jvmargs=$preferred")
|
|
191
|
-
CIBUILD_GRADLE_MEMORY_LINE="Gradle memory: org.gradle.jvmargs=$preferred, as the pipeline asks (-Dorg.gradle.jvmargs on the command line)."
|
|
192
|
-
fi
|
|
193
|
-
return 0
|
|
194
|
-
fi
|
|
195
|
-
|
|
196
|
-
case "$jvm" in
|
|
197
|
-
*\\\\)
|
|
198
|
-
CIBUILD_GRADLE_MEMORY_LINE="Gradle memory: the declared heaps ask for $(cibuild_gib "$total") GiB of this machine's $(cibuild_gib "$mem") GiB, but org.gradle.jvmargs at \${jvm_at} continues onto another line, so it is left as it is."
|
|
199
|
-
return 0
|
|
200
|
-
;;
|
|
201
|
-
esac
|
|
202
|
-
|
|
203
|
-
# One heap, the whole budget. Two did not fit: ReFra's Kotlin daemon was
|
|
204
|
-
# lost mid-compile at a 60/40 split, and mifos-mobile's Gradle daemon ran out
|
|
205
|
-
# of its 40 %. In-process, Kotlin compiles in the Gradle daemon's heap.
|
|
206
|
-
local ng now
|
|
207
|
-
ng=$(cibuild_scaled_heap "$budget" 1 1)
|
|
208
|
-
CIBUILD_GRADLE_MEMORY_ARGS=("-Dorg.gradle.jvmargs=$(cibuild_with_xmx "$jvm" "$ng")")
|
|
209
|
-
now="Gradle -Xmx\${ng}m"
|
|
210
|
-
if [ "$k" -gt 0 ]; then
|
|
211
|
-
CIBUILD_GRADLE_MEMORY_ARGS+=("-Pkotlin.compiler.execution.strategy=in-process")
|
|
212
|
-
now="$now and Kotlin compiled in-process in it (kotlin.compiler.execution.strategy=in-process: one heap, not a Gradle and a Kotlin daemon)"
|
|
213
|
-
fi
|
|
214
|
-
CIBUILD_GRADLE_MEMORY_LINE="Gradle memory: this machine has $(cibuild_gib "$mem") GiB and the declared heaps ask for $(cibuild_gib "$total") GiB ($asked), past the $(cibuild_gib "$budget") GiB this build allows them. Running with $now, set on the command line."
|
|
215
|
-
CIBUILD_GRADLE_MEMORY_SENTENCE="$CIBUILD_GRADLE_MEMORY_SENTENCE This build ran them capped: $now."
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
# $1 the number of Gradle workers the pipeline asks for (may be empty). Adds
|
|
219
|
-
# --max-workers to the plan's arguments; run after cibuild_gradle_memory_plan.
|
|
220
|
-
# Sets CIBUILD_GRADLE_WORKERS_LINE (what to print; empty when nothing asked).
|
|
221
|
-
cibuild_gradle_workers_plan() {
|
|
222
|
-
CIBUILD_GRADLE_WORKERS_LINE=""
|
|
223
|
-
[ -n "$1" ] || return 0
|
|
224
|
-
case "$1" in
|
|
225
|
-
*[!0-9]*|0*)
|
|
226
|
-
CIBUILD_GRADLE_WORKERS_LINE="Gradle memory: max_workers=$1 is not a positive whole number, so it is not passed and Gradle picks its own worker count."
|
|
227
|
-
return 0
|
|
228
|
-
;;
|
|
229
|
-
esac
|
|
230
|
-
CIBUILD_GRADLE_MEMORY_ARGS+=("--max-workers=$1")
|
|
231
|
-
CIBUILD_GRADLE_WORKERS_LINE="Gradle memory: running with --max-workers=$1, as the pipeline asks (set on the command line, over any org.gradle.workers.max)."
|
|
232
|
-
CIBUILD_GRADLE_MEMORY_SENTENCE="$CIBUILD_GRADLE_MEMORY_SENTENCE Gradle ran with --max-workers=$1."
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
# The kernel's out-of-memory lines, if this user may read the kernel log.
|
|
236
|
-
# Linux guests restrict dmesg to root by default; their build user has
|
|
237
|
-
# non-interactive sudo, so that is the second try.
|
|
238
|
-
cibuild_kernel_oom_lines() {
|
|
239
|
-
{ dmesg 2>/dev/null || sudo -n dmesg 2>/dev/null || true; } |
|
|
240
|
-
grep -i -E 'out of memory|oom-kill|oom_reaper|killed process' | tail -n 20 || true
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
# $1 Gradle's exit status, $2 a file holding its output. Says so when the
|
|
244
|
-
# failure is a killed daemon rather than a failed build.
|
|
245
|
-
cibuild_gradle_memory_report() {
|
|
246
|
-
local kotlin_lost=""
|
|
247
|
-
if grep -q "Connection to the Kotlin daemon has been unexpectedly lost" "$2" 2>/dev/null; then kotlin_lost=1; fi
|
|
248
|
-
if [ "$1" -ne 137 ] && [ -z "$kotlin_lost" ] && ! grep -q "daemon disappeared unexpectedly" "$2" 2>/dev/null; then
|
|
249
|
-
return 0
|
|
250
|
-
fi
|
|
251
|
-
local oom
|
|
252
|
-
oom=$(cibuild_kernel_oom_lines)
|
|
253
|
-
echo ""
|
|
254
|
-
if [ -n "$kotlin_lost" ]; then
|
|
255
|
-
echo "Gradle memory: the Kotlin daemon was lost mid-compile rather than the build failing (exit $1). Kotlin then compiled without it, in the Gradle daemon's heap."
|
|
256
|
-
else
|
|
257
|
-
echo "Gradle memory: a Gradle daemon was killed rather than failing the build (exit $1)."
|
|
258
|
-
fi
|
|
259
|
-
if [ -n "$oom" ]; then
|
|
260
|
-
echo "The kernel's out-of-memory lines:"
|
|
261
|
-
printf '%s\\n' "$oom" | sed 's/^/ /'
|
|
262
|
-
else
|
|
263
|
-
echo "The kernel log shows no out-of-memory kill, or this machine does not let the build read it."
|
|
264
|
-
fi
|
|
265
|
-
if [ -n "$CIBUILD_GRADLE_MEMORY_SENTENCE" ]; then echo "$CIBUILD_GRADLE_MEMORY_SENTENCE"; fi
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
# Runs Gradle with the plan's arguments, and reports a killed daemon.
|
|
269
|
-
cibuild_gradle() {
|
|
270
|
-
local log rc
|
|
271
|
-
log=$(mktemp)
|
|
272
|
-
set +e
|
|
273
|
-
"$CIBUILD_GRADLE_BIN" "\${CIBUILD_GRADLE_MEMORY_ARGS[@]}" "$@" 2>&1 | tee "$log"
|
|
274
|
-
rc=\${PIPESTATUS[0]}
|
|
275
|
-
set -e
|
|
276
|
-
if [ "$rc" -ne 0 ]; then cibuild_gradle_memory_report "$rc" "$log" || true; fi
|
|
277
|
-
rm -f "$log"
|
|
278
|
-
return "$rc"
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
# $1 JVM arguments the pipeline asks for, $2 the Gradle workers it asks for
|
|
282
|
-
# (either may be empty). Run in the Gradle project directory, after GRADLE_CMD
|
|
283
|
-
# is chosen.
|
|
284
|
-
cibuild_gradle_memory_cap() {
|
|
285
|
-
cibuild_gradle_memory_plan "$(cibuild_mem_mib || true)" "gradle.properties" \\
|
|
286
|
-
"\${GRADLE_USER_HOME:-$HOME/.gradle}/gradle.properties" "$1"
|
|
287
|
-
cibuild_gradle_workers_plan "$2"
|
|
288
|
-
if [ -n "$CIBUILD_GRADLE_MEMORY_LINE" ]; then echo "$CIBUILD_GRADLE_MEMORY_LINE"; fi
|
|
289
|
-
if [ -n "$CIBUILD_GRADLE_WORKERS_LINE" ]; then echo "$CIBUILD_GRADLE_WORKERS_LINE"; fi
|
|
290
|
-
CIBUILD_GRADLE_BIN="$GRADLE_CMD"
|
|
291
|
-
GRADLE_CMD=cibuild_gradle
|
|
292
|
-
}`;
|
|
293
|
-
/**
|
|
294
|
-
* The commands a Gradle step runs once it has chosen `GRADLE_CMD` and is in
|
|
295
|
-
* the project directory. Afterwards `$GRADLE_CMD` runs Gradle with the plan's
|
|
296
|
-
* arguments and reports a killed daemon.
|
|
297
|
-
*
|
|
298
|
-
* `jvmargs` is what the pipeline asks for instead of the project's
|
|
299
|
-
* `org.gradle.jvmargs` (a value the repository's own CI sets, say); the cap
|
|
300
|
-
* still applies to it. `maxWorkers` is the worker count it asks for (the
|
|
301
|
-
* repository CI's `org.gradle.workers.max`), passed as `--max-workers`.
|
|
302
|
-
*/
|
|
303
|
-
export function gradleMemoryCommands(jvmargs, escape, maxWorkers = '') {
|
|
304
|
-
return [
|
|
305
|
-
'',
|
|
306
|
-
GRADLE_MEMORY_FUNCTIONS,
|
|
307
|
-
'',
|
|
308
|
-
`cibuild_gradle_memory_cap '${escape(jvmargs)}' '${escape(maxWorkers)}'`,
|
|
309
|
-
];
|
|
310
|
-
}
|
|
311
|
-
//# sourceMappingURL=gradle-memory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gradle-memory.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/gradle-memory.test.ts"],"names":[],"mappings":""}
|