74 lines
2.8 KiB
YAML
74 lines
2.8 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:
|
||
|
- task: NodeTool@0
|
||
|
inputs:
|
||
|
versionSpec: "16.x"
|
||
|
|
||
|
- template: ../mixin-distro-win32.yml
|
||
|
parameters:
|
||
|
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
|
||
|
|
||
|
- powershell: |
|
||
|
. build/azure-pipelines/win32/exec.ps1
|
||
|
$ErrorActionPreference = "Stop"
|
||
|
exec { node build/azure-pipelines/cli/prepare.js }
|
||
|
displayName: Prepare CLI build
|
||
|
env:
|
||
|
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||
|
|
||
|
- template: ../cli/install-rust-win32.yml
|
||
|
parameters:
|
||
|
targets: ${{ parameters.VSCODE_CLI_TARGETS }}
|
||
|
|
||
|
- ${{ each target in parameters.VSCODE_CLI_TARGETS }}:
|
||
|
- template: ../vcpkg-install.yml
|
||
|
parameters:
|
||
|
targets:
|
||
|
- ${{ if eq(target.target, 'x86_64-pc-windows-msvc') }}:
|
||
|
- x64-windows-static-md
|
||
|
- ${{ if eq(target.target, 'aarch64-pc-windows-msvc') }}:
|
||
|
- arm64-windows-static-md
|
||
|
vcpkgDir: $(Build.SourcesDirectory)/build/azure-pipelines/cli/vcpkg
|
||
|
targetDirectory: $(Build.ArtifactStagingDirectory)/deps
|
||
|
|
||
|
- 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)
|
||
|
${{ if eq(target, 'x86_64-pc-windows-msvc') }}:
|
||
|
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/deps/x64-windows-static-md/lib
|
||
|
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/deps/x64-windows-static-md/include
|
||
|
${{ if eq(target, 'aarch64-pc-windows-msvc') }}:
|
||
|
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/deps/arm64-windows-static-md/lib
|
||
|
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/deps/arm64-windows-static-md/include
|
||
|
|
||
|
- task: ArchiveFiles@2
|
||
|
inputs:
|
||
|
rootFolderOrFile: ${{ parameters.VSCODE_CLI_DIR }}/target/${{ target.target }}/release/${{ parameters.VSCODE_CLI_BINARY_NAME }}.exe
|
||
|
includeRootFolder: false
|
||
|
archiveType: zip
|
||
|
archiveFile: $(Build.ArtifactStagingDirectory)/${{ target.artifact }}.zip
|
||
|
|
||
|
- publish: $(Build.ArtifactStagingDirectory)/${{ target.artifact }}.zip
|
||
|
artifact: ${{ target.artifact }}
|
||
|
displayName: Publish ${{ target.artifact }} artifact
|