Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/commands/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi
echo "--- 📦 Zipping test results"
cd build/results/ && zip -rq Simplenote.xcresult.zip Simplenote.xcresult && cd -

.buildkite/commands/track-apple-metrics.sh
.buildkite/commands/track-apple-metrics.sh "build/results/Simplenote.xcresult" "./DerivedData"

echo "--- :arrow_up::ruby: Upload build metrics to Apps Metrics"
ruby .buildkite/commands/upload_metrics.rb
Expand Down
17 changes: 12 additions & 5 deletions .buildkite/commands/track-apple-metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

set -euo pipefail

XCRESULT_PATH="${1:?Error: xcresult path required as first argument}"
DERIVED_DATA_PATH="${2:?Error: DerivedData path required as second argument}"

echo "--- :xcode: Store raw xcresulttool JSONs"

mkdir -p build/xcresulttool

xcrun xcresulttool get build-results \
--path build/results/Simplenote.xcresult \
--path "$XCRESULT_PATH" \
--format json > build/xcresulttool/xcresulttool-build-results.json
buildkite-agent artifact upload "build/xcresulttool/xcresulttool-build-results.json"

xcrun xcresulttool get test-results tests \
--path build/results/Simplenote.xcresult \
--path "$XCRESULT_PATH" \
--format json > build/xcresulttool/xcresulttool-tests-results.json
buildkite-agent artifact upload "build/xcresulttool/xcresulttool-tests-results.json"

echo "+++ :json: Extract build info from xcresulttool"
jq '{
Expand All @@ -36,17 +41,19 @@ mkdir -p build/xclogparser-reports
echo "~~~ Dump xcactivitylog to JSON"
xclogparser dump \
--xcodeproj Simplenote.xcodeproj \
--derived_data ./DerivedData \
--derived_data "$DERIVED_DATA_PATH" \
--output build/xclogparser-reports/xcactivitylog-raw.json
buildkite-agent artifact upload "build/xclogparser-reports/xcactivitylog-raw.json"
echo "~~~ Generate HTML report"
xclogparser parse \
--xcodeproj Simplenote.xcodeproj \
--derived_data ./DerivedData \
--derived_data "$DERIVED_DATA_PATH" \
--reporter html \
--rootOutput build/xclogparser-reports
echo "~~~ Generate JSON report"
xclogparser parse \
--xcodeproj Simplenote.xcodeproj \
--derived_data ./DerivedData \
--derived_data "$DERIVED_DATA_PATH" \
--reporter json > build/xclogparser-reports/report.json
buildkite-agent artifact upload "build/xclogparser-reports/report.json"

2 changes: 0 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ steps:
artifact_paths:
- "build/results/*"
- DerivedData/**/*.xcactivitylog
- build/xcresulttool/*.json
- build/xclogparser-reports/index.html
- build/xclogparser-reports/*.json