Compare commits

..

23 Commits

Author SHA1 Message Date
David Kale
3ade8424a5 Merge branch 'master' into 150-runner-arch
Conflicts:
releaseNote.md
src/runnerversion
2019-11-12 11:36:25 -05:00
David Kale
c0e866faf0 Get version from file to avoid exec error during package on x64 host for arm package 2019-11-11 15:35:15 -05:00
David Kale
d6956ba213 Fix version 2019-11-11 15:07:33 -05:00
David Kale
215f78888a New arch is a feature
Dont release x86 until we have an e2e test machine
2019-11-11 15:02:21 -05:00
David Kale
d46e92e9bb Cant cross test arm on x64 hosts 2019-11-11 13:25:31 -05:00
David Kale
9573fa77ae RID typo 2019-11-11 13:22:39 -05:00
David Kale
e962329269 Update release, add packages 2019-11-11 13:07:29 -05:00
David Kale
dd804e13a8 Remove unused rhel from matrix includes 2019-11-11 11:06:02 -05:00
David Kale
7d30e27ca3 Package based on new runtime names 2019-11-08 17:13:02 -05:00
David Kale
dbf36630ae Remove RHEL6 2019-11-08 15:16:44 -05:00
David Kale
84b352c693 Add stub for downloading new node externals when they are ready 2019-11-08 13:30:38 -05:00
David Kale
f4adf7585b Add RHEL6, skip L0 on arm for now 2019-11-07 15:39:14 -05:00
David Kale
e0f8313645 Temporarily bench rhel 2019-11-07 14:52:40 -05:00
David Kale
9889c42041 win-x86 externals 2019-11-07 14:47:27 -05:00
David Kale
55948e4ee6 TEMP: Only test when platform === target runtime
Fix arm64 node externals url
2019-11-07 14:41:35 -05:00
David Kale
5b011dc4ce x32 -> x86 2019-11-07 14:36:55 -05:00
David Kale
4899d8513d Use 4 space indent consistently 2019-11-07 14:30:18 -05:00
David Kale
f1b36bb957 Fix formatting. Remove piplines 2019-11-07 14:28:02 -05:00
David Kale
724f8fcb60 build.yaml 2019-11-07 14:20:50 -05:00
David Kale
39b4472a5f Preserve CURRENT_PLATFORM in dev.sh 2019-11-07 13:27:08 -05:00
David Kale
2f3f51b303 Remove win-x86 2019-11-07 13:22:08 -05:00
David Kale
f6a4f588fc Build with actions instead 2019-11-07 13:15:26 -05:00
David Kale
bdafe16af4 Cross compile for win-x86, linux-arm, linux-arm64 2019-11-07 13:04:16 -05:00
16 changed files with 79 additions and 27 deletions

View File

@@ -14,6 +14,7 @@ jobs:
strategy: strategy:
matrix: matrix:
runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, osx-x64 ] runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, osx-x64 ]
# runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, win-x86, osx-x64 ]
include: include:
- runtime: linux-x64 - runtime: linux-x64
os: ubuntu-latest os: ubuntu-latest
@@ -35,6 +36,10 @@ jobs:
os: windows-latest os: windows-latest
devScript: ./dev devScript: ./dev
# - runtime: win-x86
# os: windows-latest
# devScript: ./dev
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1

View File

