mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
address pr comments
This commit is contained in:
66
build/azure-pipelines/linux/cli-build-linux.yml
Normal file
66
build/azure-pipelines/linux/cli-build-linux.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
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
|
||||
Reference in New Issue
Block a user