diff --git a/.github/actions/build-electron/action.yml b/.github/actions/build-electron/action.yml index ba5bef4f3f..762eee223b 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 a70ac7e9d5..1012a3d1a8 100644 --- a/.github/workflows/pipeline-segment-electron-build.yml +++ b/.github/workflows/pipeline-segment-electron-build.yml @@ -78,7 +78,12 @@ 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: ${{ 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: |- + ${{ 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' + ) }} ELECTRON_OUT_DIR: Default ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }} @@ -201,7 +206,7 @@ jobs: with: target-arch: ${{ inputs.target-arch }} target-platform: ${{ inputs.target-platform }} - artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }} + artifact-platform: ${{ case(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 7881e619d3..27b2d79db9 100644 --- a/.github/workflows/pipeline-segment-electron-clang-tidy.yml +++ b/.github/workflows/pipeline-segment-electron-clang-tidy.yml @@ -28,7 +28,12 @@ concurrency: cancel-in-progress: true env: - 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') }} + 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' + ) }} ELECTRON_OUT_DIR: Default jobs: @@ -41,10 +46,10 @@ jobs: contents: read container: ${{ fromJSON(inputs.clang-tidy-container) }} env: - BUILD_TYPE: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }} + BUILD_TYPE: ${{ case(inputs.target-platform == 'macos', 'darwin', inputs.target-platform) }} TARGET_ARCH: ${{ inputs.target-arch }} TARGET_PLATFORM: ${{ inputs.target-platform }} - ARTIFACT_KEY: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}_${{ inputs.target-arch }} + ARTIFACT_KEY: ${{ case(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 0c28e2c8c1..9974edbaa9 100644 --- a/.github/workflows/pipeline-segment-electron-gn-check.yml +++ b/.github/workflows/pipeline-segment-electron-gn-check.yml @@ -34,7 +34,12 @@ concurrency: env: ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }} - 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') }} + 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' + ) }} ELECTRON_OUT_DIR: Default jobs: diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index 68c46f3ef4..532b9f1f12 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -58,8 +58,13 @@ jobs: strategy: fail-fast: false matrix: - 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]') }} + 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]')) }} env: BUILD_TYPE: ${{ matrix.build-type }} TARGET_ARCH: ${{ inputs.target-arch }}