mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
67 lines
2.3 KiB
YAML
67 lines
2.3 KiB
YAML
parameters:
|
|
- name: VSCODE_CLI_TARGETS
|
|
default: []
|
|
type: object
|
|
- name: VSCODE_QUALITY
|
|
type: string
|
|
- name: VSCODE_CLI_DIR
|
|
type: string
|
|
- name: VSCODE_CLI_BINARY_NAME
|
|
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: ${{ parameters.VSCODE_CLI_TARGETS }}
|
|
|
|
- ${{ each target in parameters.VSCODE_CLI_TARGETS }}:
|
|
- script: cargo build --release --target ${{ target.target }} --bin=${{ parameters.VSCODE_CLI_BINARY_NAME }}
|
|
displayName: Compile ${{ target.artifact }}
|
|
workingDirectory: ${{ parameters.VSCODE_CLI_DIR }}
|
|
env:
|
|
VSCODE_CLI_VERSION: $(VSCODE_CLI_VERSION)
|
|
VSCODE_CLI_REMOTE_LICENSE_TEXT: $(VSCODE_CLI_REMOTE_LICENSE_TEXT)
|
|
VSCODE_CLI_REMOTE_LICENSE_PROMPT: $(VSCODE_CLI_REMOTE_LICENSE_PROMPT)
|
|
VSCODE_CLI_ASSET_NAME: ${{ target.artifact }}
|
|
VSCODE_CLI_AI_KEY: $(VSCODE_CLI_AI_KEY)
|
|
VSCODE_CLI_AI_ENDPOINT: $(VSCODE_CLI_AI_ENDPOINT)
|
|
CXX_aarch64-unknown-linux-musl: musl-g++
|
|
CC_aarch64-unknown-linux-musl: musl-gcc
|
|
|
|
- task: ArchiveFiles@2
|
|
inputs:
|
|
rootFolderOrFile: ${{ parameters.VSCODE_CLI_DIR }}/target/${{ target.target }}/release/${{ parameters.VSCODE_CLI_BINARY_NAME }}
|
|
includeRootFolder: false
|
|
archiveType: tar
|
|
tarCompression: gz
|
|
archiveFile: $(Build.ArtifactStagingDirectory)/${{ target.artifact }}.tar.gz
|
|
|
|
- publish: $(Build.ArtifactStagingDirectory)/${{ target.artifact }}.tar.gz
|
|
artifact: ${{ target.artifact }}
|
|
displayName: Publish ${{ target.artifact }} artifact
|