mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Fix formatting. Remove piplines
This commit is contained in:
@@ -10,52 +10,6 @@ jobs:
|
||||
|
||||
# Steps template for windows platform
|
||||
- template: windows.template.yml
|
||||
parameters:
|
||||
targetRuntime: win-x64
|
||||
|
||||
# Package dotnet core windows dependency (VC++ Redistributable)
|
||||
- powershell: |
|
||||
Write-Host "Downloading 'VC++ Redistributable' package."
|
||||
$outDir = Join-Path -Path $env:TMP -ChildPath ([Guid]::NewGuid())
|
||||
New-Item -Path $outDir -ItemType directory
|
||||
$outFile = Join-Path -Path $outDir -ChildPath "ucrt.zip"
|
||||
Invoke-WebRequest -Uri https://vstsagenttools.blob.core.windows.net/tools/ucrt/ucrt_x64.zip -OutFile $outFile
|
||||
Write-Host "Unzipping 'VC++ Redistributable' package to agent layout."
|
||||
$unzipDir = Join-Path -Path $outDir -ChildPath "unzip"
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($outFile, $unzipDir)
|
||||
$agentLayoutBin = Join-Path -Path $(Build.SourcesDirectory) -ChildPath "_layout\bin"
|
||||
Copy-Item -Path $unzipDir -Destination $agentLayoutBin -Force
|
||||
displayName: Package UCRT
|
||||
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
|
||||
|
||||
# Create agent package zip
|
||||
- script: dev.cmd package Release
|
||||
workingDirectory: src
|
||||
displayName: Package Release
|
||||
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
|
||||
|
||||
# Upload agent package zip as build artifact
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Artifact (Windows x64)
|
||||
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
|
||||
inputs:
|
||||
pathToPublish: _package
|
||||
artifactName: agent
|
||||
artifactType: container
|
||||
|
||||
################################################################################
|
||||
- job: build_windows_x86_agent
|
||||
################################################################################
|
||||
displayName: Windows Agent (x64)
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
steps:
|
||||
|
||||
# Steps template for windows platform
|
||||
- template: windows.template.yml
|
||||
parameters:
|
||||
targetRuntime: win-x86
|
||||
|
||||
# Package dotnet core windows dependency (VC++ Redistributable)
|
||||
- powershell: |
|
||||
@@ -98,64 +52,6 @@ jobs:
|
||||
|
||||
# Steps template for non-windows platform
|
||||
- template: nonwindows.template.yml
|
||||
parameters:
|
||||
targetRuntime: linux-x64
|
||||
|
||||
# Create agent package zip
|
||||
- script: ./dev.sh package Release
|
||||
workingDirectory: src
|
||||
displayName: Package Release
|
||||
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
|
||||
|
||||
# Upload agent package zip as build artifact
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Artifact (Linux x64)
|
||||
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
|
||||
inputs:
|
||||
pathToPublish: _package
|
||||
artifactName: agent
|
||||
artifactType: container
|
||||
|
||||
################################################################################
|
||||
- job: build_linux_arm64_agent
|
||||
################################################################################
|
||||
displayName: Linux Agent (x64)
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
steps:
|
||||
|
||||
# Steps template for non-windows platform
|
||||
- template: nonwindows.template.yml
|
||||
parameters:
|
||||
targetRuntime: linux-arm64
|
||||
|
||||
# Create agent package zip
|
||||
- script: ./dev.sh package Release
|
||||
workingDirectory: src
|
||||
displayName: Package Release
|
||||
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
|
||||
|
||||
# Upload agent package zip as build artifact
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Artifact (Linux x64)
|
||||
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'))
|
||||
inputs:
|
||||
pathToPublish: _package
|
||||
artifactName: agent
|
||||
artifactType: container
|
||||
|
||||
################################################################################
|
||||
- job: build_linux_arm32_agent
|
||||
################################################################################
|
||||
displayName: Linux Agent (x64)
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
steps:
|
||||
|
||||
# Steps template for non-windows platform
|
||||
- template: nonwindows.template.yml
|
||||
parameters:
|
||||
targetRuntime: linux-arm
|
||||
|
||||
# Create agent package zip
|
||||
- script: ./dev.sh package Release
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
parameters:
|
||||
targetRuntime: ''
|
||||
|
||||
steps:
|
||||
|
||||
# Build agent layout
|
||||
- script: ./dev.sh layout Release ${{ parameters.targetRuntime }}
|
||||
- script: ./dev.sh layout Release
|
||||
workingDirectory: src
|
||||
displayName: Build & Layout Release ${{ parameters.targetRuntime }}
|
||||
displayName: Build & Layout Release
|
||||
|
||||
# Run test
|
||||
- script: ./dev.sh test
|
||||
|
||||
39
src/dev.sh
39
src/dev.sh
@@ -34,29 +34,28 @@ if [[ ($(uname) == "Linux") || ($(uname) == "Darwin") ]]; then
|
||||
fi
|
||||
|
||||
if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then
|
||||
RUNTIME_ID='win-x64'
|
||||
if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then
|
||||
RUNTIME_ID='win-x86'
|
||||
fi
|
||||
elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
|
||||
RUNTIME_ID="linux-x64"
|
||||
if command -v uname > /dev/null; then
|
||||
CPU_NAME=$(uname -m)
|
||||
case $CPU_NAME in
|
||||
armv7l) RUNTIME_ID="linux-arm";;
|
||||
aarch64) RUNTIME_ID="linux-arm64";;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -e /etc/redhat-release ]; then
|
||||
redhatRelease=$(</etc/redhat-release)
|
||||
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
|
||||
RUNTIME_ID='rhel.6-x64'
|
||||
RUNTIME_ID='win-x64'
|
||||
if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then
|
||||
RUNTIME_ID='win-x86'
|
||||
fi
|
||||
elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
|
||||
RUNTIME_ID="linux-x64"
|
||||
if command -v uname > /dev/null; then
|
||||
CPU_NAME=$(uname -m)
|
||||
case $CPU_NAME in
|
||||
armv7l) RUNTIME_ID="linux-arm";;
|
||||
aarch64) RUNTIME_ID="linux-arm64";;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e /etc/redhat-release ]; then
|
||||
redhatRelease=$(</etc/redhat-release)
|
||||
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
|
||||
RUNTIME_ID='rhel.6-x64'
|
||||
fi
|
||||
fi
|
||||
elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then
|
||||
RUNTIME_ID='osx-x64'
|
||||
RUNTIME_ID='osx-x64'
|
||||
fi
|
||||
|
||||
if [[ -n "$DEV_TARGET_RUNTIME" ]]; then
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
parameters:
|
||||
targetRuntime: ''
|
||||
|
||||
steps:
|
||||
|
||||
# Build agent layout
|
||||
- script: dev.cmd layout Release ${{ parameters.targetRuntime }}
|
||||
- script: dev.cmd layout Release
|
||||
workingDirectory: src
|
||||
displayName: Build & Layout Release ${{ parameters.targetRuntime }}
|
||||
displayName: Build & Layout Release
|
||||
|
||||
# Run test
|
||||
- script: dev.cmd test
|
||||
|
||||
Reference in New Issue
Block a user