Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu build fails #1

Closed
jayvdb opened this issue Jul 6, 2022 · 3 comments
Closed

Ubuntu build fails #1

jayvdb opened this issue Jul 6, 2022 · 3 comments
Assignees

Comments

@jayvdb
Copy link

jayvdb commented Jul 6, 2022

Running act on master:

 % act -r -j ubuntu-x64
[Release/Ubuntu x64] 🚀  Start image=catthehacker/ubuntu:act-latest
[Release/Ubuntu x64]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
[Release/Ubuntu x64]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Release/Ubuntu x64]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Release/Ubuntu x64]   🐳  docker exec cmd=[chown -R 0:0 /Users/jayvdb/inv/MassHub] user=0 workdir=
[Release/Ubuntu x64]   ☁  git clone 'https://github.com/actions/upload-artifact' # ref=v1
[Release/Ubuntu x64]   ☁  git clone 'https://github.com/actions/upload-artifact' # ref=v1
[Release/Ubuntu x64] ⭐ Run Main actions/checkout@v1
[Release/Ubuntu x64]   🐳  docker cp src=/Users/jayvdb/inv/MassHub/. dst=/Users/jayvdb/inv/MassHub
[Release/Ubuntu x64] close /var/folders/j6/q46zbprs12n5ds9z7zytq5mm0000gn/T/act1893837934: file already closed
[Release/Ubuntu x64]   🐳  docker exec cmd=[chown -R 0:0 /Users/jayvdb/inv/MassHub] user=0 workdir=
[Release/Ubuntu x64]   ✅  Success - Main actions/checkout@v1
[Release/Ubuntu x64] ⭐ Run Main Run './build.cmd Clean Restore Compile Publish'
[Release/Ubuntu x64]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1] user= workdir=
| GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
| dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
| dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
| dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
| dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
|
| dotnet-install: .NET Core SDK with version '5.0.203' is already installed.
| Microsoft (R) .NET Core SDK version 5.0.203
|
| ███╗   ██╗██╗   ██╗██╗  ██╗███████╗
| ████╗  ██║██║   ██║██║ ██╔╝██╔════╝
| ██╔██╗ ██║██║   ██║█████╔╝ █████╗
| ██║╚██╗██║██║   ██║██╔═██╗ ██╔══╝
| ██║ ╚████║╚██████╔╝██║  ██╗███████╗
| ╚═╝  ╚═══╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝
|
| NUKE Execution Engine version 5.1.4 (Linux,.NETCoreApp,Version=v5.0)
|
[Release/Ubuntu x64]   ❓  ##[warning]Assertion failed: Package executable GitVersion.dll, or GitVersion.exe [GitVersion.Tool|GitVersion.CommandLine] requires a framework:%0A - net5.0%0A - netcoreapp3.1%0AStackTrace:%0A   at Nuke.Common.ControlFlow.Fail(String text, Exception exception)%0A   at Nuke.Common.ControlFlow.Assert(Boolean condition, String text)%0A   at Nuke.Common.Tooling.ToolPathResolver.GetPackageExecutable(String packageId, String packageExecutable, String version, String framework)%0A   at Nuke.Common.Tools.GitVersion.GitVersionTasks.GetToolPath(String framework)%0A   at Nuke.Common.Tools.GitVersion.GitVersionSettings.GetProcessToolPath()%0A   at Nuke.Common.Tools.GitVersion.GitVersionSettings.get_ProcessToolPath()%0A   at Nuke.Common.Tooling.ProcessTasks.StartProcess(ToolSettings toolSettings)%0A   at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(GitVersionSettings toolSettings)%0A   at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure`1 configurator)%0A   at Nuke.Common.Tools.GitVersion.GitVersionAttribute.GetValue(MemberInfo member, Object instance)%0A   at Nuke.Common.ValueInjection.ValueInjectionAttributeBase.<>c__DisplayClass0_0.<TryGetValue>b__0()
[Release/Ubuntu x64]   ❓  ##[group]Clean
| Deleting directory '/Users/jayvdb/inv/MassHub/src/MassHub.CLI/obj'...
| Cleaning directory '/Users/jayvdb/inv/MassHub/artifacts'...
[Release/Ubuntu x64]   ❓  ##[endgroup]Clean
[Release/Ubuntu x64]   ❓  ##[group]Restore
| > /Users/jayvdb/inv/MassHub/.nuke/temp/dotnet-unix/dotnet restore /Users/jayvdb/inv/MassHub/MassHub.sln --runtime linux-x64
|   Determining projects to restore...
|   Restored /Users/jayvdb/inv/MassHub/src/MassHub.CLI/MassHub.CLI.csproj (in 407 ms).
| ##[endgroup]Restore
[Release/Ubuntu x64]   ❓  ##[group]Compile
[Release/Ubuntu x64]   ❗  ##[error]NullReferenceException: Object reference not set to an instance of an object.
|    at Build.<get_Compile>b__14_2(DotNetBuildSettings s) in /Users/jayvdb/inv/MassHub/build/Build.cs:line 71
|    at Nuke.Common.Tools.DotNet.DotNetTasks.DotNetBuild(Configure`1 configurator)
|    at Build.<get_Compile>b__14_1() in /Users/jayvdb/inv/MassHub/build/Build.cs:line 71
|    at Nuke.Common.Execution.BuildExecutor.<>c.<Execute>b__4_2(Action x)
|    at Nuke.Common.Utilities.Collections.EnumerableExtensions.ForEach[T](IEnumerable`1 enumerable, Action`1 action)
|    at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, ExecutableTarget target, IReadOnlyCollection`1 previouslyExecutedTargets, Boolean failureMode)
|
[Release/Ubuntu x64]   ❓  ##[endgroup]Compile
|
| Repeating warnings and errors:
| Assertion failed: Package executable GitVersion.dll, or GitVersion.exe [GitVersion.Tool|GitVersion.CommandLine] requires a framework:
|  - net5.0
|  - netcoreapp3.1
| StackTrace:
|    at Nuke.Common.ControlFlow.Fail(String text, Exception exception)
|    at Nuke.Common.ControlFlow.Assert(Boolean condition, String text)
|    at Nuke.Common.Tooling.ToolPathResolver.GetPackageExecutable(String packageId, String packageExecutable, String version, String framework)
|    at Nuke.Common.Tools.GitVersion.GitVersionTasks.GetToolPath(String framework)
|    at Nuke.Common.Tools.GitVersion.GitVersionSettings.GetProcessToolPath()
|    at Nuke.Common.Tools.GitVersion.GitVersionSettings.get_ProcessToolPath()
|    at Nuke.Common.Tooling.ProcessTasks.StartProcess(ToolSettings toolSettings)
|    at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(GitVersionSettings toolSettings)
|    at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure`1 configurator)
|    at Nuke.Common.Tools.GitVersion.GitVersionAttribute.GetValue(MemberInfo member, Object instance)
|    at Nuke.Common.ValueInjection.ValueInjectionAttributeBase.<>c__DisplayClass0_0.<TryGetValue>b__0()
| NullReferenceException: Object reference not set to an instance of an object.
|
| ═══════════════════════════════════════
| Target             Status      Duration
| ───────────────────────────────────────
| Clean              Succeeded     < 1sec
| Restore            Succeeded       0:03
| Compile            Failed        < 1sec   // NullReferenceException: Object reference not set to an instance of an object.
| Publish            NotRun
| ───────────────────────────────────────
| Total                              0:03
| ═══════════════════════════════════════
|
| Build failed on 07/06/2022 01:30:13. (╯°□°)╯︵ ┻━┻
[Release/Ubuntu x64]   ❌  Failure - Main Run './build.cmd Clean Restore Compile Publish'
[Release/Ubuntu x64] exitcode '255': failure
[Release/Ubuntu x64] 🏁  Job failed
Error: Job 'Ubuntu x64' failed
@jayvdb
Copy link
Author

jayvdb commented Jul 6, 2022

If I do

diff --git a/build/_build.csproj b/build/_build.csproj
index e4a09a9..f5f3fee 100644
--- a/build/_build.csproj
+++ b/build/_build.csproj
@@ -7,10 +7,11 @@
     <NoWarn>CS0649;CS0169</NoWarn>
     <NukeRootDirectory>..</NukeRootDirectory>
     <NukeScriptDirectory>..</NukeScriptDirectory>
+    <NukeTelemetryVersion>1</NukeTelemetryVersion>
   </PropertyGroup>

   <ItemGroup>
-    <PackageReference Include="Nuke.Common" Version="5.1.4" />
+    <PackageReference Include="Nuke.Common" Version="5.3.0" />
     <PackageDownload Include="GitVersion.Tool" Version="[5.6.7]" />
   </ItemGroup>

I get error

Release/Ubuntu x64]   ❓  ##[group]Compile
| > /Users/jayvdb/inv/MassHub/.nuke/temp/dotnet-unix/dotnet build /Users/jayvdb/inv/MassHub/MassHub.sln --configuration Release --no-restore --runtime linux-x64 /property:AssemblyVersion=1.2.1.0 /property:FileVersion=1.2.1.0 /property:InformationalVersion=1.2.1 /property:Authors=Inzanit /property:Copyright="Copyright � 2021 Patrick Klaeren. All rights reserved."
| Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
| Copyright (C) Microsoft Corporation. All rights reserved.
|
[Release/Ubuntu x64]   ❓  ##[error]/Users/jayvdb/inv/MassHub/.nuke/temp/dotnet-unix/sdk/5.0.203/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(27,5): error NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. [/Users/jayvdb/inv/MassHub/MassHub.sln]
|
| Build FAILED.
|
[Release/Ubuntu x64]   ❓  ##[error]/Users/jayvdb/inv/MassHub/.nuke/temp/dotnet-unix/sdk/5.0.203/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(27,5): error NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. [/Users/jayvdb/inv/MassHub/MassHub.sln]
|     0 Warning(s)
|     1 Error(s)

Which seems to be dotnet/sdk#14281

I guess this is related to https://github.com/patrickklaeren/MassHub/actions/runs/922883754

@patrickklaeren
Copy link
Owner

Looks like a common problem I have with Nuke regardless. I want to retarget this to .NET 6.

I don't actually make much use of this anymore, since Octokit isn't up to date with the latest GitHub API changes, regrettably. But will get that out hopefully tonight.

@patrickklaeren patrickklaeren self-assigned this Jul 6, 2022
@patrickklaeren
Copy link
Owner

https://github.com/patrickklaeren/MassHub/actions/runs/2623756122 working Ubuntu builds here now.

I'm not able to test these currently. There are trim warnings coming from dependencies which I will need to take a look at.

Release available here, https://github.com/patrickklaeren/MassHub/releases/tag/v1.2

Source updated if you want to build yourself. Hope this helps you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants