diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 8ccb77765..1639993b0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -8,9 +8,21 @@ env: # The download is flaky from CI, so skip it -- see the Test Web E2E job. ELECTRON_SKIP_BINARY_DOWNLOAD: '1' +# Each step carries one emoji naming the platform it builds, tests, or ships — +# :javascript: for the web editor (there is no clean web glyph), :ios:, or +# :android: — and a verb-first, title-case label that stands on its own. +# Where a step runs or mirrors a make target, key it by that target's name. +# +# +# Each step reports its GitHub check under an explicit `notify` context — the +# label minus its emoji — so label tweaks don't rename checks. The trunk ruleset +# requires several contexts by name, so changing one needs a ruleset update. steps: - - label: ':react: Build React App' - key: build-react + - label: ':javascript: Build Web Bundle' + key: build + notify: + - github_commit_status: + context: 'Build Web Bundle' command: | # Fail fast if any step (including the backgrounded # `fetch-translations`, surfaced via `wait`) returns non-zero, @@ -45,32 +57,47 @@ steps: - $CI_TOOLKIT_PLUGIN - $NVM_PLUGIN - - label: ':white_check_mark: Validate Swift release ${NEW_VERSION:-(no version)}' + - label: ':ios: Validate Swift Release ${NEW_VERSION:-(no version)}' key: validate-release + notify: + - github_commit_status: + context: 'Validate Swift Release' if: build.env("NEW_VERSION") != null && build.branch == "trunk" && build.pull_request.id == null command: | install_gems bundle exec fastlane validate "version:$NEW_VERSION" plugins: *plugins - - label: ':eslint: Lint React App' - key: lint-js + - label: ':javascript: Lint Web' + key: lint-web + notify: + - github_commit_status: + context: 'Lint Web' command: make lint-web plugins: *plugins - - label: ':npm: Check @wordpress package versions' + - label: ':javascript: Check @wordpress Package Versions' key: check-wp-packages + notify: + - github_commit_status: + context: 'Check @wordpress Package Versions' command: make check-wp-packages plugins: *plugins - - label: ':javascript: Test JavaScript' - key: test-js + - label: ':javascript: Test Web Unit' + key: test-web-unit + notify: + - github_commit_status: + context: 'Test Web Unit' command: make test-web-unit plugins: *plugins - - label: ':performing_arts: Test Web E2E' + - label: ':javascript: Test Web E2E' key: test-web-e2e - depends_on: build-react + notify: + - github_commit_status: + context: 'Test Web E2E' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz @@ -81,7 +108,10 @@ steps: plugins: *plugins - label: ':android: Publish Android Library' - depends_on: build-react + notify: + - github_commit_status: + context: 'Publish Android Library' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz @@ -94,19 +124,30 @@ steps: plugins: *plugins - label: ':android: Lint Android' + key: lint-android + notify: + - github_commit_status: + context: 'Lint Android' command: make lint-android agents: queue: android plugins: *plugins - - label: ':swift: SwiftLint' - key: lint-swift + - label: ':ios: Lint iOS' + key: lint-ios + notify: + - github_commit_status: + context: 'Lint iOS' command: swiftlint agents: queue: linter - - label: ':android: Test Android Library' - depends_on: build-react + - label: ':android: Test Android Library Unit' + key: test-android-library-unit + notify: + - github_commit_status: + context: 'Test Android Library Unit' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz @@ -115,29 +156,38 @@ steps: queue: android plugins: *plugins - - label: ':swift: iOS Simulator Tests' - key: swift-test-swift-package - depends_on: build-react + - label: ':ios: Test iOS Library Simulator' + key: test-ios-library-simulator + notify: + - github_commit_status: + context: 'Test iOS Library Simulator' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz make test-ios-library-simulator plugins: *plugins - - label: ':swift: Library Tests' - key: swift-test-library - depends_on: build-react + - label: ':ios: Test iOS Library Host' + key: test-ios-library-host + notify: + - github_commit_status: + context: 'Test iOS Library Host' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz make test-ios-library-host plugins: *plugins - - label: ':xcode: Build XCFramework' - key: build-xcframework + - label: ':ios: Build XCFramework' + key: build-ios-resources-xcframework + notify: + - github_commit_status: + context: 'Build XCFramework' depends_on: - - build-react - - swift-test-library + - build + - test-ios-library-host command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz @@ -151,12 +201,15 @@ steps: - '*.xcframework.zip.checksum.txt' plugins: *plugins - - label: ':s3: Publish XCFramework to S3' - depends_on: build-xcframework + - label: ':ios: Publish XCFramework to S3' + notify: + - github_commit_status: + context: 'Publish XCFramework to S3' + depends_on: build-ios-resources-xcframework # This step only covers per-commit trunk uploads keyed by the commit - # SHA. Releases are handled by `:rocket: Publish Swift release` (gated + # SHA. Releases are handled by `:ios: Publish Swift Release` (gated # on `NEW_VERSION`), and tag pushes from that step trigger a separate - # tag build whose iOS upload would just duplicate the rocket step's — + # tag build whose iOS upload would just duplicate the release step's — # the `build.tag == null` clause skips it. Android publish on tag # builds is still load-bearing (produces the `vX.Y.Z` Maven artifact) # and intentionally not gated here. @@ -168,23 +221,29 @@ steps: bundle exec fastlane publish_to_s3 version:$BUILDKITE_COMMIT plugins: *plugins - - label: ':swift: :package: Publish PR XCFramework' - depends_on: build-xcframework + - label: ':ios: Publish PR XCFramework' + notify: + - github_commit_status: + context: 'Publish PR XCFramework' + depends_on: build-ios-resources-xcframework if: build.pull_request.id != null command: .buildkite/publish-pr-xcframework.sh plugins: *plugins - - label: ':rocket: Publish Swift release ${NEW_VERSION:-(Error: No version found!)}' + - label: ':ios: Publish Swift Release ${NEW_VERSION:-(Error: No version found!)}' + notify: + - github_commit_status: + context: 'Publish Swift Release' depends_on: - validate-release - - build-xcframework - - swift-test-swift-package - - lint-js - - lint-swift + - build-ios-resources-xcframework + - test-ios-library-simulator + - lint-web + - lint-ios - check-wp-packages - - test-js + - test-web-unit - test-web-e2e - - test-ios-e2e + - test-ios-app-e2e if: build.env("NEW_VERSION") != null && build.branch == "trunk" && build.pull_request.id == null # Pass NEW_VERSION as an argument: build-level env vars set when # triggering aren't exposed to job runtime shells on `queue: mac`, but @@ -193,9 +252,12 @@ steps: command: .buildkite/release.sh "$NEW_VERSION" plugins: *plugins - - label: ':ios: Test iOS E2E' - key: test-ios-e2e - depends_on: build-react + - label: ':ios: Test iOS App E2E' + key: test-ios-app-e2e + notify: + - github_commit_status: + context: 'Test iOS App E2E' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz @@ -212,8 +274,12 @@ steps: - 'build/ios-e2e.xcresult.zip' plugins: *plugins - - label: ':android: Test Android E2E' - depends_on: build-react + - label: ':android: Test Android App E2E' + key: test-android-app-e2e + notify: + - github_commit_status: + context: 'Test Android App E2E' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz @@ -232,8 +298,12 @@ steps: - 'android/app/build/outputs/buildkite-logs/**/*' - 'android/app/build/outputs/connected_android_test_additional_output/**/*' - - label: ':android: Test Android Library Instrumented' - depends_on: build-react + - label: ':android: Test Android Library E2E' + key: test-android-library-e2e + notify: + - github_commit_status: + context: 'Test Android Library E2E' + depends_on: build command: | buildkite-agent artifact download dist.tar.gz . tar -xzf dist.tar.gz @@ -251,7 +321,10 @@ steps: - 'android/Gutenberg/build/outputs/buildkite-logs/**/*' - 'android/Gutenberg/build/outputs/connected_android_test_additional_output/**/*' - - label: ':wastebasket: Clean up `pr-build/*` branches for closed PRs' + - label: ':ios: Clean Up `pr-build/*` Branches for Closed PRs' + notify: + - github_commit_status: + context: 'Clean Up pr-build/* Branches for Closed PRs' if: build.branch == "trunk" command: .buildkite/cleanup-pr-build-branches.sh plugins: *plugins diff --git a/.buildkite/publish-pr-xcframework.sh b/.buildkite/publish-pr-xcframework.sh index a25b03543..ba5fb8778 100755 --- a/.buildkite/publish-pr-xcframework.sh +++ b/.buildkite/publish-pr-xcframework.sh @@ -18,8 +18,8 @@ echo '--- :robot_face: Use bot for Git operations' source use-bot-for-git echo '--- :arrow_down: Downloading XCFramework artifacts' -buildkite-agent artifact download '*.xcframework.zip' . --step "build-xcframework" -buildkite-agent artifact download '*.xcframework.zip.checksum.txt' . --step "build-xcframework" +buildkite-agent artifact download '*.xcframework.zip' . --step "build-ios-resources-xcframework" +buildkite-agent artifact download '*.xcframework.zip.checksum.txt' . --step "build-ios-resources-xcframework" echo '--- :rubygems: Setting up Gems' install_gems diff --git a/.buildkite/release.sh b/.buildkite/release.sh index 9e65687e2..6ea7113e4 100755 --- a/.buildkite/release.sh +++ b/.buildkite/release.sh @@ -13,8 +13,8 @@ echo '--- :robot_face: Use bot for Git operations' source use-bot-for-git echo '--- :arrow_down: Downloading XCFramework artifacts' -buildkite-agent artifact download '*.xcframework.zip' . --step "build-xcframework" -buildkite-agent artifact download '*.xcframework.zip.checksum.txt' . --step "build-xcframework" +buildkite-agent artifact download '*.xcframework.zip' . --step "build-ios-resources-xcframework" +buildkite-agent artifact download '*.xcframework.zip.checksum.txt' . --step "build-ios-resources-xcframework" echo '--- :rubygems: Setting up Gems' install_gems diff --git a/android/Gutenberg/src/androidTest/java/org/wordpress/gutenberg/preview/HtmlToBitmapRendererInstrumentedTest.kt b/android/Gutenberg/src/androidTest/java/org/wordpress/gutenberg/preview/HtmlToBitmapRendererInstrumentedTest.kt index e310aeabd..53c00ef34 100644 --- a/android/Gutenberg/src/androidTest/java/org/wordpress/gutenberg/preview/HtmlToBitmapRendererInstrumentedTest.kt +++ b/android/Gutenberg/src/androidTest/java/org/wordpress/gutenberg/preview/HtmlToBitmapRendererInstrumentedTest.kt @@ -15,7 +15,7 @@ import java.io.File /** * Instrumented tests that exercise [HtmlToBitmapRenderer] against a real Android * [android.webkit.WebView]. Runs in CI via the `:android: Test Android Library - * Instrumented` step (`make test-android-library-e2e`); locally: + * E2E` step (`make test-android-library-e2e`); locally: * * ./gradlew :Gutenberg:connectedAndroidTest * diff --git a/bin/release.sh b/bin/release.sh index 905afdea4..91e5c36d7 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -283,7 +283,7 @@ print_publish_instructions() { echo "'trunk' to whatever HEAD is at trigger time, and a concurrent merge" echo "would tag the wrong commit." echo - echo "The :rocket: 'Publish Swift release' step will build + sign the" + echo "The :ios: 'Publish Swift Release' step will build + sign the" echo "XCFramework, upload it to S3, and publish the GitHub Release —" echo "which also creates the $tag tag." } diff --git a/docs/releases.md b/docs/releases.md index e260e5ae9..f9e21dc5c 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -5,7 +5,7 @@ Every push to `trunk` publishes both platforms automatically: - **Android**: the `:android: Publish Android Library` step pushes a Maven artifact keyed by the commit (consumable via Git revision pins). -- **iOS**: the `:s3: Publish XCFramework to S3` step uploads the signed XCFramework under `gutenbergkit//`, and `Publish PR XCFramework` does the same on PR builds under a `pr-build/` snapshot branch. +- **iOS**: the `:ios: Publish XCFramework to S3` step uploads the signed XCFramework under `gutenbergkit//`, and `Publish PR XCFramework` does the same on PR builds under a `pr-build/` snapshot branch. A **tagged release** is a separate, manually-triggered publish flow on top of that: it produces a stable `vX.Y.Z` tag whose `Package.swift` points at the prebuilt XCFramework on CDN, plus a GitHub Release with the XCFramework attached. SPM consumers pin the tag; everything else can pin a commit/branch. @@ -60,7 +60,7 @@ Step 1 prints the SHA of the version-bump commit it just pushed. Trigger a new B Pinning the commit matters — if you leave it blank, Buildkite resolves `trunk` to HEAD at trigger time, and a concurrent merge would tag the wrong commit. -The build runs a `:white_check_mark: Validate Swift release` step early on (gated on `NEW_VERSION`) that fast-fails if the tag name is malformed, if the tag or GitHub Release already exists, or if no previous release tag can be resolved to generate notes against. It logs the tag the notes will be based on, so a wrong base surfaces before anything is published. After that, the `:rocket: Publish Swift release` step: +The build runs a `:ios: Validate Swift Release` step early on (gated on `NEW_VERSION`) that fast-fails if the tag name is malformed, if the tag or GitHub Release already exists, or if no previous release tag can be resolved to generate notes against. It logs the tag the notes will be based on, so a wrong base surfaces before anything is published. After that, the `:ios: Publish Swift Release` step: 1. Rewrites `Package.swift` to consume the binary target via `.release(version:, checksum:)` 1. Uploads the XCFramework to `s3://a8c-apps-public-artifacts/gutenbergkit/vX.Y.Z/`