parameters: - name: VSCODE_BUILD_LINUX_ALPINE type: boolean default: false - name: VSCODE_BUILD_LINUX type: boolean default: false - name: VSCODE_BUILD_LINUX_ALPINE_ARM64 type: boolean default: false - name: VSCODE_BUILD_LINUX_ARM64 type: boolean default: false - name: VSCODE_QUALITY type: string - name: channel type: string default: stable steps: # inspired by: https://github.com/emk/rust-musl-builder/blob/main/Dockerfile - bash: | sudo apt-get update sudo apt-get install -yq build-essential cmake curl file git graphviz musl-dev musl-tools linux-libc-dev pkgconf unzip xutils-dev sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists" displayName: Install build dependencies - task: NodeTool@0 inputs: versionSpec: "16.x" - template: ../mixin-distro-posix.yml parameters: VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} - script: | set -e node build/azure-pipelines/cli/prepare.js displayName: Prepare CLI build env: GITHUB_TOKEN: "$(github-distro-mixin-password)" - template: ../cli/install-rust-posix.yml parameters: targets: - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true) }}: - aarch64-unknown-linux-musl - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true) }}: - x86_64-unknown-linux-musl - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}: - aarch64-unknown-linux-gnu - ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}: - x86_64-unknown-linux-gnu - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE_ARM64, true) }}: - template: ../cli/cli-compile-and-publish.yml parameters: VSCODE_CLI_TARGET: aarch64-unknown-linux-musl VSCODE_CLI_ARTIFACT: vscode_cli_alpine_arm64_cli VSCODE_CLI_ENV: CXX_aarch64-unknown-linux-musl: musl-g++ CC_aarch64-unknown-linux-musl: musl-gcc - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ALPINE, true) }}: - template: ../cli/cli-compile-and-publish.yml parameters: VSCODE_CLI_TARGET: x86_64-unknown-linux-musl VSCODE_CLI_ARTIFACT: vscode_cli_alpine_x64_cli VSCODE_CLI_ENV: CXX_aarch64-unknown-linux-musl: musl-g++ CC_aarch64-unknown-linux-musl: musl-gcc - ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}: - template: ../cli/cli-compile-and-publish.yml parameters: VSCODE_CLI_TARGET: aarch64-unknown-linux-gnu VSCODE_CLI_ARTIFACT: vscode_cli_linux_arm64_cli - ${{ if eq(parameters.VSCODE_BUILD_LINUX, true) }}: - template: ../cli/cli-compile-and-publish.yml parameters: VSCODE_CLI_TARGET: x86_64-unknown-linux-gnu VSCODE_CLI_ARTIFACT: vscode_cli_linux_x64_cli