From 4ea2d816b8e7296c58111054fe9e0ecff253b7eb Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 4 Feb 2026 14:55:20 -0500 Subject: [PATCH] revert(ci): use new case syntax in workflows (#49665) Revert "ci: use new case syntax in workflows (#49590)" This reverts commit def7854848d7b2bed6cd96d8b31d2a5de91048ec. --- .github/actions/build-electron/action.yml | 2 +- .github/workflows/pipeline-segment-electron-build.yml | 9 ++------- .../pipeline-segment-electron-clang-tidy.yml | 11 +++-------- .../workflows/pipeline-segment-electron-gn-check.yml | 7 +------ .github/workflows/pipeline-segment-electron-test.yml | 9 ++------- 5 files changed, 9 insertions(+), 29 deletions(-) diff --git a/.github/actions/build-electron/action.yml b/.github/actions/build-electron/action.yml index 762eee223b..ba5bef4f3f 100644 --- a/.github/actions/build-electron/action.yml +++ b/.github/actions/build-electron/action.yml @@ -40,7 +40,7 @@ runs: echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV - name: Set GN_EXTRA_ARGS for Windows shell: bash - if: ${{ inputs.target-arch != 'x64' && inputs.target-platform == 'win' }} + if: ${{inputs.target-arch != 'x64' && inputs.target-platform == 'win' }} run: | GN_APPENDED_ARGS="$GN_EXTRA_ARGS target_cpu=\"${{ inputs.target-arch }}\"" echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV diff --git a/.github/workflows/pipeline-segment-electron-build.yml b/.github/workflows/pipeline-segment-electron-build.yml index 1012a3d1a8..a70ac7e9d5 100644 --- a/.github/workflows/pipeline-segment-electron-build.yml +++ b/.github/workflows/pipeline-segment-electron-build.yml @@ -78,12 +78,7 @@ env: ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }} SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }} SUDOWOODO_EXCHANGE_TOKEN: ${{ secrets.SUDOWOODO_EXCHANGE_TOKEN }} - GCLIENT_EXTRA_ARGS: |- - ${{ case( - inputs.target-platform == 'macos', '--custom-var=checkout_mac=True --custom-var=host_os=mac', - inputs.target-platform == 'win', '--custom-var=checkout_win=True', - '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - ) }} + GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || inputs.target-platform == 'win' && '--custom-var=checkout_win=True' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }} ELECTRON_OUT_DIR: Default ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }} @@ -206,7 +201,7 @@ jobs: with: target-arch: ${{ inputs.target-arch }} target-platform: ${{ inputs.target-platform }} - artifact-platform: ${{ case(inputs.target-platform == 'macos', 'darwin', inputs.target-platform) }} + artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }} is-release: '${{ inputs.is-release }}' generate-symbols: '${{ inputs.generate-symbols }}' upload-to-storage: '${{ inputs.upload-to-storage }}' diff --git a/.github/workflows/pipeline-segment-electron-clang-tidy.yml b/.github/workflows/pipeline-segment-electron-clang-tidy.yml index 27b2d79db9..7881e619d3 100644 --- a/.github/workflows/pipeline-segment-electron-clang-tidy.yml +++ b/.github/workflows/pipeline-segment-electron-clang-tidy.yml @@ -28,12 +28,7 @@ concurrency: cancel-in-progress: true env: - GCLIENT_EXTRA_ARGS: |- - ${{ case( - inputs.target-platform == 'macos', '--custom-var=checkout_mac=True --custom-var=host_os=mac', - inputs.target-platform == 'linux', '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True', - '--custom-var=checkout_win=True' - ) }} + GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || (inputs.target-platform == 'linux' && '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' || '--custom-var=checkout_win=True') }} ELECTRON_OUT_DIR: Default jobs: @@ -46,10 +41,10 @@ jobs: contents: read container: ${{ fromJSON(inputs.clang-tidy-container) }} env: - BUILD_TYPE: ${{ case(inputs.target-platform == 'macos', 'darwin', inputs.target-platform) }} + BUILD_TYPE: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }} TARGET_ARCH: ${{ inputs.target-arch }} TARGET_PLATFORM: ${{ inputs.target-platform }} - ARTIFACT_KEY: ${{ case(inputs.target-platform == 'macos', 'darwin', inputs.target-platform) }}_${{ inputs.target-arch }} + ARTIFACT_KEY: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}_${{ inputs.target-arch }} steps: - name: Checkout Electron uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd diff --git a/.github/workflows/pipeline-segment-electron-gn-check.yml b/.github/workflows/pipeline-segment-electron-gn-check.yml index 9974edbaa9..0c28e2c8c1 100644 --- a/.github/workflows/pipeline-segment-electron-gn-check.yml +++ b/.github/workflows/pipeline-segment-electron-gn-check.yml @@ -34,12 +34,7 @@ concurrency: env: ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }} - GCLIENT_EXTRA_ARGS: |- - ${{ case( - inputs.target-platform == 'macos', '--custom-var=checkout_mac=True --custom-var=host_os=mac', - inputs.target-platform == 'linux', '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True', - '--custom-var=checkout_win=True' - ) }} + GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || (inputs.target-platform == 'linux' && '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' || '--custom-var=checkout_win=True') }} ELECTRON_OUT_DIR: Default jobs: diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index 532b9f1f12..68c46f3ef4 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -58,13 +58,8 @@ jobs: strategy: fail-fast: false matrix: - build-type: |- - ${{ case( - inputs.target-platform == 'macos', fromJSON('["darwin","mas"]'), - inputs.target-platform == 'win', fromJSON('["win"]'), - fromJSON('["linux"]') - ) }} - shard: ${{ case(inputs.target-platform == 'linux', fromJSON('[1, 2, 3]'), fromJSON('[1, 2]')) }} + build-type: ${{ inputs.target-platform == 'macos' && fromJSON('["darwin","mas"]') || (inputs.target-platform == 'win' && fromJSON('["win"]') || fromJSON('["linux"]')) }} + shard: ${{ inputs.target-platform == 'linux' && fromJSON('[1, 2, 3]') || fromJSON('[1, 2]') }} env: BUILD_TYPE: ${{ matrix.build-type }} TARGET_ARCH: ${{ inputs.target-arch }}