Change:
The stage is now a bottleneck to having the platform specific stages run: ! Each job compiles each target serially. We could further parallelize all targets across different jobs. !

Discussion:
type: string - name: VSCODE_BUILD_MACOS type: boolean <ins> default: false </ins> - name: VSCODE_BUILD_MACOS_ARM64 type: boolean <ins> default: false </ins> - name: channel type: string default: stable

displayName: Extract openssl prebuilt # inspired by: https://github.com/emk/rust-musl-builder/blob/main/Dockerfile <del> - bash: | set -e sudo apt-get update sudo apt-get install -yq build-essential curl file git graphviz musl-dev musl-tools linux-libc-dev pkgconf zip unzip xutils-dev ninja-build sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists" displayName: Install build dependencies </del> <ins> - ${{ if or(eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true)) }}: - bash: | set -e sudo apt-get update sudo apt-get install -yq build-essential musl-dev musl-tools linux-libc-dev pkgconf xutils-dev sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists" displayName: Install musl build dependencies </ins> - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}: - bash: | set -e sudo apt-get install -yq gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf <del> displayName: Install cross compilation toolchains </del> <ins> displayName: Install arm32 toolchains - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}: - bash: | set -e sudo apt-get install -yq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu displayName: Install arm64 toolchains </ins> - task: NodeTool@0 inputs:

VSCODE_CLI_TARGET: aarch64-unknown-linux-gnu VSCODE_CLI_ARTIFACT: vscode_cli_linux_arm64_cli VSCODE_CLI_ENV: <ins> CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc </ins> OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/lib OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux/include

dependsOn: [] jobs: - ${{ if or(eq(parameters.VSCODE_BUILD_LINUX, true), eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true)) }}: <del> - job: Linux </del> <ins> - job: LinuxX64 </ins> pool: vscode-1es-linux steps: - template: ./linux/cli-build-linux.yml

VSCODE_BUILD_LINUX: ${{ parameters.VSCODE_BUILD_LINUX }} VSCODE_BUILD_LINUX_ALPINE: ${{ parameters.VSCODE_BUILD_LINUX_ALPINE }} <del> - ${{ if or(eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true), eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true)) }}: - job: LinuxArm64 </del> <ins> - ${{ if or(eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true), eq(parameters.VSCODE_BUILD_LINUX_ARM64, true)) }}: - job: LinuxGnuARM pool: vscode-1es-linux steps: - template: ./linux/cli-build-linux.yml parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} VSCODE_BUILD_LINUX_ARMHF: ${{ parameters.VSCODE_BUILD_LINUX_ARMHF }} VSCODE_BUILD_LINUX_ARM64: ${{ parameters.VSCODE_BUILD_LINUX_ARM64 }} - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true) }}: - job: LinuxAlpineARM64 </ins> pool: vscode-1es-linux-20.04-arm64 <del> variables: VSCODE_ARCH: arm64 </del> steps: - task: NodeTool@0 displayName: Install Node.js

parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} VSCODE_BUILD_LINUX_ALPINE_ARM64: ${{ parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64 }} <del> VSCODE_BUILD_LINUX_ARM64: ${{ parameters.VSCODE_BUILD_LINUX_ARM64 }} VSCODE_BUILD_LINUX_ARMHF: ${{ parameters.VSCODE_BUILD_LINUX_ARMHF }} - ${{ if eq(variables.VSCODE_BUILD_STAGE_MACOS, true) }}: - job: MacOS </del> <ins> - ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}: - job: MacOSX64 </ins> pool: vmImage: macOS-11 steps:

parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} VSCODE_BUILD_MACOS: ${{ parameters.VSCODE_BUILD_MACOS }} <ins> - ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}: - job: MacOSARM64 pool: vmImage: macOS-11 steps: - template: ./darwin/cli-build-darwin.yml parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} </ins> VSCODE_BUILD_MACOS_ARM64: ${{ parameters.VSCODE_BUILD_MACOS_ARM64 }} <del> - ${{ if eq(variables.VSCODE_BUILD_STAGE_WINDOWS, true) }}: - job: Windows </del> <ins> - ${{ if eq(parameters.VSCODE_BUILD_WIN32, true) }}: - job: WindowsX64 </ins> pool: vscode-1es-windows steps: - template: ./win32/cli-build-win32.yml parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} VSCODE_BUILD_WIN32: ${{ parameters.VSCODE_BUILD_WIN32 }} <ins> - ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}: - job: WindowsARM64 pool: vscode-1es-windows steps: - template: ./win32/cli-build-win32.yml parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} </ins> VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }} <ins> - ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}: - job: WindowsX86 pool: vscode-1es-windows steps: - template: ./win32/cli-build-win32.yml parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} </ins> VSCODE_BUILD_WIN32_32BIT: ${{ parameters.VSCODE_BUILD_WIN32_32BIT }} - ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_WINDOWS'], true)) }}:

parameters: - name: VSCODE_BUILD_WIN32 type: boolean <ins> default: false </ins> - name: VSCODE_BUILD_WIN32_32BIT type: boolean <ins> default: false </ins> - name: VSCODE_BUILD_WIN32_ARM64 type: boolean <ins> default: false </ins> - name: VSCODE_QUALITY type: string - name: channel