@@ -36,12 +36,53 @@ stages:
# 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
artifactType: container artifactType: container
# ################################################################################
# - job: build_windows_agent_x86
# ################################################################################
# displayName: Windows Agent (x86)
# pool:
# vmImage: vs2017-win2016
# steps:
# # Steps template for windows platform
# - template: windows.template.yml
# parameters:
# targetRuntime: win-x86
# # Package dotnet core windows dependency (VC++ Redistributable)
# - powershell: |
# Write-Host "Downloading 'VC++ Redistributable' package."
# $outDir = Join-Path -Path $env:TMP -ChildPath ([Guid]::NewGuid())
# New-Item -Path $outDir -ItemType directory
# $outFile = Join-Path -Path $outDir -ChildPath "ucrt.zip"
# Invoke-WebRequest -Uri https://vstsagenttools.blob.core.windows.net/tools/ucrt/ucrt_x86.zip -OutFile $outFile
# Write-Host "Unzipping 'VC++ Redistributable' package to agent layout."
# $unzipDir = Join-Path -Path $outDir -ChildPath "unzip"
# Add-Type -AssemblyName System.IO.Compression.FileSystem
# [System.IO.Compression.ZipFile]::ExtractToDirectory($outFile, $unzipDir)
# $agentLayoutBin = Join-Path -Path $(Build.SourcesDirectory) -ChildPath "_layout\bin"
# Copy-Item -Path $unzipDir -Destination $agentLayoutBin -Force
# displayName: Package UCRT
# # Create agent package zip
# - script: dev.cmd package Release win-x86
# workingDirectory: src
# displayName: Package Release
# # Upload agent package zip as build artifact
# - task: PublishBuildArtifacts@1
# displayName: Publish Artifact (Windows)
# inputs:
# pathToPublish: _package
# artifactName: runners
# artifactType: container
################################################################################ ################################################################################
- job: build_linux_agent_x64 - job: build_linux_agent_x64
################################################################################ ################################################################################
@@ -62,7 +103,7 @@ stages:
# 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
@@ -88,7 +129,7 @@ stages:
# Upload agent package zip as build artifact # Upload agent package zip as build artifact
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Publish Artifact (Linux ARM64) displayName: Publish Artifact (Linux)
inputs: inputs:
pathToPublish: _package pathToPublish: _package
artifactName: runners artifactName: runners
@@ -114,7 +155,7 @@ stages:
# Upload agent package zip as build artifact # Upload agent package zip as build artifact
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: Publish Artifact (Linux ARM) displayName: Publish Artifact (Linux)
inputs: inputs:
pathToPublish: _package pathToPublish: _package
artifactName: runners artifactName: runners
@@ -140,7 +181,7 @@ stages:
# 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

View File

@@ -1,14 +1,11 @@
## Features ## Features
- Added packages for Linux ARM32 (linux-arm) and Linux ARM64 (linux-arm64) (#184) - Add packages for Windows x86 (win-x6), Linux ARM32 (linux-arm), Linux ARM64 (linux-arm64)
- 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) - N/A
## Misc ## Misc
- Fixed code warnings in the Runner (#174) - N/A
- Fixed code warnings in the Runner tests (#178)
- Added support for building the Runner in Visual Studio (#173)
## Agent Downloads ## Agent Downloads

View File

@@ -16,6 +16,9 @@
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux'"> <PropertyGroup Condition="'$(BUILD_OS)' == 'Linux'">
<DefineConstants>$(DefineConstants);OS_LINUX</DefineConstants> <DefineConstants>$(DefineConstants);OS_LINUX</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux' AND '$(PackageRuntime)' == 'rhel.6-x64'">
<DefineConstants>$(DefineConstants);OS_RHEL6</DefineConstants>
</PropertyGroup>
<!-- Set Platform/bitness vars --> <!-- Set Platform/bitness vars -->
<PropertyGroup Condition="'$(BUILD_OS)' == 'Windows' AND ('$(PackageRuntime)' == 'win-x64' OR '$(PackageRuntime)' == '')"> <PropertyGroup Condition="'$(BUILD_OS)' == 'Windows' AND ('$(PackageRuntime)' == 'win-x64' OR '$(PackageRuntime)' == '')">
@@ -46,9 +49,4 @@
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants> <DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup> </PropertyGroup>
<!-- Set OS specific config -->
<PropertyGroup Condition="'$(BUILD_OS)' == 'OSX'">
<UseHardenedRuntime>true</UseHardenedRuntime>
</PropertyGroup>
</Project> </Project>

View File

@@ -137,7 +137,7 @@ if [[ "$PACKAGERUNTIME" == "osx-x64" ]]; then
fi fi
# Download the external tools for Linux PACKAGERUNTIMEs. # Download the external tools for Linux PACKAGERUNTIMEs.
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

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -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))

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -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"
}; };

View File

@@ -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-arm64;linux-arm;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>

View File

@@ -47,6 +47,13 @@ elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then
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 fi
@@ -57,7 +64,7 @@ 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/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
@@ -65,7 +72,7 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then
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-x86') && ("$RUNTIME_ID" != 'linux-arm64') && ("$RUNTIME_ID" != 'linux-arm') && ("$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