|
| 1 | +# Copyright (c) 2026 Gili Tzabari. All rights reserved. |
| 2 | +# |
| 3 | +# Licensed under the CAT Commercial License. |
| 4 | +# See LICENSE.md in the project root for license terms. |
| 5 | +name: Measure Emoji Widths (macOS) |
| 6 | + |
| 7 | +on: |
| 8 | + workflow_dispatch: |
| 9 | + inputs: |
| 10 | + terminal_type: |
| 11 | + description: 'Terminal to measure (apple_terminal or iterm)' |
| 12 | + required: false |
| 13 | + default: 'apple_terminal' |
| 14 | + type: choice |
| 15 | + options: |
| 16 | + - apple_terminal |
| 17 | + - iterm |
| 18 | + |
| 19 | +jobs: |
| 20 | + measure: |
| 21 | + runs-on: macos-latest |
| 22 | + timeout-minutes: 60 |
| 23 | + |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + |
| 27 | + - name: Instructions for SSH measurement |
| 28 | + run: | |
| 29 | + echo "==========================================" |
| 30 | + echo "Emoji Width Measurement - SSH Debugging" |
| 31 | + echo "==========================================" |
| 32 | + echo "" |
| 33 | + echo "To measure emoji widths on this macOS runner:" |
| 34 | + echo "" |
| 35 | + echo "1. Wait for the 'Enable SSH debugging' step to complete" |
| 36 | + echo "2. Copy the SSH command from the output" |
| 37 | + echo "3. SSH into the runner (paste the command in your terminal)" |
| 38 | + echo "4. Run one of these commands:" |
| 39 | + echo "" |
| 40 | + echo " # Text output:" |
| 41 | + echo " ./plugin/scripts/measure-emoji-widths.sh" |
| 42 | + echo "" |
| 43 | + echo " # JSON output (recommended):" |
| 44 | + echo " ./plugin/scripts/measure-emoji-widths.sh --json" |
| 45 | + echo "" |
| 46 | + echo "5. Copy the output" |
| 47 | + echo "6. Close the SSH session (ctrl+d or 'exit')" |
| 48 | + echo "7. Create a GitHub issue with the measurements" |
| 49 | + echo "" |
| 50 | + echo "The SSH session will stay open for ~10 minutes while you measure." |
| 51 | + echo "==========================================" |
| 52 | +
|
| 53 | + - name: Enable SSH debugging |
| 54 | + uses: mxschmitt/action-tmate@v3 |
| 55 | + with: |
| 56 | + limit-output-lines: 100 |
| 57 | + timeout-minutes: 10 |
| 58 | + |
| 59 | + - name: Measurement instructions for manual update |
| 60 | + run: | |
| 61 | + echo "If you completed the measurement, please:" |
| 62 | + echo "" |
| 63 | + echo "1. Copy the JSON output from your SSH session" |
| 64 | + echo "2. Update plugin/emoji-widths.json with the actual measurements" |
| 65 | + echo "3. Create a pull request with the updated widths" |
| 66 | + echo "" |
| 67 | + echo "Example JSON from measurement script:" |
| 68 | + echo '{' |
| 69 | + echo ' "terminal": "Apple_Terminal",' |
| 70 | + echo ' "widths": {' |
| 71 | + echo ' "☑️": 2,' |
| 72 | + echo ' "🔄": 2,' |
| 73 | + echo ' ...' |
| 74 | + echo ' }' |
| 75 | + echo '}' |
| 76 | + echo "" |
| 77 | + echo "Use the widths object to update emoji-widths.json terminals section." |
0 commit comments