From b924a5aa1a3efe739e43b0694066e0dff023eed0 Mon Sep 17 00:00:00 2001 From: rahulssv-ibm Date: Wed, 13 Nov 2024 10:40:05 +0530 Subject: [PATCH 1/2] update: - added patch for main branch of runner on ppc64le - updated supported packages list - added dedicated folder for maintaining patches --- .../runner-main-sdk8-ppc64le.patch} | 235 ++++-- .../runner-main-sdk8-s390x.patch} | 0 .../runner-v2.317.0-sdk7-ppc64le.patch | 390 +++++++++ .../runner-v2.317.0-sdk8-ppc64le.patch | 785 ++++++++++++++++++ .../runner-v2.318.0-sdk8-ppc64le.patch | 388 +++++++++ .../runner-v2.319.0-sdk8-ppc64le.patch | 676 +++++++++++++++ .../runner-v2.320.0-sdk8-ppc64le.patch} | 2 +- .../patches/runner-v2.320.0-sdk8-s390x.patch | 703 ++++++++++++++++ build-files/supported_packages.txt | 9 +- setup-build-env.sh | 6 +- 10 files changed, 3092 insertions(+), 102 deletions(-) rename build-files/{runner-sdk-8.s390x.patch => patches/runner-main-sdk8-ppc64le.patch} (64%) rename build-files/{runner-sdk-8.patch => patches/runner-main-sdk8-s390x.patch} (100%) create mode 100644 build-files/patches/runner-v2.317.0-sdk7-ppc64le.patch create mode 100644 build-files/patches/runner-v2.317.0-sdk8-ppc64le.patch create mode 100644 build-files/patches/runner-v2.318.0-sdk8-ppc64le.patch create mode 100644 build-files/patches/runner-v2.319.0-sdk8-ppc64le.patch rename build-files/{runner-sdk-8.ppc64le.patch => patches/runner-v2.320.0-sdk8-ppc64le.patch} (99%) create mode 100644 build-files/patches/runner-v2.320.0-sdk8-s390x.patch diff --git a/build-files/runner-sdk-8.s390x.patch b/build-files/patches/runner-main-sdk8-ppc64le.patch similarity index 64% rename from build-files/runner-sdk-8.s390x.patch rename to build-files/patches/runner-main-sdk8-ppc64le.patch index 80a43c1..51e7fd8 100644 --- a/build-files/runner-sdk-8.s390x.patch +++ b/build-files/patches/runner-main-sdk8-ppc64le.patch @@ -1,23 +1,22 @@ diff --git a/src/Directory.Build.props b/src/Directory.Build.props -index 9db5fac..277ca63 100644 +index 9db5faca..706cafce 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props -@@ -44,6 +44,13 @@ +@@ -44,6 +44,12 @@ $(DefineConstants);ARM64 -+ -+ $(DefineConstants);S390X -+ + + $(DefineConstants);PPC64LE + -+ ++ ++ $(DefineConstants);S390X ++ diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh -index 2a0db24..3f00e12 100755 +index 2a0db24a..7908b2f5 100755 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -177,3 +177,11 @@ fi @@ -25,18 +24,19 @@ index 2a0db24..3f00e12 100755 acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-armv7l.tar.gz" node20 fix_nested_dir fi + -+if [[ "$PACKAGERUNTIME" == "linux-s390x" ]]; then -+ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-s390x.tar.gz" node20 fix_nested_dir -+fi -+ +if [[ "$PACKAGERUNTIME" == "linux-ppc64le" ]]; then + acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-ppc64le.tar.gz" node20 fix_nested_dir +fi ++ ++if [[ "$PACKAGERUNTIME" == "linux-s390x" ]]; then ++ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-s390x.tar.gz" node20 fix_nested_dir ++fi +\ No newline at end of file diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh -index 14cc6ba..92eecfe 100755 +index 14cc6bab..9b5b8e6f 100755 --- a/src/Misc/layoutroot/config.sh +++ b/src/Misc/layoutroot/config.sh -@@ -20,25 +20,28 @@ then +@@ -20,25 +20,29 @@ then message="Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies." @@ -47,7 +47,8 @@ index 14cc6ba..92eecfe 100755 - exit 1 - fi + ARCH=`uname -m` -+ if [ "${ARCH}" != "s390x" -a "${ARCH}" != "ppc64le" ]; then ++ if [ "${ARCH}" != "s390x" -a "${ARCH}" != "ppc64le" ] ++ then + ldd ./bin/libcoreclr.so | grep 'not found' + if [ $? -eq 0 ]; then + echo "Dependencies is missing for Dotnet Core 6.0" @@ -83,7 +84,7 @@ index 14cc6ba..92eecfe 100755 if ! [ -x "$(command -v ldconfig)" ]; then diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs -index 2c20d1b..d795f22 100644 +index 2c20d1b1..63957a5d 100644 --- a/src/Runner.Common/Constants.cs +++ b/src/Runner.Common/Constants.cs @@ -58,7 +58,9 @@ namespace GitHub.Runner.Common @@ -92,8 +93,8 @@ index 2c20d1b..d795f22 100644 Arm, - Arm64 + Arm64, -+ S390x, -+ PPC64le, ++ Ppc64le, ++ S390x } public static class Runner @@ -101,15 +102,15 @@ index 2c20d1b..d795f22 100644 public static readonly Architecture PlatformArchitecture = Architecture.Arm; #elif ARM64 public static readonly Architecture PlatformArchitecture = Architecture.Arm64; ++#elif PPC64LE ++ public static readonly Architecture PlatformArchitecture = Architecture.Ppc64le; +#elif S390X + public static readonly Architecture PlatformArchitecture = Architecture.S390x; -+#elif PPC64LE -+ public static readonly Architecture PlatformArchitecture = Architecture.PPC64le; #else public static readonly Architecture PlatformArchitecture = Architecture.X64; #endif diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj -index 6c46356..e2796ff 100644 +index 6c463562..e2796ffa 100644 --- a/src/Runner.Common/Runner.Common.csproj +++ b/src/Runner.Common/Runner.Common.csproj @@ -7,6 +7,9 @@ @@ -123,22 +124,22 @@ index 6c46356..e2796ff 100644 diff --git a/src/Runner.Common/Util/VarUtil.cs b/src/Runner.Common/Util/VarUtil.cs -index 97273a1..f9704d6 100644 +index 97273a1a..78f78701 100644 --- a/src/Runner.Common/Util/VarUtil.cs +++ b/src/Runner.Common/Util/VarUtil.cs @@ -53,6 +53,10 @@ namespace GitHub.Runner.Common.Util return "ARM"; case Constants.Architecture.Arm64: return "ARM64"; ++ case Constants.Architecture.Ppc64le: ++ return "PPC64LE"; + case Constants.Architecture.S390x: + return "S390X"; -+ case Constants.Architecture.PPC64le: -+ return "PPC64LE"; default: throw new NotSupportedException(); // Should never reach here. } diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj -index afd5281..ecc1c74 100644 +index afd52812..ecc1c74d 100644 --- a/src/Runner.Listener/Runner.Listener.csproj +++ b/src/Runner.Listener/Runner.Listener.csproj @@ -10,6 +10,9 @@ @@ -150,9 +151,51 @@ index afd5281..ecc1c74 100644 + false + +diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj +index 81a8d2e4..0bfdc45c 100644 +--- a/src/Runner.PluginHost/Runner.PluginHost.csproj ++++ b/src/Runner.PluginHost/Runner.PluginHost.csproj +@@ -10,6 +10,9 @@ + $(Version) + false + true ++ true ++ false ++ false + + + +diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj +index a786cf1c..600ea167 100644 +--- a/src/Runner.Plugins/Runner.Plugins.csproj ++++ b/src/Runner.Plugins/Runner.Plugins.csproj +@@ -8,6 +8,9 @@ + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) ++ true ++ false ++ false + + + +diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj +index 55dbf126..d40524f0 100644 +--- a/src/Runner.Sdk/Runner.Sdk.csproj ++++ b/src/Runner.Sdk/Runner.Sdk.csproj +@@ -8,6 +8,9 @@ + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) ++ true ++ false ++ false + + diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj -index 53c1610..d338297 100644 +index 53c1610d..d3382973 100644 --- a/src/Runner.Worker/Runner.Worker.csproj +++ b/src/Runner.Worker/Runner.Worker.csproj @@ -10,6 +10,9 @@ @@ -166,7 +209,7 @@ index 53c1610..d338297 100644 diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj -index 7ba7394..59b4c89 100644 +index 7ba73949..156616cd 100644 --- a/src/Sdk/Sdk.csproj +++ b/src/Sdk/Sdk.csproj @@ -11,6 +11,9 @@ @@ -179,41 +222,65 @@ index 7ba7394..59b4c89 100644 +@@ -18,7 +21,7 @@ + + + +- ++ + + + diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs -index f3c1b8f..43225f4 100644 +index f3c1b8f9..9a1c5aa0 100644 --- a/src/Test/L0/ConstantGenerationL0.cs +++ b/src/Test/L0/ConstantGenerationL0.cs @@ -20,6 +20,8 @@ namespace GitHub.Runner.Common.Tests "linux-x64", "linux-arm", "linux-arm64", -+ "linux-s390x", + "linux-ppc64le", ++ "linux-s390x", "osx-x64", "osx-arm64" }; diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs -index 26ba65e..57de718 100644 +index 26ba65e7..f4ed8429 100644 --- a/src/Test/L0/Listener/SelfUpdaterL0.cs +++ b/src/Test/L0/Listener/SelfUpdaterL0.cs @@ -1,4 +1,4 @@ -#if !(OS_WINDOWS && ARM64) -+#if !(OS_WINDOWS && ARM64) && !S390X && !PPC64LE ++#if !(OS_WINDOWS && ARM64) && !PPC64LE && !S390X using System; using System.Collections.Generic; using System.IO; +@@ -16,6 +16,7 @@ using Xunit; + + namespace GitHub.Runner.Common.Tests.Listener + { ++ #if !S390X // Self-update is not currently supported on PPC64LE + public sealed class SelfUpdaterL0 + { + private Mock _runnerServer; +@@ -291,5 +292,6 @@ namespace GitHub.Runner.Common.Tests.Listener + } + } + } ++ #endif + } + #endif diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs -index 5115a6b..15e7ab2 100644 +index 5115a6bb..30af481b 100644 --- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs +++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs @@ -1,4 +1,4 @@ -#if !(OS_WINDOWS && ARM64) -+#if !(OS_WINDOWS && ARM64) && !S390X && !PPC64LE ++#if !(OS_WINDOWS && ARM64) && !PPC64LE && !S390X using System; using System.Collections.Generic; using System.IO; diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs -index 47a5d33..be0ab5e 100644 +index 47a5d334..6dbdfbb8 100644 --- a/src/Test/L0/Worker/StepHostL0.cs +++ b/src/Test/L0/Worker/StepHostL0.cs @@ -31,7 +31,7 @@ namespace GitHub.Runner.Common.Tests.Worker @@ -221,20 +288,34 @@ index 47a5d33..be0ab5e 100644 } -#if OS_LINUX -+#if OS_LINUX && !S390X && !PPC64LE ++#if OS_LINUX && !PPC64LE && !S390X [Fact] [Trait("Level", "L0")] [Trait("Category", "Worker")] +diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj +index aebe2420..efd57870 100644 +--- a/src/Test/Test.csproj ++++ b/src/Test/Test.csproj +@@ -4,6 +4,9 @@ + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true + NU1701;NU1603;NU1603;xUnit2013;SYSLIB0050;SYSLIB0051 ++ true ++ false ++ false + + + diff --git a/src/dev.sh b/src/dev.sh -index 795c135..ec9572c 100755 +index 795c135a..551ead3a 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -54,6 +54,8 @@ elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then case $CPU_NAME in armv7l) RUNTIME_ID="linux-arm";; aarch64) RUNTIME_ID="linux-arm64";; -+ s390x) RUNTIME_ID="linux-s390x";; + ppc64le) RUNTIME_ID="linux-ppc64le";; ++ s390x) RUNTIME_ID="linux-s390x";; esac fi elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then @@ -243,61 +324,30 @@ index 795c135..ec9572c 100755 fi 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" != 'linux-s390x') && ("$RUNTIME_ID" != 'linux-ppc64le') ]]; then ++ if [[ ("$RUNTIME_ID" != 'linux-x64') && ("$RUNTIME_ID" != 'linux-x86') && ("$RUNTIME_ID" != 'linux-arm64') && ("$RUNTIME_ID" != 'linux-arm') && ("$RUNTIME_ID" != 'linux-ppc64le') && ("$RUNTIME_ID" != 'linux-s390x') ]]; then echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2 exit 1 fi -@@ -200,33 +202,37 @@ function package () +@@ -143,6 +145,7 @@ function layout () + + heading "Setup externals folder for $RUNTIME_ID runner's layout" + bash ./Misc/externals.sh $RUNTIME_ID || checkRC externals.sh ++ + } + + function runtest () +@@ -199,8 +202,7 @@ function package () + popd > /dev/null } - # Install .NET SDK +-# Install .NET SDK -if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet") ]]; then -- -- # Download dotnet SDK to ../_dotnetsdk directory -- heading "Ensure Dotnet SDK" -- -- # _dotnetsdk -- # \1.0.x -- # \dotnet -- # \.1.0.x -- echo "Download dotnetsdk into ${DOTNETSDK_INSTALLDIR}" -- rm -Rf "${DOTNETSDK_DIR}" -- -- # run dotnet-install.ps1 on windows, dotnet-install.sh on linux -- if [[ ("$CURRENT_PLATFORM" == "windows") ]]; then -- echo "Convert ${DOTNETSDK_INSTALLDIR} to Windows style path" -- sdkinstallwindow_path=${DOTNETSDK_INSTALLDIR:1} -- sdkinstallwindow_path=${sdkinstallwindow_path:0:1}:${sdkinstallwindow_path:1} -- $POWERSHELL -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& \"./Misc/dotnet-install.ps1\" -Version ${DOTNETSDK_VERSION} -InstallDir \"${sdkinstallwindow_path}\" -NoPath; exit \$LastExitCode;" || checkRC dotnet-install.ps1 -- else -- bash ./Misc/dotnet-install.sh --version ${DOTNETSDK_VERSION} --install-dir "${DOTNETSDK_INSTALLDIR}" --no-path || checkRC dotnet-install.sh -- fi -+if [[ ("${RUNTIME_ID}" != 'linux-s390x') && ("${RUNTIME_ID}" != 'linux-ppc64le') ]]; then -+ if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet") ]]; then -+ -+ # Download dotnet SDK to ../_dotnetsdk directory -+ heading "Ensure Dotnet SDK" -+ -+ # _dotnetsdk -+ # \1.0.x -+ # \dotnet -+ # \.1.0.x -+ echo "Download dotnetsdk into ${DOTNETSDK_INSTALLDIR}" -+ rm -Rf "${DOTNETSDK_DIR}" -+ -+ # run dotnet-install.ps1 on windows, dotnet-install.sh on linux -+ if [[ ("$CURRENT_PLATFORM" == "windows") ]]; then -+ echo "Convert ${DOTNETSDK_INSTALLDIR} to Windows style path" -+ sdkinstallwindow_path=${DOTNETSDK_INSTALLDIR:1} -+ sdkinstallwindow_path=${sdkinstallwindow_path:0:1}:${sdkinstallwindow_path:1} -+ $POWERSHELL -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& \"./Misc/dotnet-install.ps1\" -Version ${DOTNETSDK_VERSION} -InstallDir \"${sdkinstallwindow_path}\" -NoPath; exit \$LastExitCode;" || checkRC dotnet-install.ps1 -+ else -+ bash ./Misc/dotnet-install.sh --version ${DOTNETSDK_VERSION} --install-dir "${DOTNETSDK_INSTALLDIR}" --no-path || checkRC dotnet-install.sh -+ fi ++if [[ "${RUNTIME_ID}" != "linux-ppc64le" && "${RUNTIME_ID}" != "linux-s390x" && ((! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet")) ]]; then -- echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" -+ echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" -+ fi + # Download dotnet SDK to ../_dotnetsdk directory + heading "Ensure Dotnet SDK" +@@ -225,8 +227,10 @@ if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTN + echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" fi -echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" @@ -310,10 +360,10 @@ index 795c135..ec9572c 100755 heading "Dotnet SDK Version" dotnet --version diff --git a/src/dir.proj b/src/dir.proj -index 056a312..8370922 100644 +index 056a312e..1f6bdb07 100644 --- a/src/dir.proj +++ b/src/dir.proj -@@ -41,8 +41,18 @@ +@@ -41,13 +41,22 @@ @@ -322,15 +372,20 @@ index 056a312..8370922 100644 + + + RuntimeIdentifier=$(PackageRuntime) -+ -+ SelfContained=false;CopyLocalRuntimeTargetAssets=false ++ SelfContained=false;CopyLocalRuntimeTargetAssets=false + -+ + + + +- ++ + + + diff --git a/build-files/runner-sdk-8.patch b/build-files/patches/runner-main-sdk8-s390x.patch similarity index 100% rename from build-files/runner-sdk-8.patch rename to build-files/patches/runner-main-sdk8-s390x.patch diff --git a/build-files/patches/runner-v2.317.0-sdk7-ppc64le.patch b/build-files/patches/runner-v2.317.0-sdk7-ppc64le.patch new file mode 100644 index 0000000..fc00f5c --- /dev/null +++ b/build-files/patches/runner-v2.317.0-sdk7-ppc64le.patch @@ -0,0 +1,390 @@ +diff --git a/src/Directory.Build.props b/src/Directory.Build.props +index 9db5fac..b22a2b0 100644 +--- a/src/Directory.Build.props ++++ b/src/Directory.Build.props +@@ -44,6 +44,9 @@ + + $(DefineConstants);ARM64 + ++ ++ $(DefineConstants);PPC64LE ++ + + + +diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh +index e057ecb..ce54597 100755 +--- a/src/Misc/externals.sh ++++ b/src/Misc/externals.sh +@@ -190,3 +190,8 @@ if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then + acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-armv7l.tar.gz" node16 fix_nested_dir + acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-armv7l.tar.gz" node20 fix_nested_dir + fi ++ ++if [[ "$PACKAGERUNTIME" == "linux-ppc64le" ]]; then ++ acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-ppc64le.tar.gz" node16 fix_nested_dir ++ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-ppc64le.tar.gz" node20 fix_nested_dir ++fi +\ No newline at end of file +diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh +index 14cc6ba..9b5b8e6 100755 +--- a/src/Misc/layoutroot/config.sh ++++ b/src/Misc/layoutroot/config.sh +@@ -20,25 +20,29 @@ then + + message="Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies." + +- ldd ./bin/libcoreclr.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ARCH=`uname -m` ++ if [ "${ARCH}" != "s390x" -a "${ARCH}" != "ppc64le" ] ++ then ++ ldd ./bin/libcoreclr.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 ++ ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + fi + + if ! [ -x "$(command -v ldconfig)" ]; then +diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs +index 9378104..5aed0f3 100644 +--- a/src/Runner.Common/Constants.cs ++++ b/src/Runner.Common/Constants.cs +@@ -58,7 +58,8 @@ namespace GitHub.Runner.Common + X86, + X64, + Arm, +- Arm64 ++ Arm64, ++ Ppc64le + } + + public static class Runner +@@ -81,6 +82,9 @@ namespace GitHub.Runner.Common + public static readonly Architecture PlatformArchitecture = Architecture.Arm; + #elif ARM64 + public static readonly Architecture PlatformArchitecture = Architecture.Arm64; ++#elif PPC64LE ++ public static readonly Architecture PlatformArchitecture = Architecture.Ppc64le; ++ + #else + public static readonly Architecture PlatformArchitecture = Architecture.X64; + #endif +diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj +index 329a024..5f840bc 100644 +--- a/src/Runner.Common/Runner.Common.csproj ++++ b/src/Runner.Common/Runner.Common.csproj +@@ -1,9 +1,9 @@ + + + +- net6.0 ++ net7.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603 + $(Version) +diff --git a/src/Runner.Common/Util/VarUtil.cs b/src/Runner.Common/Util/VarUtil.cs +index 97273a1..c577871 100644 +--- a/src/Runner.Common/Util/VarUtil.cs ++++ b/src/Runner.Common/Util/VarUtil.cs +@@ -53,6 +53,8 @@ namespace GitHub.Runner.Common.Util + return "ARM"; + case Constants.Architecture.Arm64: + return "ARM64"; ++ case Constants.Architecture.Ppc64le: ++ return "PPC64LE"; + default: + throw new NotSupportedException(); // Should never reach here. + } +diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj +index 3cd72ec..975ba73 100644 +--- a/src/Runner.Listener/Runner.Listener.csproj ++++ b/src/Runner.Listener/Runner.Listener.csproj +@@ -1,9 +1,9 @@ + + + +- net6.0 ++ net7.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603 + $(Version) +diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj +index df30f34..78ca65a 100644 +--- a/src/Runner.PluginHost/Runner.PluginHost.csproj ++++ b/src/Runner.PluginHost/Runner.PluginHost.csproj +@@ -1,9 +1,9 @@ +  + + +- net6.0 ++ net7.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603 + $(Version) +diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj +index 39245a3..a93db70 100644 +--- a/src/Runner.Plugins/Runner.Plugins.csproj ++++ b/src/Runner.Plugins/Runner.Plugins.csproj +@@ -1,9 +1,9 @@ +  + + +- net6.0 ++ net7.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603 + $(Version) +diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj +index 202e866..6bb2240 100644 +--- a/src/Runner.Sdk/Runner.Sdk.csproj ++++ b/src/Runner.Sdk/Runner.Sdk.csproj +@@ -1,9 +1,9 @@ +  + + +- net6.0 ++ net7.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603 + $(Version) +diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj +index eee59b8..be8bcb7 100644 +--- a/src/Runner.Worker/Runner.Worker.csproj ++++ b/src/Runner.Worker/Runner.Worker.csproj +@@ -1,9 +1,9 @@ + + + +- net6.0 ++ net7.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603 + $(Version) +diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj +index ff1cb85..2fdd817 100644 +--- a/src/Sdk/Sdk.csproj ++++ b/src/Sdk/Sdk.csproj +@@ -1,9 +1,9 @@ + + + +- net6.0 ++ net7.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603 + $(Version) +diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs +index f3c1b8f..2a448ad 100644 +--- a/src/Test/L0/ConstantGenerationL0.cs ++++ b/src/Test/L0/ConstantGenerationL0.cs +@@ -20,6 +20,7 @@ namespace GitHub.Runner.Common.Tests + "linux-x64", + "linux-arm", + "linux-arm64", ++ "linux-ppc64le", + "osx-x64", + "osx-arm64" + }; +diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs +index 26ba65e..b4a0f3f 100644 +--- a/src/Test/L0/Listener/SelfUpdaterL0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterL0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +@@ -16,6 +16,7 @@ using Xunit; + + namespace GitHub.Runner.Common.Tests.Listener + { ++ #if !S390X // Self-update is not currently supported on PPC64LE + public sealed class SelfUpdaterL0 + { + private Mock _runnerServer; +@@ -291,5 +292,6 @@ namespace GitHub.Runner.Common.Tests.Listener + } + } + } ++ #endif + } + #endif +diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +index 5115a6b..6ebc7a9 100644 +--- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs +index f6b5889..42237fc 100644 +--- a/src/Test/L0/Worker/StepHostL0.cs ++++ b/src/Test/L0/Worker/StepHostL0.cs +@@ -31,7 +31,7 @@ namespace GitHub.Runner.Common.Tests.Worker + return hc; + } + +-#if OS_LINUX ++#if OS_LINUX && !PPC64LE + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Worker")] +diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj +index 1beddbf..c08aec4 100644 +--- a/src/Test/Test.csproj ++++ b/src/Test/Test.csproj +@@ -1,7 +1,7 @@ + + +- net6.0 +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ net7.0 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603;NU1603;xUnit2013; + +@@ -15,7 +15,7 @@ + + + +- ++ + + + +diff --git a/src/dev.sh b/src/dev.sh +index 0fc5876..e4484ac 100755 +--- a/src/dev.sh ++++ b/src/dev.sh +@@ -54,6 +54,7 @@ elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then + case $CPU_NAME in + armv7l) RUNTIME_ID="linux-arm";; + aarch64) RUNTIME_ID="linux-arm64";; ++ ppc64le) RUNTIME_ID="linux-ppc64le";; + esac + fi + elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then +@@ -80,7 +81,7 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then + exit 1 + fi + 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" != 'linux-ppc64le') ]]; then + echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2 + exit 1 + fi +@@ -199,7 +200,7 @@ function package () + popd > /dev/null + } + +-if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet") ]]; then ++if [[ "${RUNTIME_ID}" != "linux-ppc64le" && ((! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet")) ]]; then + + # Download dotnet SDK to ../_dotnetsdk directory + heading "Ensure Dotnet SDK" +@@ -224,8 +225,10 @@ if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTN + echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" + fi + +-echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" +-export PATH=${DOTNETSDK_INSTALLDIR}:$PATH ++if [[ -d "${DOTNETSDK_INSTALLDIR}" ]]; then ++ echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" ++ export PATH=${DOTNETSDK_INSTALLDIR}:$PATH ++fi + + heading "Dotnet SDK Version" + dotnet --version +diff --git a/src/dir.proj b/src/dir.proj +index 056a312..3fac602 100644 +--- a/src/dir.proj ++++ b/src/dir.proj +@@ -41,8 +41,18 @@ + + + +- +- ++ ++ ++ RuntimeIdentifier=$(PackageRuntime) ++ ++ SelfContained=false;CopyLocalRuntimeTargetAssets=false ++ ++ ++ ++ + + + +diff --git a/src/global.json b/src/global.json +index e7028fe..70e3dcc 100644 +--- a/src/global.json ++++ b/src/global.json +@@ -1,5 +1,5 @@ + { + "sdk": { +- "version": "6.0.421" ++ "version": "7.0.100" + } + } diff --git a/build-files/patches/runner-v2.317.0-sdk8-ppc64le.patch b/build-files/patches/runner-v2.317.0-sdk8-ppc64le.patch new file mode 100644 index 0000000..adea241 --- /dev/null +++ b/build-files/patches/runner-v2.317.0-sdk8-ppc64le.patch @@ -0,0 +1,785 @@ +diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json +index 032387b..ccc59c4 100644 +--- a/.devcontainer/devcontainer.json ++++ b/.devcontainer/devcontainer.json +@@ -4,7 +4,7 @@ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:1": {}, + "ghcr.io/devcontainers/features/dotnet": { +- "version": "6.0.421" ++ "version": "8.0.105" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "16" +diff --git a/.gitignore b/.gitignore +index 34d18c4..411fe40 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -26,4 +26,5 @@ _dotnetsdk + TestResults + TestLogs + .DS_Store ++.mono + **/*.DotSettings.user +\ No newline at end of file +diff --git a/src/Directory.Build.props b/src/Directory.Build.props +index 9db5fac..b22a2b0 100644 +--- a/src/Directory.Build.props ++++ b/src/Directory.Build.props +@@ -44,6 +44,9 @@ + + $(DefineConstants);ARM64 + ++ ++ $(DefineConstants);PPC64LE ++ + + + +diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh +index e057ecb..ce54597 100755 +--- a/src/Misc/externals.sh ++++ b/src/Misc/externals.sh +@@ -190,3 +190,8 @@ if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then + acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-armv7l.tar.gz" node16 fix_nested_dir + acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-armv7l.tar.gz" node20 fix_nested_dir + fi ++ ++if [[ "$PACKAGERUNTIME" == "linux-ppc64le" ]]; then ++ acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-ppc64le.tar.gz" node16 fix_nested_dir ++ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-ppc64le.tar.gz" node20 fix_nested_dir ++fi +\ No newline at end of file +diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh +index 14cc6ba..9b5b8e6 100755 +--- a/src/Misc/layoutroot/config.sh ++++ b/src/Misc/layoutroot/config.sh +@@ -20,25 +20,29 @@ then + + message="Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies." + +- ldd ./bin/libcoreclr.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ARCH=`uname -m` ++ if [ "${ARCH}" != "s390x" -a "${ARCH}" != "ppc64le" ] ++ then ++ ldd ./bin/libcoreclr.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 ++ ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + fi + + if ! [ -x "$(command -v ldconfig)" ]; then +diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs +index 9378104..7469ca0 100644 +--- a/src/Runner.Common/Constants.cs ++++ b/src/Runner.Common/Constants.cs +@@ -58,7 +58,8 @@ namespace GitHub.Runner.Common + X86, + X64, + Arm, +- Arm64 ++ Arm64, ++ Ppc64le + } + + public static class Runner +@@ -81,6 +82,8 @@ namespace GitHub.Runner.Common + public static readonly Architecture PlatformArchitecture = Architecture.Arm; + #elif ARM64 + public static readonly Architecture PlatformArchitecture = Architecture.Arm64; ++#elif PPC64LE ++ public static readonly Architecture PlatformArchitecture = Architecture.Ppc64le; + #else + public static readonly Architecture PlatformArchitecture = Architecture.X64; + #endif +diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj +index 329a024..72d3643 100644 +--- a/src/Runner.Common/Runner.Common.csproj ++++ b/src/Runner.Common/Runner.Common.csproj +@@ -1,11 +1,11 @@ + + + +- net6.0 ++ net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + + +@@ -15,11 +15,11 @@ + + + +- ++ + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.Common/Util/VarUtil.cs b/src/Runner.Common/Util/VarUtil.cs +index 97273a1..c577871 100644 +--- a/src/Runner.Common/Util/VarUtil.cs ++++ b/src/Runner.Common/Util/VarUtil.cs +@@ -53,6 +53,8 @@ namespace GitHub.Runner.Common.Util + return "ARM"; + case Constants.Architecture.Arm64: + return "ARM64"; ++ case Constants.Architecture.Ppc64le: ++ return "PPC64LE"; + default: + throw new NotSupportedException(); // Should never reach here. + } +diff --git a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs +index 15291be..a404a67 100644 +--- a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs ++++ b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs +@@ -1,4 +1,5 @@ + #if OS_WINDOWS ++#pragma warning disable CA1416 + using System.IO; + using System.Security.Cryptography; + using System.Text; +@@ -84,4 +85,5 @@ namespace GitHub.Runner.Listener.Configuration + } + } + } ++#pragma warning restore CA1416 + #endif +diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj +index 3cd72ec..a4a58ad 100644 +--- a/src/Runner.Listener/Runner.Listener.csproj ++++ b/src/Runner.Listener/Runner.Listener.csproj +@@ -1,11 +1,11 @@ + + + +- net6.0 ++ net8.0 + Exe + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true +@@ -18,11 +18,11 @@ + + + +- ++ + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj +index df30f34..b4a6f5f 100644 +--- a/src/Runner.PluginHost/Runner.PluginHost.csproj ++++ b/src/Runner.PluginHost/Runner.PluginHost.csproj +@@ -1,11 +1,11 @@ +  + + +- net6.0 ++ net8.0 + Exe + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true +diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj +index 39245a3..7769ee2 100644 +--- a/src/Runner.Plugins/Runner.Plugins.csproj ++++ b/src/Runner.Plugins/Runner.Plugins.csproj +@@ -1,11 +1,11 @@ +  + + +- net6.0 ++ net8.0 + Library + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + + +diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj +index 202e866..ac82f14 100644 +--- a/src/Runner.Sdk/Runner.Sdk.csproj ++++ b/src/Runner.Sdk/Runner.Sdk.csproj +@@ -1,11 +1,11 @@ +  + + +- net6.0 ++ net8.0 + Library + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + + +@@ -14,9 +14,9 @@ + + + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj +index eee59b8..082fafa 100644 +--- a/src/Runner.Worker/Runner.Worker.csproj ++++ b/src/Runner.Worker/Runner.Worker.csproj +@@ -1,11 +1,11 @@ + + + +- net6.0 ++ net8.0 + Exe + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true +@@ -18,9 +18,9 @@ + + + +- +- +- ++ ++ ++ + + + +diff --git a/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs b/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs +index 34c97b7..7236765 100644 +--- a/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs ++++ b/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs +@@ -34,6 +34,7 @@ namespace GitHub.Services.Common + + public String PropertyName { get; set; } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Sdk/Common/Common/VssException.cs b/src/Sdk/Common/Common/VssException.cs +index 7cead78..5f8fb8c 100644 +--- a/src/Sdk/Common/Common/VssException.cs ++++ b/src/Sdk/Common/Common/VssException.cs +@@ -127,6 +127,7 @@ namespace GitHub.Services.Common + EventId = (int)info.GetValue("m_eventId", typeof(int)); + } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Sdk/DTWebApi/WebApi/Exceptions.cs b/src/Sdk/DTWebApi/WebApi/Exceptions.cs +index 536bf75..ee47f13 100644 +--- a/src/Sdk/DTWebApi/WebApi/Exceptions.cs ++++ b/src/Sdk/DTWebApi/WebApi/Exceptions.cs +@@ -1539,6 +1539,26 @@ namespace GitHub.DistributedTask.WebApi + } + } + ++ [Serializable] ++ [ExceptionMapping("0.0", "3.0", "TaskOrchestrationJobUnprocessableException", "GitHub.DistributedTask.WebApi.TaskOrchestrationJobUnprocessableException, GitHub.DistributedTask.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] ++ public sealed class TaskOrchestrationJobUnprocessableException : DistributedTaskException ++ { ++ public TaskOrchestrationJobUnprocessableException(String message) ++ : base(message) ++ { ++ } ++ ++ public TaskOrchestrationJobUnprocessableException(String message, Exception innerException) ++ : base(message, innerException) ++ { ++ } ++ ++ private TaskOrchestrationJobUnprocessableException(SerializationInfo info, StreamingContext context) ++ : base(info, context) ++ { ++ } ++ } ++ + [Serializable] + [ExceptionMapping("0.0", "3.0", "TaskOrchestrationPlanSecurityException", "GitHub.DistributedTask.WebApi.TaskOrchestrationPlanSecurityException, GitHub.DistributedTask.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + public sealed class TaskOrchestrationPlanSecurityException : DistributedTaskException +diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj +index ff1cb85..577602c 100644 +--- a/src/Sdk/Sdk.csproj ++++ b/src/Sdk/Sdk.csproj +@@ -1,11 +1,11 @@ + + + +- net6.0 ++ net8.0 + Library + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + TRACE + 8.0 +@@ -14,13 +14,13 @@ + + + +- ++ + +- +- +- +- +- ++ ++ ++ ++ ++ + + + +diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs +index 5ebf86f..34ec103 100644 +--- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs ++++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs +@@ -85,6 +85,7 @@ namespace GitHub.Services.OAuth + set; + } + ++ [Obsolete] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); +diff --git a/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs b/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs +index de7c3bc..23c5147 100644 +--- a/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs ++++ b/src/Sdk/WebApi/WebApi/RawHttpClientBase.cs +@@ -101,15 +101,55 @@ namespace Sdk.WebApi.WebApi + } + } + ++ protected async Task Send2Async( ++ HttpMethod method, ++ Uri requestUri, ++ HttpContent content = null, ++ IEnumerable> queryParameters = null, ++ Object userState = null, ++ CancellationToken cancellationToken = default(CancellationToken)) ++ { ++ using (var response = await SendAsync(method, requestUri, content, queryParameters, userState, cancellationToken).ConfigureAwait(false)) ++ { ++ if (response.IsSuccessStatusCode) ++ { ++ return new RawHttpClientResult( ++ isSuccess: true, ++ error: string.Empty, ++ statusCode: response.StatusCode); ++ } ++ else ++ { ++ var errorBody = default(string); ++ try ++ { ++ errorBody = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ++ } ++ catch (Exception ex) ++ { ++ errorBody = $"Error reading HTTP response body: {ex.Message}"; ++ } ++ ++ string errorMessage = $"Error: {response.ReasonPhrase}"; ++ return new RawHttpClientResult( ++ isSuccess: false, ++ error: errorMessage, ++ statusCode: response.StatusCode, ++ errorBody: errorBody); ++ } ++ } ++ } ++ + protected Task> SendAsync( + HttpMethod method, + Uri requestUri, + HttpContent content = null, + IEnumerable> queryParameters = null, ++ Boolean readErrorBody = false, + Object userState = null, + CancellationToken cancellationToken = default(CancellationToken)) + { +- return SendAsync(method, null, requestUri, content, queryParameters, userState, cancellationToken); ++ return SendAsync(method, null, requestUri, content, queryParameters, readErrorBody, userState, cancellationToken); + } + + protected async Task> SendAsync( +@@ -118,18 +158,20 @@ namespace Sdk.WebApi.WebApi + Uri requestUri, + HttpContent content = null, + IEnumerable> queryParameters = null, ++ Boolean readErrorBody = false, + Object userState = null, + CancellationToken cancellationToken = default(CancellationToken)) + { + using (VssTraceActivity.GetOrCreate().EnterCorrelationScope()) + using (HttpRequestMessage requestMessage = CreateRequestMessage(method, additionalHeaders, requestUri, content, queryParameters)) + { +- return await SendAsync(requestMessage, userState, cancellationToken).ConfigureAwait(false); ++ return await SendAsync(requestMessage, readErrorBody, userState, cancellationToken).ConfigureAwait(false); + } + } + + protected async Task> SendAsync( + HttpRequestMessage message, ++ Boolean readErrorBody = false, + Object userState = null, + CancellationToken cancellationToken = default(CancellationToken)) + { +@@ -145,8 +187,21 @@ namespace Sdk.WebApi.WebApi + } + else + { ++ var errorBody = default(string); ++ if (readErrorBody) ++ { ++ try ++ { ++ errorBody = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ++ } ++ catch (Exception ex) ++ { ++ errorBody = $"Error reading HTTP response body: {ex.Message}"; ++ } ++ } ++ + string errorMessage = $"Error: {response.ReasonPhrase}"; +- return RawHttpClientResult.Fail(errorMessage, response.StatusCode); ++ return RawHttpClientResult.Fail(errorMessage, response.StatusCode, errorBody); + } + } + } +diff --git a/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs b/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs +index 1b2dc5f..113de87 100644 +--- a/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs ++++ b/src/Sdk/WebApi/WebApi/RawHttpClientResult.cs +@@ -5,15 +5,27 @@ namespace Sdk.WebApi.WebApi + public class RawHttpClientResult + { + public bool IsSuccess { get; protected set; } ++ ++ /// ++ /// A description of the HTTP status code, like "Error: Unprocessable Entity" ++ /// + public string Error { get; protected set; } ++ ++ /// ++ /// The HTTP response body for unsuccessful HTTP status codes, or an error message when reading the response body fails. ++ /// ++ public string ErrorBody { get; protected set; } ++ + public HttpStatusCode StatusCode { get; protected set; } ++ + public bool IsFailure => !IsSuccess; + +- protected RawHttpClientResult(bool isSuccess, string error, HttpStatusCode statusCode) ++ public RawHttpClientResult(bool isSuccess, string error, HttpStatusCode statusCode, string errorBody = null) + { + IsSuccess = isSuccess; + Error = error; + StatusCode = statusCode; ++ ErrorBody = errorBody; + } + } + +@@ -21,13 +33,13 @@ namespace Sdk.WebApi.WebApi + { + public T Value { get; private set; } + +- protected internal RawHttpClientResult(T value, bool isSuccess, string error, HttpStatusCode statusCode) +- : base(isSuccess, error, statusCode) ++ protected internal RawHttpClientResult(T value, bool isSuccess, string error, HttpStatusCode statusCode, string errorBody) ++ : base(isSuccess, error, statusCode, errorBody) + { + Value = value; + } + +- public static RawHttpClientResult Fail(string message, HttpStatusCode statusCode) => new RawHttpClientResult(default(T), false, message, statusCode); +- public static RawHttpClientResult Ok(T value) => new RawHttpClientResult(value, true, string.Empty, HttpStatusCode.OK); ++ public static RawHttpClientResult Fail(string message, HttpStatusCode statusCode, string errorBody) => new RawHttpClientResult(default(T), false, message, statusCode, errorBody); ++ public static RawHttpClientResult Ok(T value) => new RawHttpClientResult(value, true, string.Empty, HttpStatusCode.OK, null); + } + } +diff --git a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs +index e4aa84a..8dc275c 100644 +--- a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs ++++ b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs +@@ -24,6 +24,7 @@ namespace GitHub.Services.WebApi + HttpStatusCode = (HttpStatusCode)info.GetInt32("HttpStatusCode"); + } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs +index f3c1b8f..2a448ad 100644 +--- a/src/Test/L0/ConstantGenerationL0.cs ++++ b/src/Test/L0/ConstantGenerationL0.cs +@@ -20,6 +20,7 @@ namespace GitHub.Runner.Common.Tests + "linux-x64", + "linux-arm", + "linux-arm64", ++ "linux-ppc64le", + "osx-x64", + "osx-arm64" + }; +diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs +index 26ba65e..b4a0f3f 100644 +--- a/src/Test/L0/Listener/SelfUpdaterL0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterL0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +@@ -16,6 +16,7 @@ using Xunit; + + namespace GitHub.Runner.Common.Tests.Listener + { ++ #if !S390X // Self-update is not currently supported on PPC64LE + public sealed class SelfUpdaterL0 + { + private Mock _runnerServer; +@@ -291,5 +292,6 @@ namespace GitHub.Runner.Common.Tests.Listener + } + } + } ++ #endif + } + #endif +diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +index 5115a6b..6ebc7a9 100644 +--- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs +index f6b5889..42237fc 100644 +--- a/src/Test/L0/Worker/StepHostL0.cs ++++ b/src/Test/L0/Worker/StepHostL0.cs +@@ -31,7 +31,7 @@ namespace GitHub.Runner.Common.Tests.Worker + return hc; + } + +-#if OS_LINUX ++#if OS_LINUX && !PPC64LE + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Worker")] +diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj +index 1beddbf..e7dabf5 100644 +--- a/src/Test/Test.csproj ++++ b/src/Test/Test.csproj +@@ -1,9 +1,9 @@ + + +- net6.0 +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ net8.0 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true +- NU1701;NU1603;NU1603;xUnit2013; ++ NU1701;NU1603;NU1603;xUnit2013;SYSLIB0050;SYSLIB0051 + + + +@@ -15,13 +15,13 @@ + + + +- ++ + +- ++ + +- ++ + +- ++ + + + +diff --git a/src/dev.sh b/src/dev.sh +index 0fc5876..5898593 100755 +--- a/src/dev.sh ++++ b/src/dev.sh +@@ -17,7 +17,7 @@ LAYOUT_DIR="$SCRIPT_DIR/../_layout" + DOWNLOAD_DIR="$SCRIPT_DIR/../_downloads/netcore2x" + PACKAGE_DIR="$SCRIPT_DIR/../_package" + DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" +-DOTNETSDK_VERSION="6.0.421" ++DOTNETSDK_VERSION="8.0.105" + DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" + RUNNER_VERSION=$(cat runnerversion) + +@@ -54,6 +54,7 @@ elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then + case $CPU_NAME in + armv7l) RUNTIME_ID="linux-arm";; + aarch64) RUNTIME_ID="linux-arm64";; ++ ppc64le) RUNTIME_ID="linux-ppc64le";; + esac + fi + elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then +@@ -80,7 +81,7 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then + exit 1 + fi + 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" != 'linux-ppc64le') ]]; then + echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2 + exit 1 + fi +@@ -199,7 +200,7 @@ function package () + popd > /dev/null + } + +-if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet") ]]; then ++if [[ "${RUNTIME_ID}" != "linux-ppc64le" && ((! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet")) ]]; then + + # Download dotnet SDK to ../_dotnetsdk directory + heading "Ensure Dotnet SDK" +@@ -224,8 +225,10 @@ if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTN + echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" + fi + +-echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" +-export PATH=${DOTNETSDK_INSTALLDIR}:$PATH ++if [[ -d "${DOTNETSDK_INSTALLDIR}" ]]; then ++ echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" ++ export PATH=${DOTNETSDK_INSTALLDIR}:$PATH ++fi + + heading "Dotnet SDK Version" + dotnet --version +diff --git a/src/dir.proj b/src/dir.proj +index 056a312..3a9bd6f 100644 +--- a/src/dir.proj ++++ b/src/dir.proj +@@ -41,13 +41,23 @@ + + + +- +- ++ ++ ++ RuntimeIdentifier=$(PackageRuntime) ++ ++ SelfContained=false;CopyLocalRuntimeTargetAssets=false ++ ++ ++ ++ + + + + +- ++ + + + +diff --git a/src/global.json b/src/global.json +index e7028fe..f09cb3e 100644 +--- a/src/global.json ++++ b/src/global.json +@@ -1,5 +1,5 @@ + { + "sdk": { +- "version": "6.0.421" ++ "version": "8.0.105" + } + } diff --git a/build-files/patches/runner-v2.318.0-sdk8-ppc64le.patch b/build-files/patches/runner-v2.318.0-sdk8-ppc64le.patch new file mode 100644 index 0000000..3030add --- /dev/null +++ b/build-files/patches/runner-v2.318.0-sdk8-ppc64le.patch @@ -0,0 +1,388 @@ +diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json +index b4745fe..ccc59c4 100644 +--- a/.devcontainer/devcontainer.json ++++ b/.devcontainer/devcontainer.json +@@ -4,7 +4,7 @@ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:1": {}, + "ghcr.io/devcontainers/features/dotnet": { +- "version": "8.0.303" ++ "version": "8.0.105" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "16" +diff --git a/src/Directory.Build.props b/src/Directory.Build.props +index 9db5fac..b22a2b0 100644 +--- a/src/Directory.Build.props ++++ b/src/Directory.Build.props +@@ -44,6 +44,9 @@ + + $(DefineConstants);ARM64 + ++ ++ $(DefineConstants);PPC64LE ++ + + + +diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh +index e057ecb..ce54597 100755 +--- a/src/Misc/externals.sh ++++ b/src/Misc/externals.sh +@@ -190,3 +190,8 @@ if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then + acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-armv7l.tar.gz" node16 fix_nested_dir + acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-armv7l.tar.gz" node20 fix_nested_dir + fi ++ ++if [[ "$PACKAGERUNTIME" == "linux-ppc64le" ]]; then ++ acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-ppc64le.tar.gz" node16 fix_nested_dir ++ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-ppc64le.tar.gz" node20 fix_nested_dir ++fi +\ No newline at end of file +diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh +index 14cc6ba..704a6be 100755 +--- a/src/Misc/layoutroot/config.sh ++++ b/src/Misc/layoutroot/config.sh +@@ -18,27 +18,29 @@ then + exit 1 + fi + +- message="Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies." +- +- ldd ./bin/libcoreclr.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ARCH=`uname -m` ++ if [ "${ARCH}" != "s390x" -a "${ARCH}" != "ppc64le" ] ++ then ++ ldd ./bin/libcoreclr.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 ++ ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + fi + + if ! [ -x "$(command -v ldconfig)" ]; then +diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs +index d68d5cd..05a1438 100644 +--- a/src/Runner.Common/Constants.cs ++++ b/src/Runner.Common/Constants.cs +@@ -58,7 +58,8 @@ namespace GitHub.Runner.Common + X86, + X64, + Arm, +- Arm64 ++ Arm64, ++ Ppc64le + } + + public static class Runner +@@ -81,6 +82,8 @@ namespace GitHub.Runner.Common + public static readonly Architecture PlatformArchitecture = Architecture.Arm; + #elif ARM64 + public static readonly Architecture PlatformArchitecture = Architecture.Arm64; ++#elif PPC64LE ++ public static readonly Architecture PlatformArchitecture = Architecture.Ppc64le; + #else + public static readonly Architecture PlatformArchitecture = Architecture.X64; + #endif +diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj +index 6c46356..72d3643 100644 +--- a/src/Runner.Common/Runner.Common.csproj ++++ b/src/Runner.Common/Runner.Common.csproj +@@ -3,7 +3,7 @@ + + net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) +diff --git a/src/Runner.Common/Util/VarUtil.cs b/src/Runner.Common/Util/VarUtil.cs +index 97273a1..c577871 100644 +--- a/src/Runner.Common/Util/VarUtil.cs ++++ b/src/Runner.Common/Util/VarUtil.cs +@@ -53,6 +53,8 @@ namespace GitHub.Runner.Common.Util + return "ARM"; + case Constants.Architecture.Arm64: + return "ARM64"; ++ case Constants.Architecture.Ppc64le: ++ return "PPC64LE"; + default: + throw new NotSupportedException(); // Should never reach here. + } +diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj +index afd5281..7cbe9ac 100644 +--- a/src/Runner.Listener/Runner.Listener.csproj ++++ b/src/Runner.Listener/Runner.Listener.csproj +@@ -3,7 +3,7 @@ + + net8.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 +diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj +index 81a8d2e..7c3d3c6 100644 +--- a/src/Runner.PluginHost/Runner.PluginHost.csproj ++++ b/src/Runner.PluginHost/Runner.PluginHost.csproj +@@ -3,7 +3,7 @@ + + net8.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 +diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj +index a786cf1..d365000 100644 +--- a/src/Runner.Plugins/Runner.Plugins.csproj ++++ b/src/Runner.Plugins/Runner.Plugins.csproj +@@ -3,7 +3,7 @@ + + net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 +diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj +index 55dbf12..510b08e 100644 +--- a/src/Runner.Sdk/Runner.Sdk.csproj ++++ b/src/Runner.Sdk/Runner.Sdk.csproj +@@ -3,7 +3,7 @@ + + net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 +diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj +index 53c1610..dca73a3 100644 +--- a/src/Runner.Worker/Runner.Worker.csproj ++++ b/src/Runner.Worker/Runner.Worker.csproj +@@ -3,7 +3,7 @@ + + net8.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 +diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj +index 7ba7394..dc43855 100644 +--- a/src/Sdk/Sdk.csproj ++++ b/src/Sdk/Sdk.csproj +@@ -3,7 +3,7 @@ + + net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + + true + NU1701;NU1603;SYSLIB0050;SYSLIB0051 +diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs +index f3c1b8f..2a448ad 100644 +--- a/src/Test/L0/ConstantGenerationL0.cs ++++ b/src/Test/L0/ConstantGenerationL0.cs +@@ -20,6 +20,7 @@ namespace GitHub.Runner.Common.Tests + "linux-x64", + "linux-arm", + "linux-arm64", ++ "linux-ppc64le", + "osx-x64", + "osx-arm64" + }; +diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs +index 26ba65e..b4a0f3f 100644 +--- a/src/Test/L0/Listener/SelfUpdaterL0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterL0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +@@ -16,6 +16,7 @@ using Xunit; + + namespace GitHub.Runner.Common.Tests.Listener + { ++ #if !S390X // Self-update is not currently supported on PPC64LE + public sealed class SelfUpdaterL0 + { + private Mock _runnerServer; +@@ -291,5 +292,6 @@ namespace GitHub.Runner.Common.Tests.Listener + } + } + } ++ #endif + } + #endif +diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +index 5115a6b..6ebc7a9 100644 +--- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs +index f6b5889..42237fc 100644 +--- a/src/Test/L0/Worker/StepHostL0.cs ++++ b/src/Test/L0/Worker/StepHostL0.cs +@@ -31,7 +31,7 @@ namespace GitHub.Runner.Common.Tests.Worker + return hc; + } + +-#if OS_LINUX ++#if OS_LINUX && !PPC64LE + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Worker")] +diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj +index aebe242..e7dabf5 100644 +--- a/src/Test/Test.csproj ++++ b/src/Test/Test.csproj +@@ -1,7 +1,7 @@ + + + net8.0 +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true + NU1701;NU1603;NU1603;xUnit2013;SYSLIB0050;SYSLIB0051 + +diff --git a/src/dev.sh b/src/dev.sh +index 8120ef3..5898593 100755 +--- a/src/dev.sh ++++ b/src/dev.sh +@@ -17,7 +17,7 @@ LAYOUT_DIR="$SCRIPT_DIR/../_layout" + DOWNLOAD_DIR="$SCRIPT_DIR/../_downloads/netcore2x" + PACKAGE_DIR="$SCRIPT_DIR/../_package" + DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" +-DOTNETSDK_VERSION="8.0.303" ++DOTNETSDK_VERSION="8.0.105" + DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" + RUNNER_VERSION=$(cat runnerversion) + +@@ -54,6 +54,7 @@ elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then + case $CPU_NAME in + armv7l) RUNTIME_ID="linux-arm";; + aarch64) RUNTIME_ID="linux-arm64";; ++ ppc64le) RUNTIME_ID="linux-ppc64le";; + esac + fi + elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then +@@ -80,7 +81,7 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then + exit 1 + fi + 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" != 'linux-ppc64le') ]]; then + echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2 + exit 1 + fi +@@ -199,7 +200,7 @@ function package () + popd > /dev/null + } + +-if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet") ]]; then ++if [[ "${RUNTIME_ID}" != "linux-ppc64le" && ((! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet")) ]]; then + + # Download dotnet SDK to ../_dotnetsdk directory + heading "Ensure Dotnet SDK" +@@ -224,8 +225,10 @@ if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTN + echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" + fi + +-echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" +-export PATH=${DOTNETSDK_INSTALLDIR}:$PATH ++if [[ -d "${DOTNETSDK_INSTALLDIR}" ]]; then ++ echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" ++ export PATH=${DOTNETSDK_INSTALLDIR}:$PATH ++fi + + heading "Dotnet SDK Version" + dotnet --version +diff --git a/src/dir.proj b/src/dir.proj +index 056a312..3a9bd6f 100644 +--- a/src/dir.proj ++++ b/src/dir.proj +@@ -41,13 +41,23 @@ + + + +- +- ++ ++ ++ RuntimeIdentifier=$(PackageRuntime) ++ ++ SelfContained=false;CopyLocalRuntimeTargetAssets=false ++ ++ ++ ++ + + + + +- ++ + + + +diff --git a/src/global.json b/src/global.json +index fd07d88..f09cb3e 100644 +--- a/src/global.json ++++ b/src/global.json +@@ -1,5 +1,5 @@ + { + "sdk": { +- "version": "8.0.303" ++ "version": "8.0.105" + } + } diff --git a/build-files/patches/runner-v2.319.0-sdk8-ppc64le.patch b/build-files/patches/runner-v2.319.0-sdk8-ppc64le.patch new file mode 100644 index 0000000..49b1729 --- /dev/null +++ b/build-files/patches/runner-v2.319.0-sdk8-ppc64le.patch @@ -0,0 +1,676 @@ +diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json +index 032387b..ccc59c4 100644 +--- a/.devcontainer/devcontainer.json ++++ b/.devcontainer/devcontainer.json +@@ -4,7 +4,7 @@ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:1": {}, + "ghcr.io/devcontainers/features/dotnet": { +- "version": "6.0.421" ++ "version": "8.0.105" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "16" +diff --git a/.gitignore b/.gitignore +index 34d18c4..411fe40 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -26,4 +26,5 @@ _dotnetsdk + TestResults + TestLogs + .DS_Store ++.mono + **/*.DotSettings.user +\ No newline at end of file +diff --git a/src/Directory.Build.props b/src/Directory.Build.props +index 9db5fac..b22a2b0 100644 +--- a/src/Directory.Build.props ++++ b/src/Directory.Build.props +@@ -44,6 +44,9 @@ + + $(DefineConstants);ARM64 + ++ ++ $(DefineConstants);PPC64LE ++ + + + +diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh +index e057ecb..c467bc3 100755 +--- a/src/Misc/externals.sh ++++ b/src/Misc/externals.sh +@@ -190,3 +190,8 @@ if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then + acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-armv7l.tar.gz" node16 fix_nested_dir + acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-armv7l.tar.gz" node20 fix_nested_dir + fi ++ ++if [[ "$PACKAGERUNTIME" == "linux-ppc64le" ]]; then ++ acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-ppc64le.tar.gz" node16 fix_nested_dir ++ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-ppc64le.tar.gz" node20 fix_nested_dir ++fi +diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh +index 14cc6ba..9b5b8e6 100755 +--- a/src/Misc/layoutroot/config.sh ++++ b/src/Misc/layoutroot/config.sh +@@ -20,25 +20,29 @@ then + + message="Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies." + +- ldd ./bin/libcoreclr.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ARCH=`uname -m` ++ if [ "${ARCH}" != "s390x" -a "${ARCH}" != "ppc64le" ] ++ then ++ ldd ./bin/libcoreclr.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 ++ ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + fi + + if ! [ -x "$(command -v ldconfig)" ]; then +diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs +index 849228b..1e1bc28 100644 +--- a/src/Runner.Common/Constants.cs ++++ b/src/Runner.Common/Constants.cs +@@ -58,7 +58,8 @@ namespace GitHub.Runner.Common + X86, + X64, + Arm, +- Arm64 ++ Arm64, ++ Ppc64le + } + + public static class Runner +@@ -81,6 +82,8 @@ namespace GitHub.Runner.Common + public static readonly Architecture PlatformArchitecture = Architecture.Arm; + #elif ARM64 + public static readonly Architecture PlatformArchitecture = Architecture.Arm64; ++#elif PPC64LE ++ public static readonly Architecture PlatformArchitecture = Architecture.Ppc64le; + #else + public static readonly Architecture PlatformArchitecture = Architecture.X64; + #endif +diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj +index 329a024..72d3643 100644 +--- a/src/Runner.Common/Runner.Common.csproj ++++ b/src/Runner.Common/Runner.Common.csproj +@@ -1,11 +1,11 @@ + + + +- net6.0 ++ net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + + +@@ -15,11 +15,11 @@ + + + +- ++ + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.Common/Util/VarUtil.cs b/src/Runner.Common/Util/VarUtil.cs +index 97273a1..c577871 100644 +--- a/src/Runner.Common/Util/VarUtil.cs ++++ b/src/Runner.Common/Util/VarUtil.cs +@@ -53,6 +53,8 @@ namespace GitHub.Runner.Common.Util + return "ARM"; + case Constants.Architecture.Arm64: + return "ARM64"; ++ case Constants.Architecture.Ppc64le: ++ return "PPC64LE"; + default: + throw new NotSupportedException(); // Should never reach here. + } +diff --git a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs +index 15291be..a404a67 100644 +--- a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs ++++ b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs +@@ -1,4 +1,5 @@ + #if OS_WINDOWS ++#pragma warning disable CA1416 + using System.IO; + using System.Security.Cryptography; + using System.Text; +@@ -84,4 +85,5 @@ namespace GitHub.Runner.Listener.Configuration + } + } + } ++#pragma warning restore CA1416 + #endif +diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj +index 3cd72ec..7cbe9ac 100644 +--- a/src/Runner.Listener/Runner.Listener.csproj ++++ b/src/Runner.Listener/Runner.Listener.csproj +@@ -1,11 +1,12 @@ + + + +- net6.0 ++ net8.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le ++ true + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true +@@ -18,11 +19,11 @@ + + + +- ++ + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj +index df30f34..7c3d3c6 100644 +--- a/src/Runner.PluginHost/Runner.PluginHost.csproj ++++ b/src/Runner.PluginHost/Runner.PluginHost.csproj +@@ -1,11 +1,12 @@ +  + + +- net6.0 ++ net8.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le ++ true + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true +diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj +index 39245a3..d365000 100644 +--- a/src/Runner.Plugins/Runner.Plugins.csproj ++++ b/src/Runner.Plugins/Runner.Plugins.csproj +@@ -1,11 +1,12 @@ +  + + +- net6.0 ++ net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le ++ true + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + + +diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj +index 202e866..510b08e 100644 +--- a/src/Runner.Sdk/Runner.Sdk.csproj ++++ b/src/Runner.Sdk/Runner.Sdk.csproj +@@ -1,11 +1,12 @@ +  + + +- net6.0 ++ net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le ++ true + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + + +@@ -14,9 +15,9 @@ + + + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj +index eee59b8..dca73a3 100644 +--- a/src/Runner.Worker/Runner.Worker.csproj ++++ b/src/Runner.Worker/Runner.Worker.csproj +@@ -1,11 +1,12 @@ + + + +- net6.0 ++ net8.0 + Exe +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le ++ true + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true +@@ -18,9 +19,9 @@ + + + +- +- +- ++ ++ ++ + + + +diff --git a/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs b/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs +index 34c97b7..7236765 100644 +--- a/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs ++++ b/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs +@@ -34,6 +34,7 @@ namespace GitHub.Services.Common + + public String PropertyName { get; set; } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Sdk/Common/Common/VssException.cs b/src/Sdk/Common/Common/VssException.cs +index 7cead78..5f8fb8c 100644 +--- a/src/Sdk/Common/Common/VssException.cs ++++ b/src/Sdk/Common/Common/VssException.cs +@@ -127,6 +127,7 @@ namespace GitHub.Services.Common + EventId = (int)info.GetValue("m_eventId", typeof(int)); + } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj +index ff1cb85..f37f272 100644 +--- a/src/Sdk/Sdk.csproj ++++ b/src/Sdk/Sdk.csproj +@@ -1,11 +1,12 @@ + + + +- net6.0 ++ net8.0 + Library +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le ++ + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + TRACE + 8.0 +@@ -14,13 +15,13 @@ + + + +- ++ + +- +- +- +- +- ++ ++ ++ ++ ++ + + + +diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs +index 5ebf86f..34ec103 100644 +--- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs ++++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs +@@ -85,6 +85,7 @@ namespace GitHub.Services.OAuth + set; + } + ++ [Obsolete] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); +diff --git a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs +index e4aa84a..8dc275c 100644 +--- a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs ++++ b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs +@@ -24,6 +24,7 @@ namespace GitHub.Services.WebApi + HttpStatusCode = (HttpStatusCode)info.GetInt32("HttpStatusCode"); + } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs +index f3c1b8f..2a448ad 100644 +--- a/src/Test/L0/ConstantGenerationL0.cs ++++ b/src/Test/L0/ConstantGenerationL0.cs +@@ -20,6 +20,7 @@ namespace GitHub.Runner.Common.Tests + "linux-x64", + "linux-arm", + "linux-arm64", ++ "linux-ppc64le", + "osx-x64", + "osx-arm64" + }; +diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs +index 26ba65e..b4a0f3f 100644 +--- a/src/Test/L0/Listener/SelfUpdaterL0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterL0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +@@ -16,6 +16,7 @@ using Xunit; + + namespace GitHub.Runner.Common.Tests.Listener + { ++ #if !S390X // Self-update is not currently supported on PPC64LE + public sealed class SelfUpdaterL0 + { + private Mock _runnerServer; +@@ -291,5 +292,6 @@ namespace GitHub.Runner.Common.Tests.Listener + } + } + } ++ #endif + } + #endif +diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +index 5115a6b..6ebc7a9 100644 +--- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE + using System; + using System.Collections.Generic; + using System.IO; +diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs +index f6b5889..42237fc 100644 +--- a/src/Test/L0/Worker/StepHostL0.cs ++++ b/src/Test/L0/Worker/StepHostL0.cs +@@ -31,7 +31,7 @@ namespace GitHub.Runner.Common.Tests.Worker + return hc; + } + +-#if OS_LINUX ++#if OS_LINUX && !PPC64LE + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Worker")] +diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj +index 1beddbf..e7dabf5 100644 +--- a/src/Test/Test.csproj ++++ b/src/Test/Test.csproj +@@ -1,9 +1,9 @@ + + +- net6.0 +- win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 ++ net8.0 ++ win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64;linux-ppc64le + true +- NU1701;NU1603;NU1603;xUnit2013; ++ NU1701;NU1603;NU1603;xUnit2013;SYSLIB0050;SYSLIB0051 + + + +@@ -15,13 +15,13 @@ + + + +- ++ + +- ++ + +- ++ + +- ++ + + + +diff --git a/src/dev.sh b/src/dev.sh +index 71c8063..fb95355 100755 +--- a/src/dev.sh ++++ b/src/dev.sh +@@ -17,10 +17,8 @@ LAYOUT_DIR="$SCRIPT_DIR/../_layout" + DOWNLOAD_DIR="$SCRIPT_DIR/../_downloads/netcore2x" + PACKAGE_DIR="$SCRIPT_DIR/../_package" + DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" +-DOTNETSDK_VERSION="6.0.421" ++DOTNETSDK_VERSION="8.0.105" + DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" +-DOTNET8SDK_VERSION="8.0.303" +-DOTNET8SDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNET8SDK_VERSION" + RUNNER_VERSION=$(cat runnerversion) + + pushd "$SCRIPT_DIR" +@@ -56,6 +54,7 @@ elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then + case $CPU_NAME in + armv7l) RUNTIME_ID="linux-arm";; + aarch64) RUNTIME_ID="linux-arm64";; ++ ppc64le) RUNTIME_ID="linux-ppc64le";; + esac + fi + elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then +@@ -82,7 +81,7 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then + exit 1 + fi + 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" != 'linux-ppc64le') ]]; then + echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2 + exit 1 + fi +@@ -127,19 +126,6 @@ function build () + { + heading "Building ..." + dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build +- +- # Build TestDotNet8Compatibility +- heading "Building .NET 8 compatibility test" +- echo "Prepend ${DOTNET8SDK_INSTALLDIR} to %PATH%" # Prepend .NET 8 SDK to PATH +- PATH_BAK=$PATH +- export PATH=${DOTNET8SDK_INSTALLDIR}:$PATH +- pushd "$SCRIPT_DIR/TestDotNet8Compatibility" > /dev/null # Working directory +- pwd +- echo "Dotnet 8 SDK Version" +- dotnet --version +- dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build +- popd > /dev/null # Restore working directory +- export PATH=$PATH_BAK # Restore PATH + } + + function layout () +@@ -159,17 +145,6 @@ function layout () + heading "Setup externals folder for $RUNTIME_ID runner's layout" + bash ./Misc/externals.sh $RUNTIME_ID || checkRC externals.sh + +- # Build TestDotNet8Compatibility +- echo "Prepend ${DOTNET8SDK_INSTALLDIR} to %PATH%" # Prepend .NET 8 SDK to PATH +- PATH_BAK=$PATH +- export PATH=${DOTNET8SDK_INSTALLDIR}:$PATH +- pushd "$SCRIPT_DIR/TestDotNet8Compatibility" > /dev/null # Working directory +- heading "Dotnet 8 SDK Version" +- dotnet --version +- heading "Building .NET 8 compatibility test" +- dotnet msbuild -t:layout -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build +- popd > /dev/null # Restore working directory +- export PATH=$PATH_BAK # Restore PATH + } + + function runtest () +@@ -226,8 +201,7 @@ function package () + popd > /dev/null + } + +-# Install .NET SDK +-if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet") ]]; then ++if [[ "${RUNTIME_ID}" != "linux-ppc64le" && ((! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet")) ]]; then + + # Download dotnet SDK to ../_dotnetsdk directory + heading "Ensure Dotnet SDK" +@@ -252,35 +226,11 @@ if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTN + echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" + fi + +-# Install .NET 8 SDK +-if [[ (! -d "${DOTNET8SDK_INSTALLDIR}") || (! -e "${DOTNET8SDK_INSTALLDIR}/.${DOTNET8SDK_VERSION}") || (! -e "${DOTNET8SDK_INSTALLDIR}/dotnet") ]]; then +- +- # Download dotnet 8 SDK to ../_dotnetsdk directory +- heading "Ensure Dotnet 8 SDK" +- +- # _dotnetsdk +- # \1.0.x +- # \dotnet +- # \.1.0.x +- echo "Download dotnet8sdk into ${DOTNET8SDK_INSTALLDIR}" +- rm -Rf "${DOTNETSDK_DIR}" +- +- # run dotnet-install.ps1 on windows, dotnet-install.sh on linux +- if [[ ("$CURRENT_PLATFORM" == "windows") ]]; then +- echo "Convert ${DOTNET8SDK_INSTALLDIR} to Windows style path" +- sdkinstallwindow_path=${DOTNET8SDK_INSTALLDIR:1} +- sdkinstallwindow_path=${sdkinstallwindow_path:0:1}:${sdkinstallwindow_path:1} +- $POWERSHELL -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& \"./Misc/dotnet-install.ps1\" -Version ${DOTNET8SDK_VERSION} -InstallDir \"${sdkinstallwindow_path}\" -NoPath; exit \$LastExitCode;" || checkRC dotnet-install.ps1 +- else +- bash ./Misc/dotnet-install.sh --version ${DOTNET8SDK_VERSION} --install-dir "${DOTNET8SDK_INSTALLDIR}" --no-path || checkRC dotnet-install.sh +- fi +- +- echo "${DOTNET8SDK_VERSION}" > "${DOTNET8SDK_INSTALLDIR}/.${DOTNET8SDK_VERSION}" ++if [[ -d "${DOTNETSDK_INSTALLDIR}" ]]; then ++ echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" ++ export PATH=${DOTNETSDK_INSTALLDIR}:$PATH + fi + +-echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" +-export PATH=${DOTNETSDK_INSTALLDIR}:$PATH +- + heading "Dotnet SDK Version" + dotnet --version + +diff --git a/src/dir.proj b/src/dir.proj +index 056a312..3a9bd6f 100644 +--- a/src/dir.proj ++++ b/src/dir.proj +@@ -41,13 +41,23 @@ + + + +- +- ++ ++ ++ RuntimeIdentifier=$(PackageRuntime) ++ ++ SelfContained=false;CopyLocalRuntimeTargetAssets=false ++ ++ ++ ++ + + + + +- ++ + + + +diff --git a/src/global.json b/src/global.json +index e7028fe..f09cb3e 100644 +--- a/src/global.json ++++ b/src/global.json +@@ -1,5 +1,5 @@ + { + "sdk": { +- "version": "6.0.421" ++ "version": "8.0.105" + } + } diff --git a/build-files/runner-sdk-8.ppc64le.patch b/build-files/patches/runner-v2.320.0-sdk8-ppc64le.patch similarity index 99% rename from build-files/runner-sdk-8.ppc64le.patch rename to build-files/patches/runner-v2.320.0-sdk8-ppc64le.patch index 76b8d95..9f7596e 100644 --- a/build-files/runner-sdk-8.ppc64le.patch +++ b/build-files/patches/runner-v2.320.0-sdk8-ppc64le.patch @@ -700,4 +700,4 @@ index e7028fe..d1779f1 100644 - "version": "6.0.421" + "version": "8.0.110" } - } + } \ No newline at end of file diff --git a/build-files/patches/runner-v2.320.0-sdk8-s390x.patch b/build-files/patches/runner-v2.320.0-sdk8-s390x.patch new file mode 100644 index 0000000..9f7596e --- /dev/null +++ b/build-files/patches/runner-v2.320.0-sdk8-s390x.patch @@ -0,0 +1,703 @@ +diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json +index 032387b..cd86211 100644 +--- a/.devcontainer/devcontainer.json ++++ b/.devcontainer/devcontainer.json +@@ -4,7 +4,7 @@ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:1": {}, + "ghcr.io/devcontainers/features/dotnet": { +- "version": "6.0.421" ++ "version": "8.0.110" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "16" +diff --git a/src/Directory.Build.props b/src/Directory.Build.props +index 9db5fac..706cafc 100644 +--- a/src/Directory.Build.props ++++ b/src/Directory.Build.props +@@ -44,6 +44,12 @@ + + $(DefineConstants);ARM64 + ++ ++ $(DefineConstants);PPC64LE ++ ++ ++ $(DefineConstants);S390X ++ + + + +diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh +index e057ecb..7349615 100755 +--- a/src/Misc/externals.sh ++++ b/src/Misc/externals.sh +@@ -190,3 +190,13 @@ if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then + acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-armv7l.tar.gz" node16 fix_nested_dir + acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-armv7l.tar.gz" node20 fix_nested_dir + fi ++ ++if [[ "$PACKAGERUNTIME" == "linux-ppc64le" ]]; then ++ acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-ppc64le.tar.gz" node16 fix_nested_dir ++ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-ppc64le.tar.gz" node20 fix_nested_dir ++fi ++ ++if [[ "$PACKAGERUNTIME" == "linux-s390x" ]]; then ++ acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-s390x.tar.gz" node16 fix_nested_dir ++ acquireExternalTool "$NODE_URL/v${NODE20_VERSION}/node-v${NODE20_VERSION}-linux-s390x.tar.gz" node20 fix_nested_dir ++fi +\ No newline at end of file +diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh +index 14cc6ba..9b5b8e6 100755 +--- a/src/Misc/layoutroot/config.sh ++++ b/src/Misc/layoutroot/config.sh +@@ -20,25 +20,29 @@ then + + message="Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies." + +- ldd ./bin/libcoreclr.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ARCH=`uname -m` ++ if [ "${ARCH}" != "s390x" -a "${ARCH}" != "ppc64le" ] ++ then ++ ldd ./bin/libcoreclr.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 +- fi ++ ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + +- ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' +- if [ $? -eq 0 ]; then +- echo "Dependencies is missing for Dotnet Core 6.0" +- echo $message +- exit 1 ++ ldd ./bin/libSystem.IO.Compression.Native.so | grep 'not found' ++ if [ $? -eq 0 ]; then ++ echo "Dependencies is missing for Dotnet Core 6.0" ++ echo $message ++ exit 1 ++ fi + fi + + if ! [ -x "$(command -v ldconfig)" ]; then +diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs +index 383ec7a..7047d01 100644 +--- a/src/Runner.Common/Constants.cs ++++ b/src/Runner.Common/Constants.cs +@@ -58,7 +58,9 @@ namespace GitHub.Runner.Common + X86, + X64, + Arm, +- Arm64 ++ Arm64, ++ Ppc64le, ++ S390x + } + + public static class Runner +@@ -81,6 +83,10 @@ namespace GitHub.Runner.Common + public static readonly Architecture PlatformArchitecture = Architecture.Arm; + #elif ARM64 + public static readonly Architecture PlatformArchitecture = Architecture.Arm64; ++#elif PPC64LE ++ public static readonly Architecture PlatformArchitecture = Architecture.Ppc64le; ++#elif S390X ++ public static readonly Architecture PlatformArchitecture = Architecture.S390x; + #else + public static readonly Architecture PlatformArchitecture = Architecture.X64; + #endif +diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj +index 329a024..e2796ff 100644 +--- a/src/Runner.Common/Runner.Common.csproj ++++ b/src/Runner.Common/Runner.Common.csproj +@@ -1,12 +1,15 @@ + + + +- net6.0 ++ net8.0 + Library + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) ++ true ++ false ++ false + + + +@@ -15,11 +18,11 @@ + + + +- ++ + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.Common/Util/VarUtil.cs b/src/Runner.Common/Util/VarUtil.cs +index 97273a1..78f7870 100644 +--- a/src/Runner.Common/Util/VarUtil.cs ++++ b/src/Runner.Common/Util/VarUtil.cs +@@ -53,6 +53,10 @@ namespace GitHub.Runner.Common.Util + return "ARM"; + case Constants.Architecture.Arm64: + return "ARM64"; ++ case Constants.Architecture.Ppc64le: ++ return "PPC64LE"; ++ case Constants.Architecture.S390x: ++ return "S390X"; + default: + throw new NotSupportedException(); // Should never reach here. + } +diff --git a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs +index 15291be..a404a67 100644 +--- a/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs ++++ b/src/Runner.Listener/Configuration/RSAEncryptedFileKeyManager.cs +@@ -1,4 +1,5 @@ + #if OS_WINDOWS ++#pragma warning disable CA1416 + using System.IO; + using System.Security.Cryptography; + using System.Text; +@@ -84,4 +85,5 @@ namespace GitHub.Runner.Listener.Configuration + } + } + } ++#pragma warning restore CA1416 + #endif +diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj +index 3cd72ec..b2bb082 100644 +--- a/src/Runner.Listener/Runner.Listener.csproj ++++ b/src/Runner.Listener/Runner.Listener.csproj +@@ -1,14 +1,17 @@ + + + +- net6.0 ++ net8.0 + Exe + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true ++ true ++ false ++ false + + + +@@ -18,11 +21,11 @@ + + + +- ++ + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj +index df30f34..48fca51 100644 +--- a/src/Runner.PluginHost/Runner.PluginHost.csproj ++++ b/src/Runner.PluginHost/Runner.PluginHost.csproj +@@ -1,14 +1,17 @@ +  + + +- net6.0 ++ net8.0 + Exe + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true ++ true ++ false ++ false + + + +diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj +index 39245a3..bbd3416 100644 +--- a/src/Runner.Plugins/Runner.Plugins.csproj ++++ b/src/Runner.Plugins/Runner.Plugins.csproj +@@ -1,12 +1,15 @@ +  + + +- net6.0 ++ net8.0 + Library + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) ++ true ++ false ++ false + + + +diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj +index 202e866..cc8a211 100644 +--- a/src/Runner.Sdk/Runner.Sdk.csproj ++++ b/src/Runner.Sdk/Runner.Sdk.csproj +@@ -1,12 +1,15 @@ +  + + +- net6.0 ++ net8.0 + Library + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) ++ true ++ false ++ false + + + +@@ -14,9 +17,9 @@ + + + +- +- +- ++ ++ ++ + + + +diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj +index eee59b8..c21eef7 100644 +--- a/src/Runner.Worker/Runner.Worker.csproj ++++ b/src/Runner.Worker/Runner.Worker.csproj +@@ -1,14 +1,17 @@ + + + +- net6.0 ++ net8.0 + Exe + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + false + true ++ true ++ false ++ false + + + +@@ -18,9 +21,9 @@ + + + +- +- +- ++ ++ ++ + + + +diff --git a/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs b/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs +index 34c97b7..7236765 100644 +--- a/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs ++++ b/src/Sdk/Common/Common/Exceptions/PropertyExceptions.cs +@@ -34,6 +34,7 @@ namespace GitHub.Services.Common + + public String PropertyName { get; set; } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Sdk/Common/Common/VssException.cs b/src/Sdk/Common/Common/VssException.cs +index 7cead78..5f8fb8c 100644 +--- a/src/Sdk/Common/Common/VssException.cs ++++ b/src/Sdk/Common/Common/VssException.cs +@@ -127,6 +127,7 @@ namespace GitHub.Services.Common + EventId = (int)info.GetValue("m_eventId", typeof(int)); + } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj +index ff1cb85..6aa3f98 100644 +--- a/src/Sdk/Sdk.csproj ++++ b/src/Sdk/Sdk.csproj +@@ -1,26 +1,29 @@ + + + +- net6.0 ++ net8.0 + Library + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603 ++ NU1701;NU1603;SYSLIB0050;SYSLIB0051 + $(Version) + TRACE + 8.0 + true ++ true ++ false ++ false + + + + +- ++ + +- +- +- +- +- ++ ++ ++ ++ ++ + + + +diff --git a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs +index 5ebf86f..34ec103 100644 +--- a/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs ++++ b/src/Sdk/WebApi/WebApi/OAuth/VssOAuthExceptions.cs +@@ -85,6 +85,7 @@ namespace GitHub.Services.OAuth + set; + } + ++ [Obsolete] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); +diff --git a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs +index e4aa84a..8dc275c 100644 +--- a/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs ++++ b/src/Sdk/WebApi/WebApi/VssServiceResponseException.cs +@@ -24,6 +24,7 @@ namespace GitHub.Services.WebApi + HttpStatusCode = (HttpStatusCode)info.GetInt32("HttpStatusCode"); + } + ++ [Obsolete] + [SecurityCritical] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { +diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs +index f3c1b8f..9a1c5aa 100644 +--- a/src/Test/L0/ConstantGenerationL0.cs ++++ b/src/Test/L0/ConstantGenerationL0.cs +@@ -20,6 +20,8 @@ namespace GitHub.Runner.Common.Tests + "linux-x64", + "linux-arm", + "linux-arm64", ++ "linux-ppc64le", ++ "linux-s390x", + "osx-x64", + "osx-arm64" + }; +diff --git a/src/Test/L0/Listener/SelfUpdaterL0.cs b/src/Test/L0/Listener/SelfUpdaterL0.cs +index 26ba65e..f4ed842 100644 +--- a/src/Test/L0/Listener/SelfUpdaterL0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterL0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE && !S390X + using System; + using System.Collections.Generic; + using System.IO; +@@ -16,6 +16,7 @@ using Xunit; + + namespace GitHub.Runner.Common.Tests.Listener + { ++ #if !S390X // Self-update is not currently supported on PPC64LE + public sealed class SelfUpdaterL0 + { + private Mock _runnerServer; +@@ -291,5 +292,6 @@ namespace GitHub.Runner.Common.Tests.Listener + } + } + } ++ #endif + } + #endif +diff --git a/src/Test/L0/Listener/SelfUpdaterV2L0.cs b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +index 5115a6b..30af481 100644 +--- a/src/Test/L0/Listener/SelfUpdaterV2L0.cs ++++ b/src/Test/L0/Listener/SelfUpdaterV2L0.cs +@@ -1,4 +1,4 @@ +-#if !(OS_WINDOWS && ARM64) ++#if !(OS_WINDOWS && ARM64) && !PPC64LE && !S390X + using System; + using System.Collections.Generic; + using System.IO; +diff --git a/src/Test/L0/Worker/StepHostL0.cs b/src/Test/L0/Worker/StepHostL0.cs +index f6b5889..e78f2b7 100644 +--- a/src/Test/L0/Worker/StepHostL0.cs ++++ b/src/Test/L0/Worker/StepHostL0.cs +@@ -31,7 +31,7 @@ namespace GitHub.Runner.Common.Tests.Worker + return hc; + } + +-#if OS_LINUX ++#if OS_LINUX && !PPC64LE && !S390X + [Fact] + [Trait("Level", "L0")] + [Trait("Category", "Worker")] +diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj +index 1beddbf..efd5787 100644 +--- a/src/Test/Test.csproj ++++ b/src/Test/Test.csproj +@@ -1,9 +1,12 @@ + + +- net6.0 ++ net8.0 + win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 + true +- NU1701;NU1603;NU1603;xUnit2013; ++ NU1701;NU1603;NU1603;xUnit2013;SYSLIB0050;SYSLIB0051 ++ true ++ false ++ false + + + +@@ -15,13 +18,13 @@ + + + +- ++ + +- ++ + +- ++ + +- ++ + + + +diff --git a/src/dev.sh b/src/dev.sh +index 71c8063..aac43b0 100755 +--- a/src/dev.sh ++++ b/src/dev.sh +@@ -17,10 +17,8 @@ LAYOUT_DIR="$SCRIPT_DIR/../_layout" + DOWNLOAD_DIR="$SCRIPT_DIR/../_downloads/netcore2x" + PACKAGE_DIR="$SCRIPT_DIR/../_package" + DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" +-DOTNETSDK_VERSION="6.0.421" ++DOTNETSDK_VERSION="8.0.110" + DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" +-DOTNET8SDK_VERSION="8.0.303" +-DOTNET8SDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNET8SDK_VERSION" + RUNNER_VERSION=$(cat runnerversion) + + pushd "$SCRIPT_DIR" +@@ -56,6 +54,8 @@ elif [[ "$CURRENT_PLATFORM" == 'linux' ]]; then + case $CPU_NAME in + armv7l) RUNTIME_ID="linux-arm";; + aarch64) RUNTIME_ID="linux-arm64";; ++ ppc64le) RUNTIME_ID="linux-ppc64le";; ++ s390x) RUNTIME_ID="linux-s390x";; + esac + fi + elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then +@@ -82,7 +82,7 @@ if [[ "$CURRENT_PLATFORM" == 'windows' ]]; then + exit 1 + fi + 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" != 'linux-ppc64le') && ("$RUNTIME_ID" != 'linux-s390x') ]]; then + echo "Failed: Can't build $RUNTIME_ID package $CURRENT_PLATFORM" >&2 + exit 1 + fi +@@ -127,19 +127,6 @@ function build () + { + heading "Building ..." + dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build +- +- # Build TestDotNet8Compatibility +- heading "Building .NET 8 compatibility test" +- echo "Prepend ${DOTNET8SDK_INSTALLDIR} to %PATH%" # Prepend .NET 8 SDK to PATH +- PATH_BAK=$PATH +- export PATH=${DOTNET8SDK_INSTALLDIR}:$PATH +- pushd "$SCRIPT_DIR/TestDotNet8Compatibility" > /dev/null # Working directory +- pwd +- echo "Dotnet 8 SDK Version" +- dotnet --version +- dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build +- popd > /dev/null # Restore working directory +- export PATH=$PATH_BAK # Restore PATH + } + + function layout () +@@ -159,17 +146,6 @@ function layout () + heading "Setup externals folder for $RUNTIME_ID runner's layout" + bash ./Misc/externals.sh $RUNTIME_ID || checkRC externals.sh + +- # Build TestDotNet8Compatibility +- echo "Prepend ${DOTNET8SDK_INSTALLDIR} to %PATH%" # Prepend .NET 8 SDK to PATH +- PATH_BAK=$PATH +- export PATH=${DOTNET8SDK_INSTALLDIR}:$PATH +- pushd "$SCRIPT_DIR/TestDotNet8Compatibility" > /dev/null # Working directory +- heading "Dotnet 8 SDK Version" +- dotnet --version +- heading "Building .NET 8 compatibility test" +- dotnet msbuild -t:layout -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build +- popd > /dev/null # Restore working directory +- export PATH=$PATH_BAK # Restore PATH + } + + function runtest () +@@ -226,8 +202,7 @@ function package () + popd > /dev/null + } + +-# Install .NET SDK +-if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet") ]]; then ++if [[ "${RUNTIME_ID}" != "linux-ppc64le" && "${RUNTIME_ID}" != "linux-s390x" && ((! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}") || (! -e "${DOTNETSDK_INSTALLDIR}/dotnet")) ]]; then + + # Download dotnet SDK to ../_dotnetsdk directory + heading "Ensure Dotnet SDK" +@@ -252,35 +227,11 @@ if [[ (! -d "${DOTNETSDK_INSTALLDIR}") || (! -e "${DOTNETSDK_INSTALLDIR}/.${DOTN + echo "${DOTNETSDK_VERSION}" > "${DOTNETSDK_INSTALLDIR}/.${DOTNETSDK_VERSION}" + fi + +-# Install .NET 8 SDK +-if [[ (! -d "${DOTNET8SDK_INSTALLDIR}") || (! -e "${DOTNET8SDK_INSTALLDIR}/.${DOTNET8SDK_VERSION}") || (! -e "${DOTNET8SDK_INSTALLDIR}/dotnet") ]]; then +- +- # Download dotnet 8 SDK to ../_dotnetsdk directory +- heading "Ensure Dotnet 8 SDK" +- +- # _dotnetsdk +- # \1.0.x +- # \dotnet +- # \.1.0.x +- echo "Download dotnet8sdk into ${DOTNET8SDK_INSTALLDIR}" +- rm -Rf "${DOTNETSDK_DIR}" +- +- # run dotnet-install.ps1 on windows, dotnet-install.sh on linux +- if [[ ("$CURRENT_PLATFORM" == "windows") ]]; then +- echo "Convert ${DOTNET8SDK_INSTALLDIR} to Windows style path" +- sdkinstallwindow_path=${DOTNET8SDK_INSTALLDIR:1} +- sdkinstallwindow_path=${sdkinstallwindow_path:0:1}:${sdkinstallwindow_path:1} +- $POWERSHELL -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& \"./Misc/dotnet-install.ps1\" -Version ${DOTNET8SDK_VERSION} -InstallDir \"${sdkinstallwindow_path}\" -NoPath; exit \$LastExitCode;" || checkRC dotnet-install.ps1 +- else +- bash ./Misc/dotnet-install.sh --version ${DOTNET8SDK_VERSION} --install-dir "${DOTNET8SDK_INSTALLDIR}" --no-path || checkRC dotnet-install.sh +- fi +- +- echo "${DOTNET8SDK_VERSION}" > "${DOTNET8SDK_INSTALLDIR}/.${DOTNET8SDK_VERSION}" ++if [[ -d "${DOTNETSDK_INSTALLDIR}" ]]; then ++ echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" ++ export PATH=${DOTNETSDK_INSTALLDIR}:$PATH + fi + +-echo "Prepend ${DOTNETSDK_INSTALLDIR} to %PATH%" +-export PATH=${DOTNETSDK_INSTALLDIR}:$PATH +- + heading "Dotnet SDK Version" + dotnet --version + +diff --git a/src/dir.proj b/src/dir.proj +index 056a312..1f6bdb0 100644 +--- a/src/dir.proj ++++ b/src/dir.proj +@@ -41,13 +41,22 @@ + + + +- +- ++ ++ ++ RuntimeIdentifier=$(PackageRuntime) ++ ++ SelfContained=false;CopyLocalRuntimeTargetAssets=false ++ ++ ++ + + + + +- ++ + + + +diff --git a/src/global.json b/src/global.json +index e7028fe..d1779f1 100644 +--- a/src/global.json ++++ b/src/global.json +@@ -1,5 +1,5 @@ + { + "sdk": { +- "version": "6.0.421" ++ "version": "8.0.110" + } + } \ No newline at end of file diff --git a/build-files/supported_packages.txt b/build-files/supported_packages.txt index d3398db..fab3a7c 100644 --- a/build-files/supported_packages.txt +++ b/build-files/supported_packages.txt @@ -20,7 +20,6 @@ openssh-sftp-server openssl p7zip-full p7zip-rar -packages-microsoft-prod parallel patchelf php-pear @@ -74,12 +73,8 @@ pigz pipx pkg-config podman -podman-compose -podman-remote -podman-toolbox pollinate postgresql-16 -powershell-lts python-babel-localedata python-is-python3 python3 @@ -101,7 +96,6 @@ rpm rsync ruby-full shellcheck -shim-signed skopeo snmp software-properties-common @@ -123,11 +117,10 @@ ubuntu-server ubuntu-standard unzip util-linux -walinuxagent wget xvfb xz-utils yarn zip zlib1g-dev -zsync +zsync \ No newline at end of file diff --git a/setup-build-env.sh b/setup-build-env.sh index 1be352b..40a465e 100755 --- a/setup-build-env.sh +++ b/setup-build-env.sh @@ -33,7 +33,7 @@ build_image_in_container() { msg "Check the BUILD_PREREQS_PATH specification" >&2 return 3 fi - local PATCH_FILE="${PATCH_FILE:-runner-sdk-8.patch}" + local PATCH_FILE="${PATCH_FILE:-runner-main-sdk8-${ARCH}.patch}" local BUILD_CONTAINER BUILD_CONTAINER="gha-builder-$(date +%s)" @@ -68,7 +68,7 @@ build_image_in_container() { lxc file push --mode 0755 "${BUILD_PREREQS_PATH}/supported_packages.txt" "${BUILD_CONTAINER}${BUILD_HOME}/supported_packages.txt" msg "Copy the patch file into gha-builder" - lxc file push ${BUILD_PREREQS_PATH}/${PATCH_FILE} "${BUILD_CONTAINER}${BUILD_HOME}/" + lxc file push ${BUILD_PREREQS_PATH}/patches/${PATCH_FILE} "${BUILD_CONTAINER}${BUILD_HOME}/runner-sdk-8.patch" msg "Copy the register-runner.sh script into gha-builder" lxc file push --mode 0755 ${BUILD_PREREQS_PATH}/register-runner.sh "${BUILD_CONTAINER}/opt/register-runner.sh" @@ -131,7 +131,7 @@ run() { select_ubuntu_version() { case "$ARCH" in ppc64le) - export OS_VERSION="22.04" + export OS_VERSION="24.04" ;; s390x) export OS_VERSION="24.10" From fbee9b0c97d04fc054926a416eb45aac28c98e5a Mon Sep 17 00:00:00 2001 From: rahulssv-ibm Date: Fri, 15 Nov 2024 10:51:05 +0530 Subject: [PATCH 2/2] update --- setup-build-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-build-env.sh b/setup-build-env.sh index 40a465e..5a476e2 100755 --- a/setup-build-env.sh +++ b/setup-build-env.sh @@ -26,7 +26,7 @@ ensure_lxd() { build_image_in_container() { - local IMAGE_ALIAS="${IMAGE_ALIAS:-${OS_NAME}-${OS_VERSION}-${ARCH}}" + local IMAGE_ALIAS="${IMAGE_ALIAS:-${OS_NAME}-latest-${ARCH}}" local BUILD_PREREQS_PATH="${SRCDIR}/build-files" if [ ! -d "${BUILD_PREREQS_PATH}" ]; then