зеркало из https://github.com/microsoft/STL.git
72 строки
2.1 KiB
YAML
72 строки
2.1 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
parameters:
|
|
- name: llvmSHAVar
|
|
type: string
|
|
default: llvmSHA
|
|
- name: boostMathSHAVar
|
|
type: string
|
|
default: boostMathSHA
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: false
|
|
- task: PowerShell@2
|
|
displayName: 'Get submodule SHAs'
|
|
timeoutInMinutes: 1
|
|
inputs:
|
|
targetType: inline
|
|
script: |
|
|
cd $(Build.SourcesDirectory)
|
|
$regexSubmoduleSHA = '^[ \-+]([0-9a-f]+) .*$'
|
|
$llvmSHA = git submodule status --cached llvm-project | %{$_ -replace $regexSubmoduleSHA, '$1'}
|
|
Write-Host "##vso[task.setvariable variable=${{ parameters.llvmSHAVar }};]$llvmSHA"
|
|
$boostMathSHA = git submodule status --cached boost-math | %{$_ -replace $regexSubmoduleSHA, '$1'}
|
|
Write-Host "##vso[task.setvariable variable=${{ parameters.boostMathSHAVar }};]$boostMathSHA"
|
|
- script: |
|
|
cd $(Build.SourcesDirectory)
|
|
if not exist "llvm-project" (
|
|
mkdir llvm-project
|
|
)
|
|
cd llvm-project
|
|
|
|
if not exist ".git" (
|
|
del /S /Q *
|
|
git init
|
|
)
|
|
|
|
git remote get-url llvm
|
|
if errorlevel 1 (
|
|
git remote add llvm https://github.com/llvm/llvm-project.git
|
|
git config --local extensions.partialClone llvm
|
|
)
|
|
|
|
git fetch --filter=tree:0 --depth=1 llvm $(${{ parameters.llvmSHAVar }})
|
|
git sparse-checkout init --cone
|
|
git sparse-checkout set libcxx/test libcxx/utils/libcxx llvm/utils/lit
|
|
git reset --quiet --hard FETCH_HEAD
|
|
git clean --quiet -x -d -f
|
|
displayName: "Checkout LLVM source"
|
|
- script: |
|
|
cd $(Build.SourcesDirectory)
|
|
if not exist "boost-math" (
|
|
mkdir boost-math
|
|
)
|
|
cd boost-math
|
|
|
|
if not exist ".git" (
|
|
del /S /Q *
|
|
git init
|
|
)
|
|
|
|
git remote get-url boostorg
|
|
if errorlevel 1 (
|
|
git remote add boostorg https://github.com/boostorg/math.git
|
|
git config --local extensions.partialClone boostorg
|
|
)
|
|
|
|
git fetch --filter=tree:0 --depth=1 boostorg $(${{ parameters.boostMathSHAVar }})
|
|
git checkout -f FETCH_HEAD
|
|
displayName: "Checkout boost-math source"
|