From 5c4b3c191f1b4ba4226d83750be1f449120b41bc Mon Sep 17 00:00:00 2001 From: yasserfaraazkhan Date: Wed, 5 Aug 2026 15:12:12 +0530 Subject: [PATCH] ci(cmt): backport macos Bash 3.2 fix and drop legacy runner remap to release-6.3 CMT on v6.3.0-rc.3 failed every macos-26 leg in e2e/set-required-variables with `bad substitution` from `${RUNNER_OS^^}` (Bash 3.2). Port the tr-based uppercase from #3902 and the Matterwick v0.4.16 matrix pass-through from #3920 without the rest of those PRs' master-only changes. Co-authored-by: Cursor --- .../compatibility-matrix-testing.yml | 28 +++++++------------ .github/workflows/e2e-functional-template.yml | 8 ++++-- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/compatibility-matrix-testing.yml b/.github/workflows/compatibility-matrix-testing.yml index a11589d4a24..f4bfb76be86 100644 --- a/.github/workflows/compatibility-matrix-testing.yml +++ b/.github/workflows/compatibility-matrix-testing.yml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-24.04 outputs: DESKTOP_SHA: ${{ steps.repo.outputs.DESKTOP_SHA }} - CMT_MATRIX: ${{ steps.normalize-matrix.outputs.matrix }} + CMT_MATRIX: ${{ steps.matrix.outputs.matrix }} TSIO_COMPOSITE_IDENTITY: ${{ steps.tsio-identity.outputs.composite-identity-json }} TSIO_TOTAL_REPORTS_EXPECTED: ${{ steps.tsio-identity.outputs.total-reports-expected }} steps: @@ -55,20 +55,13 @@ jobs: id: repo run: echo "DESKTOP_SHA=$(git rev-parse HEAD)" >> ${GITHUB_OUTPUT} - # Matterwick still dispatches ubuntu-22.04 for Linux; pin to ubuntu-latest so - # CMT matches PR E2E (24.04) and install-os-dependencies can resolve - # libasound2t64. Same idea as e2e-functional.yml remapping macos-latest → macos-26. - - name: cmt/normalize-matrix-runners - id: normalize-matrix + # Matterwick (≥ v0.4.16) sends the runners we run on: ubuntu-latest, + # macos-26, windows-2022. Pass the matrix through as-is. + - name: cmt/set-matrix + id: matrix env: CMT_MATRIX: ${{ inputs.CMT_MATRIX }} - run: | - NORMALIZED=$(echo "${CMT_MATRIX}" | jq -c ' - .environment |= map( - if .runner == "ubuntu-22.04" then .runner = "ubuntu-latest" else . end - ) - ') - echo "matrix=${NORMALIZED}" >> "$GITHUB_OUTPUT" + run: echo "matrix=${CMT_MATRIX}" >> "$GITHUB_OUTPUT" # One composite identity + total-reports-expected for the WHOLE CMT run # (every OS x server-version leg), computed once here and threaded into @@ -79,7 +72,7 @@ jobs: GITHUB_REPOSITORY: ${{ github.repository }} MM_SHA: ${{ steps.repo.outputs.DESKTOP_SHA }} MM_BRANCH: ${{ inputs.DESKTOP_VERSION }} - CMT_MATRIX: ${{ steps.normalize-matrix.outputs.matrix }} + CMT_MATRIX: ${{ steps.matrix.outputs.matrix }} run: | TOTAL=$(echo "${CMT_MATRIX}" | jq -c '(.environment | length) * (.server | length)') echo "total-reports-expected=${TOTAL}" >> "$GITHUB_OUTPUT" @@ -114,17 +107,16 @@ jobs: description: "Compatibility Matrix Testing for ${{ inputs.DESKTOP_VERSION }} version" status: pending - # Input follows the below schema (Matterwick may still send ubuntu-22.04; - # calculate-commit-hash remaps Linux to ubuntu-latest before the e2e matrix). + # Input follows the below schema (Matterwick ≥ v0.4.16). # { # "environment": [ # { # "os": "linux", - # "runner": "ubuntu-22.04" + # "runner": "ubuntu-latest" # }, # { # "os": "macos", - # "runner": "macos-13" + # "runner": "macos-26" # }, # { # "os": "windows", diff --git a/.github/workflows/e2e-functional-template.yml b/.github/workflows/e2e-functional-template.yml index e9dc11d34c6..a22ac6b5b68 100644 --- a/.github/workflows/e2e-functional-template.yml +++ b/.github/workflows/e2e-functional-template.yml @@ -103,8 +103,8 @@ env: jobs: e2e: # Includes MM_SERVER_VERSION, not just runs-on: CMT tests multiple server - # versions against the same runner (e.g. macos-13 x 9.6.1 and macos-13 x - # 9.5.2) + # versions against the same runner (e.g. macos-26 x 11.9.0 and macos-26 x + # 11.8.4). name: e2e-on-${{ inputs.runs-on }}-${{ inputs.MM_SERVER_VERSION }} runs-on: ${{ inputs.runs-on }} permissions: @@ -137,7 +137,9 @@ jobs: echo "BUILD_SUFFIX=desktop-release-${RUNNER_OS}" >> $GITHUB_OUTPUT echo "TYPE=${INPUT_TYPE:-CMT}" >> $GITHUB_ENV echo "ZEPHYR_ENABLE=true" >> $GITHUB_ENV - echo "ZEPHYR_FOLDER_${RUNNER_OS^^}_REPORT=${{ + # Use tr, not ${var^^} — macOS runners ship Bash 3.2 which rejects ^^. + RUNNER_OS_UPPER=$(echo "${RUNNER_OS}" | tr '[:lower:]' '[:upper:]') + echo "ZEPHYR_FOLDER_${RUNNER_OS_UPPER}_REPORT=${{ runner.os == 'Linux' && '12358649' || runner.os == 'macOS' && '12358650' || '12358651'