Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/azure-pipelines/alpine/product-build-alpine-cli.yml
4772 views
1
parameters:
2
- name: VSCODE_ARCH
3
type: string
4
- name: VSCODE_CHECK_ONLY
5
type: boolean
6
default: false
7
- name: VSCODE_QUALITY
8
type: string
9
10
jobs:
11
- job: AlpineCLI_${{ parameters.VSCODE_ARCH }}
12
displayName: Alpine (${{ upper(parameters.VSCODE_ARCH) }})
13
timeoutInMinutes: 60
14
pool:
15
name: 1es-ubuntu-22.04-x64
16
os: linux
17
variables:
18
VSCODE_ARCH: ${{ parameters.VSCODE_ARCH }}
19
templateContext:
20
outputs:
21
- ${{ if not(parameters.VSCODE_CHECK_ONLY) }}:
22
- output: pipelineArtifact
23
targetPath: $(Build.ArtifactStagingDirectory)/vscode_cli_alpine_$(VSCODE_ARCH)_cli.tar.gz
24
artifactName: vscode_cli_alpine_$(VSCODE_ARCH)_cli
25
displayName: Publish vscode_cli_alpine_$(VSCODE_ARCH)_cli artifact
26
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)/cli
27
sbomPackageName: "VS Code Alpine $(VSCODE_ARCH) CLI"
28
sbomPackageVersion: $(Build.SourceVersion)
29
steps:
30
- template: ../common/checkout.yml@self
31
32
- task: NodeTool@0
33
inputs:
34
versionSource: fromFile
35
versionFilePath: .nvmrc
36
37
- template: ../cli/cli-apply-patches.yml@self
38
39
- script: |
40
set -e
41
npm ci
42
workingDirectory: build
43
env:
44
GITHUB_TOKEN: "$(github-distro-mixin-password)"
45
displayName: Install build dependencies
46
47
- task: Npm@1
48
displayName: Download openssl prebuilt
49
inputs:
50
command: custom
51
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.11
52
customRegistry: useFeed
53
customFeed: "Monaco/openssl-prebuilt"
54
workingDir: $(Build.ArtifactStagingDirectory)
55
56
- script: |
57
set -e
58
mkdir $(Build.ArtifactStagingDirectory)/openssl
59
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.11.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
60
displayName: Extract openssl prebuilt
61
62
# inspired by: https://github.com/emk/rust-musl-builder/blob/main/Dockerfile
63
- bash: |
64
set -e
65
sudo apt-get update
66
sudo apt-get install -yq build-essential musl-dev musl-tools linux-libc-dev pkgconf xutils-dev lld
67
sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists"
68
displayName: Install musl build dependencies
69
70
- template: ../cli/install-rust-posix.yml@self
71
parameters:
72
targets:
73
- ${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
74
- x86_64-unknown-linux-musl
75
- ${{ if eq(parameters.VSCODE_ARCH, 'arm64') }}:
76
- aarch64-unknown-linux-musl
77
78
- ${{ if eq(parameters.VSCODE_ARCH, 'x64') }}:
79
- template: ../cli/cli-compile.yml@self
80
parameters:
81
VSCODE_CLI_TARGET: x86_64-unknown-linux-musl
82
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_x64_cli
83
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
84
VSCODE_CLI_ENV:
85
CXX_aarch64-unknown-linux-musl: musl-g++
86
CC_aarch64-unknown-linux-musl: musl-gcc
87
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux-musl/lib
88
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-linux-musl/include
89
OPENSSL_STATIC: "1"
90
91
- ${{ if eq(parameters.VSCODE_ARCH, 'arm64') }}:
92
- template: ../cli/cli-compile.yml@self
93
parameters:
94
VSCODE_CLI_TARGET: aarch64-unknown-linux-musl
95
VSCODE_CLI_ARTIFACT: vscode_cli_alpine_arm64_cli
96
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
97
VSCODE_CLI_ENV:
98
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux-musl/lib
99
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-linux-musl/include
100
OPENSSL_STATIC: "1"
101
SYSROOT_ARCH: arm64
102
IS_MUSL: "1"
103
104