mirror of
https://github.com/actions/runner.git
synced 2025-12-11 04:46:58 +00:00
Compare commits
3 Commits
notarize-m
...
users/tihu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d28a57680 | ||
|
|
999800031d | ||
|
|
cadc68ab01 |
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@@ -1,48 +1,34 @@
|
|||||||
name: Runner CI
|
name: Runner CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- releases/*
|
- releases/*
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, osx-x64 ]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
include:
|
include:
|
||||||
- runtime: linux-x64
|
- os: ubuntu-latest
|
||||||
os: ubuntu-latest
|
|
||||||
devScript: ./dev.sh
|
devScript: ./dev.sh
|
||||||
|
- os: macOS-latest
|
||||||
- runtime: linux-arm64
|
|
||||||
os: ubuntu-latest
|
|
||||||
devScript: ./dev.sh
|
devScript: ./dev.sh
|
||||||
|
- os: windows-latest
|
||||||
- runtime: linux-arm
|
|
||||||
os: ubuntu-latest
|
|
||||||
devScript: ./dev.sh
|
|
||||||
|
|
||||||
- runtime: osx-x64
|
|
||||||
os: macOS-latest
|
|
||||||
devScript: ./dev.sh
|
|
||||||
|
|
||||||
- runtime: win-x64
|
|
||||||
os: windows-latest
|
|
||||||
devScript: ./dev
|
devScript: ./dev
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
# Build runner layout
|
# Build runner layout
|
||||||
- name: Build & Layout Release
|
- name: Build & Layout Release
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.devScript }} layout Release ${{ matrix.runtime }}
|
${{ matrix.devScript }} layout Release
|
||||||
working-directory: src
|
working-directory: src
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
@@ -50,19 +36,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${{ matrix.devScript }} test
|
${{ matrix.devScript }} test
|
||||||
working-directory: src
|
working-directory: src
|
||||||
if: matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm'
|
|
||||||
|
|
||||||
# Create runner package tar.gz/zip
|
# Create runner package tar.gz/zip
|
||||||
- name: Package Release
|
- name: Package Release
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.devScript }} package Release
|
${{ matrix.devScript }} package Release
|
||||||
working-directory: src
|
working-directory: src
|
||||||
|
|
||||||
# Upload runner package tar.gz/zip as artifact
|
# Upload runner package tar.gz/zip as artifact
|
||||||
- name: Publish Artifact
|
- name: Publish Artifact
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: runner-package-${{ matrix.runtime }}
|
name: runner-package-${{ matrix.os }}
|
||||||
path: _package
|
path: _package
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
**/libs
|
**/libs
|
||||||
**/*.xproj
|
**/*.xproj
|
||||||
**/*.xproj.user
|
**/*.xproj.user
|
||||||
|
**/*.sln
|
||||||
**/.vs
|
**/.vs
|
||||||
**/.vscode
|
**/.vscode
|
||||||
**/*.error
|
**/*.error
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.29411.138
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Common", "src\Runner.Common\Runner.Common.csproj", "{084289A3-CD7A-42E0-9219-4348B4B7E19B}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Listener", "src\Runner.Listener\Runner.Listener.csproj", "{7D461AEE-BF2A-4855-BD96-56921160B36A}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.PluginHost", "src\Runner.PluginHost\Runner.PluginHost.csproj", "{D0320EB1-CB6D-4179-BFDC-2F2B664A370C}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Plugins", "src\Runner.Plugins\Runner.Plugins.csproj", "{C23AFD6F-4DCD-4243-BC61-865BE31B9168}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Sdk", "src\Runner.Sdk\Runner.Sdk.csproj", "{D0484633-DA97-4C34-8E47-1DADE212A57A}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunnerService", "src\Runner.Service\Windows\RunnerService.csproj", "{D12EBD71-0464-46D0-8394-40BCFBA0A6F2}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Runner.Worker", "src\Runner.Worker\Runner.Worker.csproj", "{C2F5B9FA-2621-411F-8EB2-273ED276F503}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sdk", "src\Sdk\Sdk.csproj", "{D2EE812B-E4DF-49BB-AE87-12BC49949B5F}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test", "src\Test\Test.csproj", "{C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {4A831DDA-3860-45E5-930E-BB3A7833AE80}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
12
assets.json
12
assets.json
@@ -16,17 +16,5 @@
|
|||||||
"platform": "linux-x64",
|
"platform": "linux-x64",
|
||||||
"version": "<RUNNER_VERSION>",
|
"version": "<RUNNER_VERSION>",
|
||||||
"downloadUrl": "https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz"
|
"downloadUrl": "https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "actions-runner-linux-arm64-<RUNNER_VERSION>.tar.gz",
|
|
||||||
"platform": "linux-arm64",
|
|
||||||
"version": "<RUNNER_VERSION>",
|
|
||||||
"downloadUrl": "https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-arm64-<RUNNER_VERSION>.tar.gz"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "actions-runner-linux-arm-<RUNNER_VERSION>.tar.gz",
|
|
||||||
"platform": "linux-arm",
|
|
||||||
"version": "<RUNNER_VERSION>",
|
|
||||||
"downloadUrl": "https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-arm-<RUNNER_VERSION>.tar.gz"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
stages:
|
stages:
|
||||||
- stage: Build
|
- stage: Build
|
||||||
jobs:
|
jobs:
|
||||||
################################################################################
|
################################################################################
|
||||||
- job: build_windows_agent_x64
|
- job: build_windows_agent_x64
|
||||||
@@ -11,14 +11,12 @@ stages:
|
|||||||
|
|
||||||
# Steps template for windows platform
|
# Steps template for windows platform
|
||||||
- template: windows.template.yml
|
- template: windows.template.yml
|
||||||
parameters:
|
|
||||||
targetRuntime: win-x64
|
|
||||||
|
|
||||||
# Package dotnet core windows dependency (VC++ Redistributable)
|
# Package dotnet core windows dependency (VC++ Redistributable)
|
||||||
- powershell: |
|
- powershell: |
|
||||||
Write-Host "Downloading 'VC++ Redistributable' package."
|
Write-Host "Downloading 'VC++ Redistributable' package."
|
||||||
$outDir = Join-Path -Path $env:TMP -ChildPath ([Guid]::NewGuid())
|
$outDir = Join-Path -Path $env:TMP -ChildPath ([Guid]::NewGuid())
|
||||||
New-Item -Path $outDir -ItemType directory
|
New-Item -Path $outDir -ItemType directory
|
||||||
$outFile = Join-Path -Path $outDir -ChildPath "ucrt.zip"
|
$outFile = Join-Path -Path $outDir -ChildPath "ucrt.zip"
|
||||||
Invoke-WebRequest -Uri https://vstsagenttools.blob.core.windows.net/tools/ucrt/ucrt_x64.zip -OutFile $outFile
|
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."
|
Write-Host "Unzipping 'VC++ Redistributable' package to agent layout."
|
||||||
@@ -30,13 +28,13 @@ stages:
|
|||||||
displayName: Package UCRT
|
displayName: Package UCRT
|
||||||
|
|
||||||
# Create agent package zip
|
# Create agent package zip
|
||||||
- script: dev.cmd package Release win-x64
|
- script: dev.cmd package Release
|
||||||
workingDirectory: src
|
workingDirectory: src
|
||||||
displayName: Package Release
|
displayName: Package Release
|
||||||
|
|
||||||
# Upload agent package zip as build artifact
|
# Upload agent package zip as build artifact
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Artifact (Windows x64)
|
displayName: Publish Artifact (Windows)
|
||||||
inputs:
|
inputs:
|
||||||
pathToPublish: _package
|
pathToPublish: _package
|
||||||
artifactName: runners
|
artifactName: runners
|
||||||
@@ -52,76 +50,22 @@ stages:
|
|||||||
|
|
||||||
# Steps template for non-windows platform
|
# Steps template for non-windows platform
|
||||||
- template: nonwindows.template.yml
|
- template: nonwindows.template.yml
|
||||||
parameters:
|
|
||||||
targetRuntime: linux-x64
|
|
||||||
|
|
||||||
# Create agent package zip
|
# Create agent package zip
|
||||||
- script: ./dev.sh package Release linux-x64
|
- script: ./dev.sh package Release
|
||||||
workingDirectory: src
|
workingDirectory: src
|
||||||
displayName: Package Release
|
displayName: Package Release
|
||||||
|
|
||||||
# Upload agent package zip as build artifact
|
# Upload agent package zip as build artifact
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Artifact (Linux x64)
|
displayName: Publish Artifact (Linux)
|
||||||
inputs:
|
inputs:
|
||||||
pathToPublish: _package
|
pathToPublish: _package
|
||||||
artifactName: runners
|
artifactName: runners
|
||||||
artifactType: container
|
artifactType: container
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
- job: build_linux_agent_arm64
|
- job: build_osx_agent
|
||||||
################################################################################
|
|
||||||
displayName: Linux Agent (arm64)
|
|
||||||
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 linux-arm64
|
|
||||||
workingDirectory: src
|
|
||||||
displayName: Package Release
|
|
||||||
|
|
||||||
# Upload agent package zip as build artifact
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: Publish Artifact (Linux ARM64)
|
|
||||||
inputs:
|
|
||||||
pathToPublish: _package
|
|
||||||
artifactName: runners
|
|
||||||
artifactType: container
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
- job: build_linux_agent_arm
|
|
||||||
################################################################################
|
|
||||||
displayName: Linux Agent (arm)
|
|
||||||
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 linux-arm
|
|
||||||
workingDirectory: src
|
|
||||||
displayName: Package Release
|
|
||||||
|
|
||||||
# Upload agent package zip as build artifact
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: Publish Artifact (Linux ARM)
|
|
||||||
inputs:
|
|
||||||
pathToPublish: _package
|
|
||||||
artifactName: runners
|
|
||||||
artifactType: container
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
- job: build_osx_agent_x64
|
|
||||||
################################################################################
|
################################################################################
|
||||||
displayName: macOS Agent (x64)
|
displayName: macOS Agent (x64)
|
||||||
pool:
|
pool:
|
||||||
@@ -130,17 +74,15 @@ stages:
|
|||||||
|
|
||||||
# Steps template for non-windows platform
|
# Steps template for non-windows platform
|
||||||
- template: nonwindows.template.yml
|
- template: nonwindows.template.yml
|
||||||
parameters:
|
|
||||||
targetRuntime: osx-x64
|
|
||||||
|
|
||||||
# Create agent package zip
|
# Create agent package zip
|
||||||
- script: ./dev.sh package Release osx-x64
|
- script: ./dev.sh package Release
|
||||||
workingDirectory: src
|
workingDirectory: src
|
||||||
displayName: Package Release
|
displayName: Package Release
|
||||||
|
|
||||||
# Upload agent package zip as build artifact
|
# Upload agent package zip as build artifact
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: Publish Artifact (OSX x64)
|
displayName: Publish Artifact (OSX)
|
||||||
inputs:
|
inputs:
|
||||||
pathToPublish: _package
|
pathToPublish: _package
|
||||||
artifactName: runners
|
artifactName: runners
|
||||||
@@ -156,7 +98,7 @@ stages:
|
|||||||
pool:
|
pool:
|
||||||
name: ProductionRMAgents
|
name: ProductionRMAgents
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Download all agent packages from all previous phases
|
# Download all agent packages from all previous phases
|
||||||
- task: DownloadBuildArtifacts@0
|
- task: DownloadBuildArtifacts@0
|
||||||
displayName: Download Agent Packages
|
displayName: Download Agent Packages
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
- macOS High Sierra (10.13) and later versions
|
- macOS Sierra (10.12) and later versions
|
||||||
|
|
||||||
|
|
||||||
## [More .Net Core Prerequisites Information](https://docs.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore30)
|
## [More .Net Core Prerequisites Information](https://docs.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore2x)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
- Windows 7 64-bit
|
- Windows 7 64-bit
|
||||||
- Windows 8.1 64-bit
|
- Windows 8.1 64-bit
|
||||||
- Windows 10 64-bit
|
- Windows 10 64-bit
|
||||||
|
- Windows Server 2008 R2 SP1 64-bit
|
||||||
- Windows Server 2012 R2 64-bit
|
- Windows Server 2012 R2 64-bit
|
||||||
- Windows Server 2016 64-bit
|
- Windows Server 2016 64-bit
|
||||||
- Windows Server 2019 64-bit
|
|
||||||
|
|
||||||
## [More .Net Core Prerequisites Information](https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites?tabs=netcore30)
|
## [More .Net Core Prerequisites Information](https://docs.microsoft.com/en-us/dotnet/core/windows-prerequisites?tabs=netcore2x)
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
parameters:
|
|
||||||
targetRuntime: ''
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Build agent layout
|
# Build agent layout
|
||||||
- script: ./dev.sh layout Release ${{ parameters.targetRuntime }}
|
- script: ./dev.sh layout Release
|
||||||
workingDirectory: src
|
workingDirectory: src
|
||||||
displayName: Build & Layout Release ${{ parameters.targetRuntime }}
|
displayName: Build & Layout Release
|
||||||
|
|
||||||
# Run test
|
# Run test
|
||||||
- script: ./dev.sh test
|
- script: ./dev.sh test
|
||||||
workingDirectory: src
|
workingDirectory: src
|
||||||
displayName: Test
|
displayName: Test
|
||||||
condition: and(ne('${{ parameters.targetRuntime }}', 'linux-arm64'), ne('${{ parameters.targetRuntime }}', 'linux-arm'))
|
|
||||||
|
|
||||||
# # Publish test results
|
# # Publish test results
|
||||||
# - task: PublishTestResults@2
|
# - task: PublishTestResults@2
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
## Features
|
## Features
|
||||||
- Added packages for Linux ARM32 (linux-arm) and Linux ARM64 (linux-arm64) (#184)
|
- N/A
|
||||||
- Note that these packages are pre-release status and may not work with all existing actions
|
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Fixed a bug where problem matchers were not treating FromPath as a file path (#183)
|
- Reverted removal of additional fields error and warning fields (#147)
|
||||||
|
- Actions cache would incorrectly cache the action if the tag was updated (#148)
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
- Fixed code warnings in the Runner (#174)
|
- Updated to .NET Core 3.0 (#127)
|
||||||
- Fixed code warnings in the Runner tests (#178)
|
|
||||||
- Added support for building the Runner in Visual Studio (#173)
|
|
||||||
|
|
||||||
## Agent Downloads
|
## Agent Downloads
|
||||||
|
|
||||||
@@ -17,8 +15,6 @@
|
|||||||
| Windows x64 | [actions-runner-win-x64-<RUNNER_VERSION>.zip](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-win-x64-<RUNNER_VERSION>.zip) |
|
| Windows x64 | [actions-runner-win-x64-<RUNNER_VERSION>.zip](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-win-x64-<RUNNER_VERSION>.zip) |
|
||||||
| macOS | [actions-runner-osx-x64-<RUNNER_VERSION>.tar.gz](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-osx-x64-<RUNNER_VERSION>.tar.gz) |
|
| macOS | [actions-runner-osx-x64-<RUNNER_VERSION>.tar.gz](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-osx-x64-<RUNNER_VERSION>.tar.gz) |
|
||||||
| Linux x64 | [actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz) |
|
| Linux x64 | [actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz) |
|
||||||
| Linux arm64 | [actions-runner-linux-arm64-<RUNNER_VERSION>.tar.gz](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-arm64-<RUNNER_VERSION>.tar.gz) |
|
|
||||||
| Linux arm | [actions-runner-linux-arm-<RUNNER_VERSION>.tar.gz](https://githubassets.azureedge.net/runners/<RUNNER_VERSION>/actions-runner-linux-arm-<RUNNER_VERSION>.tar.gz) |
|
|
||||||
|
|
||||||
After Download:
|
After Download:
|
||||||
|
|
||||||
@@ -42,17 +38,3 @@ C:\myagent> Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO
|
|||||||
~/$ mkdir myagent && cd myagent
|
~/$ mkdir myagent && cd myagent
|
||||||
~/myagent$ tar xzf ~/Downloads/actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz
|
~/myagent$ tar xzf ~/Downloads/actions-runner-linux-x64-<RUNNER_VERSION>.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
## Linux arm64
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
~/$ mkdir myagent && cd myagent
|
|
||||||
~/myagent$ tar xzf ~/Downloads/actions-runner-linux-arm64-<RUNNER_VERSION>.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
## Linux arm
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
~/$ mkdir myagent && cd myagent
|
|
||||||
~/myagent$ tar xzf ~/Downloads/actions-runner-linux-arm-<RUNNER_VERSION>.tar.gz
|
|
||||||
```
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<!-- Detect OS for build -->
|
|
||||||
<PropertyGroup>
|
|
||||||
<BUILD_OS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">Windows</BUILD_OS>
|
|
||||||
<BUILD_OS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">OSX</BUILD_OS>
|
|
||||||
<BUILD_OS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">Linux</BUILD_OS>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<!-- Set OS vars -->
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'Windows'">
|
|
||||||
<DefineConstants>$(DefineConstants);OS_WINDOWS</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'OSX'">
|
|
||||||
<DefineConstants>$(DefineConstants);OS_OSX</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux'">
|
|
||||||
<DefineConstants>$(DefineConstants);OS_LINUX</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<!-- Set Platform/bitness vars -->
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'Windows' AND ('$(PackageRuntime)' == 'win-x64' OR '$(PackageRuntime)' == '')">
|
|
||||||
<DefineConstants>$(DefineConstants);X64</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'Windows' AND '$(PackageRuntime)' == 'win-x86'">
|
|
||||||
<DefineConstants>$(DefineConstants);X86</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'OSX'">
|
|
||||||
<DefineConstants>$(DefineConstants);X64</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux' AND ('$(PackageRuntime)' == 'linux-x64' OR '$(PackageRuntime)' == '')">
|
|
||||||
<DefineConstants>$(DefineConstants);X64</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux' AND '$(PackageRuntime)' == 'linux-arm'">
|
|
||||||
<DefineConstants>$(DefineConstants);ARM</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux' AND '$(PackageRuntime)' == 'linux-arm64'">
|
|
||||||
<DefineConstants>$(DefineConstants);ARM64</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<!-- Set TRACE/DEBUG vars -->
|
|
||||||
<PropertyGroup>
|
|
||||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
|
||||||
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<!-- Set OS specific config -->
|
|
||||||
<PropertyGroup Condition="'$(BUILD_OS)' == 'OSX'">
|
|
||||||
<UseHardenedRuntime>true</UseHardenedRuntime>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -123,9 +123,9 @@ function acquireExternalTool() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Download the external tools only for Windows.
|
# Download the external tools only for Windows.
|
||||||
if [[ "$PACKAGERUNTIME" == "win-x64" || "$PACKAGERUNTIME" == "win-x86" ]]; then
|
if [[ "$PACKAGERUNTIME" == "win-x64" ]]; then
|
||||||
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/$PACKAGERUNTIME/node.exe" node12/bin
|
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/win-x64/node.exe" node12/bin
|
||||||
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/$PACKAGERUNTIME/node.lib" node12/bin
|
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/win-x64/node.lib" node12/bin
|
||||||
if [[ "$PRECACHE" != "" ]]; then
|
if [[ "$PRECACHE" != "" ]]; then
|
||||||
acquireExternalTool "https://github.com/microsoft/vswhere/releases/download/2.6.7/vswhere.exe" vswhere
|
acquireExternalTool "https://github.com/microsoft/vswhere/releases/download/2.6.7/vswhere.exe" vswhere
|
||||||
fi
|
fi
|
||||||
@@ -136,23 +136,19 @@ if [[ "$PACKAGERUNTIME" == "osx-x64" ]]; then
|
|||||||
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-darwin-x64.tar.gz" node12 fix_nested_dir
|
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-darwin-x64.tar.gz" node12 fix_nested_dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download the external tools for Linux PACKAGERUNTIMEs.
|
# Download the external tools common across Linux PACKAGERUNTIMEs (excluding OSX).
|
||||||
if [[ "$PACKAGERUNTIME" == "linux-x64" ]]; then
|
if [[ "$PACKAGERUNTIME" == "linux-x64" || "$PACKAGERUNTIME" == "rhel.6-x64" ]]; then
|
||||||
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-x64.tar.gz" node12 fix_nested_dir
|
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-x64.tar.gz" node12 fix_nested_dir
|
||||||
# TODO: Repath this blob to use a consistent version format (_ vs .)
|
# TODO: Repath this blob to use a consistent version format (_ vs .)
|
||||||
acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/12_4_0/alpine/node-v${NODE12_VERSION}-alpine.tar.gz" node12_alpine
|
acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/12_4_0/alpine/node-v${NODE12_VERSION}-alpine.tar.gz" node12_alpine
|
||||||
# acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/12.13.0/alpine/x64/node-v${NODE12_VERSION}-alpine-x64.tar.gz" node12_alpine
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$PACKAGERUNTIME" == "linux-arm64" ]]; then
|
|
||||||
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-arm64.tar.gz" node12 fix_nested_dir
|
|
||||||
# TODO: alpine node runtime for arm64(8)
|
|
||||||
# acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/12.13.0/alpine/arm64/node-v${NODE12_VERSION}-alpine-arm64.tar.gz" node12_alpine
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then
|
if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then
|
||||||
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-armv7l.tar.gz" node12 fix_nested_dir
|
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-armv7l.tar.gz" node12 fix_nested_dir
|
||||||
# TODO: alpine node runtime for arm32(7)
|
fi
|
||||||
# Need to set up custom gcc toolchain to cross compile on x64 ubuntu for armv7 (per https://github.com/nodejs/node/blob/master/BUILDING.md)
|
|
||||||
# acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/12.13.0/alpine/arm/node-v${NODE12_VERSION}-alpine-arm.tar.gz" node12_alpine
|
if [[ "$PACKAGERUNTIME" == "linux-arm64" ]]; then
|
||||||
|
acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-arm64.tar.gz" node12 fix_nested_dir
|
||||||
|
|
||||||
|
## TODO: alpine arm64 version node.js
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603</NoWarn>
|
<NoWarn>NU1701;NU1603</NoWarn>
|
||||||
@@ -27,5 +27,49 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
||||||
|
<DefineConstants>OS_OSX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' AND '$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>OS_OSX;DEBUG;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace GitHub.Runner.Common.Util
|
|||||||
case Constants.Architecture.Arm:
|
case Constants.Architecture.Arm:
|
||||||
return "ARM";
|
return "ARM";
|
||||||
case Constants.Architecture.Arm64:
|
case Constants.Architecture.Arm64:
|
||||||
return "ARM64";
|
return "ARM64";
|
||||||
default:
|
default:
|
||||||
throw new NotSupportedException(); // Should never reach here.
|
throw new NotSupportedException(); // Should never reach here.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603</NoWarn>
|
<NoWarn>NU1701;NU1603</NoWarn>
|
||||||
@@ -30,5 +30,49 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
||||||
|
<DefineConstants>OS_OSX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' AND '$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>OS_OSX;DEBUG;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603</NoWarn>
|
<NoWarn>NU1701;NU1603</NoWarn>
|
||||||
<Version>$(Version)</Version>
|
<Version>$(Version)</Version>
|
||||||
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
|
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
|
||||||
<PublishReadyToRun>true</PublishReadyToRun>
|
<PublishReadyToRun>true</PublishReadyToRun>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -24,4 +24,48 @@
|
|||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
||||||
|
<DefineConstants>OS_OSX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' AND '$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>OS_OSX;DEBUG;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603</NoWarn>
|
<NoWarn>NU1701;NU1603</NoWarn>
|
||||||
@@ -19,5 +19,49 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
||||||
|
<DefineConstants>OS_OSX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' AND '$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>OS_OSX;DEBUG;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603</NoWarn>
|
<NoWarn>NU1701;NU1603</NoWarn>
|
||||||
@@ -24,5 +24,49 @@
|
|||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
||||||
|
<DefineConstants>OS_OSX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' AND '$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>OS_OSX;DEBUG;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
BIN
src/Runner.Service/Windows/FinalPublicKey.snk
Normal file
BIN
src/Runner.Service/Windows/FinalPublicKey.snk
Normal file
Binary file not shown.
@@ -9,8 +9,9 @@
|
|||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>RunnerService</RootNamespace>
|
<RootNamespace>RunnerService</RootNamespace>
|
||||||
<AssemblyName>RunnerService</AssemblyName>
|
<AssemblyName>RunnerService</AssemblyName>
|
||||||
<SignAssembly>false</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<DelaySign>false</DelaySign>
|
<AssemblyOriginatorKeyFile>FinalPublicKey.snk</AssemblyOriginatorKeyFile>
|
||||||
|
<DelaySign>true</DelaySign>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
@@ -63,6 +64,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
|
<None Include="FinalPublicKey.snk" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Resource.resx">
|
<EmbeddedResource Include="Resource.resx">
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ namespace GitHub.Runner.Worker
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// process action command in serialize order.
|
// process action command in serialize oreder.
|
||||||
lock (_commandSerializeLock)
|
lock (_commandSerializeLock)
|
||||||
{
|
{
|
||||||
if (_stopProcessCommand)
|
if (_stopProcessCommand)
|
||||||
@@ -107,19 +107,32 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
else if (_commandExtensions.TryGetValue(actionCommand.Command, out IActionCommandExtension extension))
|
else if (_commandExtensions.TryGetValue(actionCommand.Command, out IActionCommandExtension extension))
|
||||||
{
|
{
|
||||||
if (context.EchoOnActionCommand && !extension.OmitEcho)
|
bool commandHasBeenOutput = false;
|
||||||
{
|
|
||||||
context.Output(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (context.EchoOnActionCommand)
|
||||||
|
{
|
||||||
|
context.Output(input);
|
||||||
|
context.Debug($"Processing command '{actionCommand.Command}'");
|
||||||
|
commandHasBeenOutput = true;
|
||||||
|
}
|
||||||
|
|
||||||
extension.ProcessCommand(context, input, actionCommand);
|
extension.ProcessCommand(context, input, actionCommand);
|
||||||
|
|
||||||
|
if (context.EchoOnActionCommand)
|
||||||
|
{
|
||||||
|
context.Debug($"Processed command '{actionCommand.Command}' successfully");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
var commandInformation = extension.OmitEcho ? extension.Command : input;
|
if (!commandHasBeenOutput)
|
||||||
context.Error($"Unable to process command '{commandInformation}' successfully.");
|
{
|
||||||
|
context.Output(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
context.Error($"Unable to process command '{input}' successfully.");
|
||||||
context.Error(ex);
|
context.Error(ex);
|
||||||
context.CommandResult = TaskResult.Failed;
|
context.CommandResult = TaskResult.Failed;
|
||||||
}
|
}
|
||||||
@@ -138,7 +151,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public interface IActionCommandExtension : IExtension
|
public interface IActionCommandExtension : IExtension
|
||||||
{
|
{
|
||||||
string Command { get; }
|
string Command { get; }
|
||||||
bool OmitEcho { get; }
|
|
||||||
|
|
||||||
void ProcessCommand(IExecutionContext context, string line, ActionCommand command);
|
void ProcessCommand(IExecutionContext context, string line, ActionCommand command);
|
||||||
}
|
}
|
||||||
@@ -146,7 +158,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class InternalPluginSetRepoPathCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class InternalPluginSetRepoPathCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "internal-set-repo-path";
|
public string Command => "internal-set-repo-path";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -176,7 +187,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class SetEnvCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class SetEnvCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "set-env";
|
public string Command => "set-env";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -201,7 +211,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class SetOutputCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class SetOutputCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "set-output";
|
public string Command => "set-output";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -225,7 +234,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class SaveStateCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class SaveStateCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "save-state";
|
public string Command => "save-state";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -249,7 +257,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class AddMaskCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class AddMaskCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "add-mask";
|
public string Command => "add-mask";
|
||||||
public bool OmitEcho => true;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -261,11 +268,6 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (context.EchoOnActionCommand)
|
|
||||||
{
|
|
||||||
context.Output($"::{Command}::***");
|
|
||||||
}
|
|
||||||
|
|
||||||
HostContext.SecretMasker.AddValue(command.Data);
|
HostContext.SecretMasker.AddValue(command.Data);
|
||||||
Trace.Info($"Add new secret mask with length of {command.Data.Length}");
|
Trace.Info($"Add new secret mask with length of {command.Data.Length}");
|
||||||
}
|
}
|
||||||
@@ -275,7 +277,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class AddPathCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class AddPathCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "add-path";
|
public string Command => "add-path";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -290,7 +291,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class AddMatcherCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class AddMatcherCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "add-matcher";
|
public string Command => "add-matcher";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -337,7 +337,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class RemoveMatcherCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class RemoveMatcherCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "remove-matcher";
|
public string Command => "remove-matcher";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -405,7 +404,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class DebugCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class DebugCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "debug";
|
public string Command => "debug";
|
||||||
public bool OmitEcho => true;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -433,7 +431,6 @@ namespace GitHub.Runner.Worker
|
|||||||
{
|
{
|
||||||
public abstract IssueType Type { get; }
|
public abstract IssueType Type { get; }
|
||||||
public abstract string Command { get; }
|
public abstract string Command { get; }
|
||||||
public bool OmitEcho => true;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
@@ -513,8 +510,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public abstract class GroupingCommandExtension : RunnerService, IActionCommandExtension
|
public abstract class GroupingCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public abstract string Command { get; }
|
public abstract string Command { get; }
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
public void ProcessCommand(IExecutionContext context, string line, ActionCommand command)
|
public void ProcessCommand(IExecutionContext context, string line, ActionCommand command)
|
||||||
@@ -527,7 +522,6 @@ namespace GitHub.Runner.Worker
|
|||||||
public sealed class EchoCommandExtension : RunnerService, IActionCommandExtension
|
public sealed class EchoCommandExtension : RunnerService, IActionCommandExtension
|
||||||
{
|
{
|
||||||
public string Command => "echo";
|
public string Command => "echo";
|
||||||
public bool OmitEcho => false;
|
|
||||||
|
|
||||||
public Type ExtensionType => typeof(IActionCommandExtension);
|
public Type ExtensionType => typeof(IActionCommandExtension);
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ namespace GitHub.Runner.Worker
|
|||||||
{
|
{
|
||||||
throw new NotSupportedException("Container feature is not supported when runner is already running inside container.");
|
throw new NotSupportedException("Container feature is not supported when runner is already running inside container.");
|
||||||
}
|
}
|
||||||
|
#elif OS_RHEL6
|
||||||
|
// Red Hat and CentOS 6 do not support the container feature
|
||||||
|
throw new NotSupportedException("Runner does not support the container feature on Red Hat Enterprise Linux 6 or CentOS 6.");
|
||||||
#else
|
#else
|
||||||
var initProcessCgroup = File.ReadLines("/proc/1/cgroup");
|
var initProcessCgroup = File.ReadLines("/proc/1/cgroup");
|
||||||
if (initProcessCgroup.Any(x => x.IndexOf(":/docker/", StringComparison.OrdinalIgnoreCase) >= 0))
|
if (initProcessCgroup.Any(x => x.IndexOf(":/docker/", StringComparison.OrdinalIgnoreCase) >= 0))
|
||||||
|
|||||||
@@ -263,17 +263,15 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
// Root using fromPath
|
// Root using fromPath
|
||||||
if (!string.IsNullOrWhiteSpace(match.FromPath) && !Path.IsPathRooted(file))
|
if (!string.IsNullOrWhiteSpace(match.FromPath) && !Path.IsPathRooted(file))
|
||||||
{
|
{
|
||||||
var fromDirectory = Path.GetDirectoryName(match.FromPath);
|
file = Path.Combine(match.FromPath, file);
|
||||||
if (!string.IsNullOrWhiteSpace(fromDirectory))
|
|
||||||
{
|
|
||||||
file = Path.Combine(fromDirectory, file);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Root using workspace
|
// Root using system.defaultWorkingDirectory
|
||||||
if (!Path.IsPathRooted(file))
|
if (!Path.IsPathRooted(file))
|
||||||
{
|
{
|
||||||
var workspace = _executionContext.GetGitHubContext("workspace");
|
var githubContext = _executionContext.ExpressionValues["github"] as GitHubContext;
|
||||||
|
ArgUtil.NotNull(githubContext, nameof(githubContext));
|
||||||
|
var workspace = githubContext["workspace"].ToString();
|
||||||
ArgUtil.NotNullOrEmpty(workspace, "workspace");
|
ArgUtil.NotNullOrEmpty(workspace, "workspace");
|
||||||
|
|
||||||
file = Path.Combine(workspace, file);
|
file = Path.Combine(workspace, file);
|
||||||
@@ -299,7 +297,7 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Prefer `/` on all platforms
|
// prefer `/` on all platforms
|
||||||
issue.Data["file"] = file.Substring(repositoryPath.Length).TrimStart(Path.DirectorySeparatorChar).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
issue.Data["file"] = file.Substring(repositoryPath.Length).TrimStart(Path.DirectorySeparatorChar).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603</NoWarn>
|
<NoWarn>NU1701;NU1603</NoWarn>
|
||||||
<Version>$(Version)</Version>
|
<Version>$(Version)</Version>
|
||||||
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
|
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
|
||||||
<PublishReadyToRun>true</PublishReadyToRun>
|
<PublishReadyToRun>true</PublishReadyToRun>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -35,4 +35,48 @@
|
|||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
||||||
|
<DefineConstants>OS_OSX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' AND '$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>OS_OSX;DEBUG;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603</NoWarn>
|
<NoWarn>NU1701;NU1603</NoWarn>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
"linux-x64",
|
"linux-x64",
|
||||||
"linux-arm",
|
"linux-arm",
|
||||||
"linux-arm64",
|
"linux-arm64",
|
||||||
|
"rhel.6-x64",
|
||||||
"osx-x64"
|
"osx-x64"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using GitHub.Runner.Sdk;
|
using GitHub.Runner.Sdk;
|
||||||
@@ -159,7 +158,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Level", "L0")]
|
[Trait("Level", "L0")]
|
||||||
[Trait("Category", "Worker")]
|
[Trait("Category", "Worker")]
|
||||||
public void MatcherCode()
|
public void Code()
|
||||||
{
|
{
|
||||||
var matchers = new IssueMatchersConfig
|
var matchers = new IssueMatchersConfig
|
||||||
{
|
{
|
||||||
@@ -301,7 +300,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Level", "L0")]
|
[Trait("Level", "L0")]
|
||||||
[Trait("Category", "Worker")]
|
[Trait("Category", "Worker")]
|
||||||
public void MatcherLineColumn()
|
public void LineColumn()
|
||||||
{
|
{
|
||||||
var matchers = new IssueMatchersConfig
|
var matchers = new IssueMatchersConfig
|
||||||
{
|
{
|
||||||
@@ -349,7 +348,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Level", "L0")]
|
[Trait("Level", "L0")]
|
||||||
[Trait("Category", "Worker")]
|
[Trait("Category", "Worker")]
|
||||||
public void MatcherDoesNotReceiveCommand()
|
public void ProcessCommand()
|
||||||
{
|
{
|
||||||
using (Setup())
|
using (Setup())
|
||||||
using (_outputManager)
|
using (_outputManager)
|
||||||
@@ -383,7 +382,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Level", "L0")]
|
[Trait("Level", "L0")]
|
||||||
[Trait("Category", "Worker")]
|
[Trait("Category", "Worker")]
|
||||||
public void MatcherRemoveColorCodes()
|
public void RemoveColorCodes()
|
||||||
{
|
{
|
||||||
using (Setup())
|
using (Setup())
|
||||||
using (_outputManager)
|
using (_outputManager)
|
||||||
@@ -529,7 +528,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Level", "L0")]
|
[Trait("Level", "L0")]
|
||||||
[Trait("Category", "Worker")]
|
[Trait("Category", "Worker")]
|
||||||
public void MatcherSeverity()
|
public void Severity()
|
||||||
{
|
{
|
||||||
var matchers = new IssueMatchersConfig
|
var matchers = new IssueMatchersConfig
|
||||||
{
|
{
|
||||||
@@ -590,7 +589,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Level", "L0")]
|
[Trait("Level", "L0")]
|
||||||
[Trait("Category", "Worker")]
|
[Trait("Category", "Worker")]
|
||||||
public void MatcherTimeout()
|
public void Timeout()
|
||||||
{
|
{
|
||||||
Environment.SetEnvironmentVariable("GITHUB_ACTIONS_RUNNER_ISSUE_MATCHER_TIMEOUT", "0:0:0.01");
|
Environment.SetEnvironmentVariable("GITHUB_ACTIONS_RUNNER_ISSUE_MATCHER_TIMEOUT", "0:0:0.01");
|
||||||
var matchers = new IssueMatchersConfig
|
var matchers = new IssueMatchersConfig
|
||||||
@@ -641,216 +640,10 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
// todo: roots file against fromPath
|
||||||
[Trait("Level", "L0")]
|
// todo: roots file against system.defaultWorkingDirectory
|
||||||
[Trait("Category", "Worker")]
|
// todo: matches repository
|
||||||
public void MatcherFile()
|
// todo: checks file exists
|
||||||
{
|
|
||||||
var matchers = new IssueMatchersConfig
|
|
||||||
{
|
|
||||||
Matchers =
|
|
||||||
{
|
|
||||||
new IssueMatcherConfig
|
|
||||||
{
|
|
||||||
Owner = "my-matcher-1",
|
|
||||||
Patterns = new[]
|
|
||||||
{
|
|
||||||
new IssuePatternConfig
|
|
||||||
{
|
|
||||||
Pattern = @"(.+): (.+)",
|
|
||||||
File = 1,
|
|
||||||
Message = 2,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
using (var hostContext = Setup(matchers: matchers))
|
|
||||||
using (_outputManager)
|
|
||||||
{
|
|
||||||
// Setup github.workspace
|
|
||||||
var workDirectory = hostContext.GetDirectory(WellKnownDirectory.Work);
|
|
||||||
ArgUtil.NotNullOrEmpty(workDirectory, nameof(workDirectory));
|
|
||||||
Directory.CreateDirectory(workDirectory);
|
|
||||||
var workspaceDirectory = Path.Combine(workDirectory, "workspace");
|
|
||||||
Directory.CreateDirectory(workspaceDirectory);
|
|
||||||
_executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory);
|
|
||||||
|
|
||||||
// Create a test file
|
|
||||||
Directory.CreateDirectory(Path.Combine(workspaceDirectory, "some-directory"));
|
|
||||||
var filePath = Path.Combine(workspaceDirectory, "some-directory", "some-file.txt");
|
|
||||||
File.WriteAllText(filePath, "");
|
|
||||||
|
|
||||||
// Process
|
|
||||||
Process("some-directory/some-file.txt: some error");
|
|
||||||
Assert.Equal(1, _issues.Count);
|
|
||||||
Assert.Equal("some error", _issues[0].Item1.Message);
|
|
||||||
Assert.Equal("some-directory/some-file.txt", _issues[0].Item1.Data["file"]);
|
|
||||||
Assert.Equal(0, _commands.Count);
|
|
||||||
Assert.Equal(0, _messages.Count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
[Trait("Level", "L0")]
|
|
||||||
[Trait("Category", "Worker")]
|
|
||||||
public void MatcherFileExists()
|
|
||||||
{
|
|
||||||
var matchers = new IssueMatchersConfig
|
|
||||||
{
|
|
||||||
Matchers =
|
|
||||||
{
|
|
||||||
new IssueMatcherConfig
|
|
||||||
{
|
|
||||||
Owner = "my-matcher-1",
|
|
||||||
Patterns = new[]
|
|
||||||
{
|
|
||||||
new IssuePatternConfig
|
|
||||||
{
|
|
||||||
Pattern = @"(.+): (.+)",
|
|
||||||
File = 1,
|
|
||||||
Message = 2,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
using (var hostContext = Setup(matchers: matchers))
|
|
||||||
using (_outputManager)
|
|
||||||
{
|
|
||||||
// Setup github.workspace
|
|
||||||
var workDirectory = hostContext.GetDirectory(WellKnownDirectory.Work);
|
|
||||||
ArgUtil.NotNullOrEmpty(workDirectory, nameof(workDirectory));
|
|
||||||
Directory.CreateDirectory(workDirectory);
|
|
||||||
var workspaceDirectory = Path.Combine(workDirectory, "workspace");
|
|
||||||
Directory.CreateDirectory(workspaceDirectory);
|
|
||||||
_executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory);
|
|
||||||
|
|
||||||
// Create a test file
|
|
||||||
File.WriteAllText(Path.Combine(workspaceDirectory, "some-file-1.txt"), "");
|
|
||||||
|
|
||||||
// Process
|
|
||||||
Process("some-file-1.txt: some error 1"); // file exists
|
|
||||||
Process("some-file-2.txt: some error 2"); // file does not exist
|
|
||||||
|
|
||||||
Assert.Equal(2, _issues.Count);
|
|
||||||
Assert.Equal("some error 1", _issues[0].Item1.Message);
|
|
||||||
Assert.Equal("some-file-1.txt", _issues[0].Item1.Data["file"]);
|
|
||||||
Assert.Equal("some error 2", _issues[1].Item1.Message);
|
|
||||||
Assert.False(_issues[1].Item1.Data.ContainsKey("file")); // does not contain file key
|
|
||||||
Assert.Equal(0, _commands.Count);
|
|
||||||
Assert.Equal(0, _messages.Where(x => !x.StartsWith("##[debug]")).Count());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
[Trait("Level", "L0")]
|
|
||||||
[Trait("Category", "Worker")]
|
|
||||||
public void MatcherFileOutsideRepository()
|
|
||||||
{
|
|
||||||
var matchers = new IssueMatchersConfig
|
|
||||||
{
|
|
||||||
Matchers =
|
|
||||||
{
|
|
||||||
new IssueMatcherConfig
|
|
||||||
{
|
|
||||||
Owner = "my-matcher-1",
|
|
||||||
Patterns = new[]
|
|
||||||
{
|
|
||||||
new IssuePatternConfig
|
|
||||||
{
|
|
||||||
Pattern = @"(.+): (.+)",
|
|
||||||
File = 1,
|
|
||||||
Message = 2,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
using (var hostContext = Setup(matchers: matchers))
|
|
||||||
using (_outputManager)
|
|
||||||
{
|
|
||||||
// Setup github.workspace
|
|
||||||
var workDirectory = hostContext.GetDirectory(WellKnownDirectory.Work);
|
|
||||||
ArgUtil.NotNullOrEmpty(workDirectory, nameof(workDirectory));
|
|
||||||
Directory.CreateDirectory(workDirectory);
|
|
||||||
var workspaceDirectory = Path.Combine(workDirectory, "workspace");
|
|
||||||
Directory.CreateDirectory(workspaceDirectory);
|
|
||||||
_executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory);
|
|
||||||
|
|
||||||
// Create test files
|
|
||||||
var filePath1 = Path.Combine(workspaceDirectory, "some-file-1.txt");
|
|
||||||
File.WriteAllText(filePath1, "");
|
|
||||||
var workspaceSiblingDirectory = Path.Combine(Path.GetDirectoryName(workspaceDirectory), "workspace-sibling");
|
|
||||||
Directory.CreateDirectory(workspaceSiblingDirectory);
|
|
||||||
var filePath2 = Path.Combine(workspaceSiblingDirectory, "some-file-2.txt");
|
|
||||||
File.WriteAllText(filePath2, "");
|
|
||||||
|
|
||||||
// Process
|
|
||||||
Process($"{filePath1}: some error 1"); // file exists inside workspace
|
|
||||||
Process($"{filePath2}: some error 2"); // file exists outside workspace
|
|
||||||
|
|
||||||
Assert.Equal(2, _issues.Count);
|
|
||||||
Assert.Equal("some error 1", _issues[0].Item1.Message);
|
|
||||||
Assert.Equal("some-file-1.txt", _issues[0].Item1.Data["file"]);
|
|
||||||
Assert.Equal("some error 2", _issues[1].Item1.Message);
|
|
||||||
Assert.False(_issues[1].Item1.Data.ContainsKey("file")); // does not contain file key
|
|
||||||
Assert.Equal(0, _commands.Count);
|
|
||||||
Assert.Equal(0, _messages.Where(x => !x.StartsWith("##[debug]")).Count());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
[Trait("Level", "L0")]
|
|
||||||
[Trait("Category", "Worker")]
|
|
||||||
public void MatcherFromPath()
|
|
||||||
{
|
|
||||||
var matchers = new IssueMatchersConfig
|
|
||||||
{
|
|
||||||
Matchers =
|
|
||||||
{
|
|
||||||
new IssueMatcherConfig
|
|
||||||
{
|
|
||||||
Owner = "my-matcher-1",
|
|
||||||
Patterns = new[]
|
|
||||||
{
|
|
||||||
new IssuePatternConfig
|
|
||||||
{
|
|
||||||
Pattern = @"(.+): (.+) \[(.+)\]",
|
|
||||||
File = 1,
|
|
||||||
Message = 2,
|
|
||||||
FromPath = 3,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
using (var hostContext = Setup(matchers: matchers))
|
|
||||||
using (_outputManager)
|
|
||||||
{
|
|
||||||
// Setup github.workspace
|
|
||||||
var workDirectory = hostContext.GetDirectory(WellKnownDirectory.Work);
|
|
||||||
ArgUtil.NotNullOrEmpty(workDirectory, nameof(workDirectory));
|
|
||||||
Directory.CreateDirectory(workDirectory);
|
|
||||||
var workspaceDirectory = Path.Combine(workDirectory, "workspace");
|
|
||||||
Directory.CreateDirectory(workspaceDirectory);
|
|
||||||
_executionContext.Setup(x => x.GetGitHubContext("workspace")).Returns(workspaceDirectory);
|
|
||||||
|
|
||||||
// Create a test file
|
|
||||||
Directory.CreateDirectory(Path.Combine(workspaceDirectory, "some-directory"));
|
|
||||||
Directory.CreateDirectory(Path.Combine(workspaceDirectory, "some-project", "some-directory"));
|
|
||||||
var filePath = Path.Combine(workspaceDirectory, "some-project", "some-directory", "some-file.txt");
|
|
||||||
File.WriteAllText(filePath, "");
|
|
||||||
|
|
||||||
// Process
|
|
||||||
Process("some-directory/some-file.txt: some error [some-project/some-project.proj]");
|
|
||||||
Assert.Equal(1, _issues.Count);
|
|
||||||
Assert.Equal("some error", _issues[0].Item1.Message);
|
|
||||||
Assert.Equal("some-project/some-directory/some-file.txt", _issues[0].Item1.Data["file"]);
|
|
||||||
Assert.Equal(0, _commands.Count);
|
|
||||||
Assert.Equal(0, _messages.Count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private TestHostContext Setup(
|
private TestHostContext Setup(
|
||||||
[CallerMemberName] string name = "",
|
[CallerMemberName] string name = "",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm;linux-arm64;rhel.6-x64;osx-x64</RuntimeIdentifiers>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
<AssetTargetFallback>portable-net45+win8</AssetTargetFallback>
|
||||||
<NoWarn>NU1701;NU1603;NU1603;xUnit2013;</NoWarn>
|
<NoWarn>NU1701;NU1603;NU1603;xUnit2013;</NoWarn>
|
||||||
@@ -29,4 +29,48 @@
|
|||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x64'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'win-x86'">
|
||||||
|
<DefineConstants>OS_WINDOWS;X86;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">
|
||||||
|
<DefineConstants>OS_OSX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' AND '$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>OS_OSX;DEBUG;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'rhel.6-x64'">
|
||||||
|
<DefineConstants>OS_LINUX;OS_RHEL6;X64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' AND '$(Configuration)' == 'Debug' AND '$(PackageRuntime)' == 'linux-arm64'">
|
||||||
|
<DefineConstants>OS_LINUX;ARM64;DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
98
src/dev.sh
98
src/dev.sh
@@ -10,7 +10,6 @@ set -e
|
|||||||
|
|
||||||
DEV_CMD=$1
|
DEV_CMD=$1
|
||||||
DEV_CONFIG=$2
|
DEV_CONFIG=$2
|
||||||
DEV_TARGET_RUNTIME=$3
|
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
LAYOUT_DIR="$SCRIPT_DIR/../_layout"
|
LAYOUT_DIR="$SCRIPT_DIR/../_layout"
|
||||||
@@ -34,60 +33,64 @@ if [[ ($(uname) == "Linux") || ($(uname) == "Darwin") ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then
|
if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then
|
||||||
RUNTIME_ID='win-x64'
|
RUNTIME_ID='win-x64'
|
||||||
if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then
|
if [[ "$PROCESSOR_ARCHITECTURE" == 'x86' ]]; then
|
||||||
RUNTIME_ID='win-x86'
|
RUNTIME_ID='win-x86'
|
||||||
fi
|
fi
|
||||||
elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
|
elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
|
||||||
RUNTIME_ID="linux-x64"
|
RUNTIME_ID="linux-x64"
|
||||||
if command -v uname > /dev/null; then
|
if command -v uname > /dev/null; then
|
||||||
CPU_NAME=$(uname -m)
|
CPU_NAME=$(uname -m)
|
||||||
case $CPU_NAME in
|
case $CPU_NAME in
|
||||||
armv7l) RUNTIME_ID="linux-arm";;
|
armv7l) RUNTIME_ID="linux-arm";;
|
||||||
aarch64) RUNTIME_ID="linux-arm64";;
|
aarch64) RUNTIME_ID="linux-arm64";;
|
||||||
esac
|
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
|
elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then
|
||||||
RUNTIME_ID='osx-x64'
|
RUNTIME_ID='osx-x64'
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "$DEV_TARGET_RUNTIME" ]]; then
|
|
||||||
RUNTIME_ID="$DEV_TARGET_RUNTIME"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure current platform support publish the dotnet runtime
|
# Make sure current platform support publish the dotnet runtime
|
||||||
# Windows can publish win-x86/x64
|
# Windows can publish win-x86/x64
|
||||||
# Linux can publish linux-x64/arm/arm64
|
# Linux can publish linux-x64/arm/arm64/rhel.6-x64
|
||||||
# OSX can publish osx-x64
|
# OSX can publish osx-x64
|
||||||
if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then
|
if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then
|
||||||
if [[ ("$RUNTIME_ID" != 'win-x86') && ("$RUNTIME_ID" != 'win-x64') ]]; then
|
if [[ ("$RUNTIME_ID" != 'win-x86') && ("$RUNTIME_ID" != 'win-x64') ]]; then
|
||||||
echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2
|
echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
|
elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
|
||||||
if [[ ("$RUNTIME_ID" != 'linux-x64') && ("$RUNTIME_ID" != 'linux-x86') && ("$RUNTIME_ID" != 'linux-arm64') && ("$RUNTIME_ID" != 'linux-arm') ]]; then
|
if [[ ("$RUNTIME_ID" != 'linux-x64') && ("$RUNTIME_ID" != 'linux-arm') && ("$RUNTIME_ID" != 'linux-arm64') && ("$RUNTIME_ID" != 'rhel.6-x64') ]]; then
|
||||||
echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2
|
echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then
|
elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then
|
||||||
if [[ ("$RUNTIME_ID" != 'osx-x64') ]]; then
|
if [[ ("$RUNTIME_ID" != 'osx-x64') ]]; then
|
||||||
echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2
|
echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function failed()
|
function failed()
|
||||||
{
|
{
|
||||||
local error=${1:-Undefined error}
|
local error=${1:-Undefined error}
|
||||||
echo "Failed: $error" >&2
|
echo "Failed: $error" >&2
|
||||||
popd
|
popd
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function warn()
|
function warn()
|
||||||
{
|
{
|
||||||
local error=${1:-Undefined error}
|
local error=${1:-Undefined error}
|
||||||
echo "WARNING - FAILED: $error" >&2
|
echo "WARNING - FAILED: $error" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkRC() {
|
function checkRC() {
|
||||||
@@ -148,8 +151,7 @@ function package ()
|
|||||||
echo "You must build first. Expecting to find ${LAYOUT_DIR}/bin"
|
echo "You must build first. Expecting to find ${LAYOUT_DIR}/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: We are cross-compiling arm on x64 so we cant exec Runner.Listener. Remove after building on native arm host
|
runner_ver=$("${LAYOUT_DIR}/bin/Runner.Listener" --version) || failed "version"
|
||||||
runner_ver=$("${LAYOUT_DIR}/bin/Runner.Listener" --version) || runner_ver=$(cat runnerversion) || failed "version"
|
|
||||||
runner_pkg_name="actions-runner-${RUNTIME_ID}-${runner_ver}"
|
runner_pkg_name="actions-runner-${RUNTIME_ID}-${runner_ver}"
|
||||||
|
|
||||||
heading "Packaging ${runner_pkg_name}"
|
heading "Packaging ${runner_pkg_name}"
|
||||||
@@ -229,15 +231,15 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case $DEV_CMD in
|
case $DEV_CMD in
|
||||||
"build") build;;
|
"build") build;;
|
||||||
"b") build;;
|
"b") build;;
|
||||||
"test") runtest;;
|
"test") runtest;;
|
||||||
"t") runtest;;
|
"t") runtest;;
|
||||||
"layout") layout;;
|
"layout") layout;;
|
||||||
"l") layout;;
|
"l") layout;;
|
||||||
"package") package;;
|
"package") package;;
|
||||||
"p") package;;
|
"p") package;;
|
||||||
*) echo "Invalid cmd. Use build(b), test(t), layout(l) or package(p)";;
|
*) echo "Invalid cmd. Use build(b), test(t), layout(l) or package(p)";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.161.0
|
2.160.0
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
parameters:
|
|
||||||
targetRuntime: ''
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Build agent layout
|
# Build agent layout
|
||||||
- script: dev.cmd layout Release ${{ parameters.targetRuntime }}
|
- script: dev.cmd layout Release
|
||||||
workingDirectory: src
|
workingDirectory: src
|
||||||
displayName: Build & Layout Release ${{ parameters.targetRuntime }}
|
displayName: Build & Layout Release
|
||||||
|
|
||||||
# Run test
|
# Run test
|
||||||
- script: dev.cmd test
|
- script: dev.cmd test
|
||||||
|
|||||||
Reference in New Issue
Block a user