mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Adopt new distro format (#178689)
* Simplify distro Also a ton of drive-by fixing around builds: - simplified many oneliners - fixed missing custom npm registry call setups - remove unnecessary and duplicate work during builds - many many fixes
This commit is contained in:
@@ -1,13 +1,7 @@
|
||||
parameters:
|
||||
- name: VSCODE_BUILD_ALPINE
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_LINUX
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_ALPINE_ARM64
|
||||
type: boolean
|
||||
default: false
|
||||
- name: VSCODE_BUILD_LINUX_ARM64
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -18,13 +12,22 @@ parameters:
|
||||
type: string
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "16.x"
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml
|
||||
- script: node build/azure-pipelines/distro/apply-cli-patches
|
||||
displayName: Apply distro patches
|
||||
|
||||
- task: Npm@1
|
||||
displayName: Download openssl prebuilt
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.5
|
||||
customRegistry: useFeed
|
||||
customFeed: 'Monaco/openssl-prebuilt'
|
||||
customFeed: "Monaco/openssl-prebuilt"
|
||||
workingDir: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- script: |
|
||||
@@ -33,38 +36,15 @@ steps:
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.5.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
# inspired by: https://github.com/emk/rust-musl-builder/blob/main/Dockerfile
|
||||
- ${{ if or(eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true), eq(parameters.VSCODE_BUILD_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 lld
|
||||
sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists"
|
||||
displayName: Install musl build dependencies
|
||||
|
||||
- ${{ 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
|
||||
- bash: sudo apt-get install -yq gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
|
||||
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
|
||||
- bash: sudo apt-get install -yq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
||||
displayName: Install arm64 toolchains
|
||||
|
||||
- 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
|
||||
- script: node build/azure-pipelines/cli/prepare.js
|
||||
displayName: Prepare CLI build
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
@@ -72,10 +52,6 @@ steps:
|
||||
- template: ../cli/install-rust-posix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true) }}:
|
||||
- aarch64-unknown-linux-musl
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_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) }}:
|
||||
@@ -83,30 +59,6 @@ steps:
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_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
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux-musl/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux-musl/include
|
||||
OPENSSL_STATIC: '1'
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_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
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux-musl/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux-musl/include
|
||||
OPENSSL_STATIC: '1'
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARM64, true) }}:
|
||||
- template: ../cli/cli-compile-and-publish.yml
|
||||
parameters:
|
||||
|
||||
Reference in New Issue
Block a user