soup-bowl / localib

Keeps your Discogs library offline and searchable.
https://localib.app
MIT License
0 stars 0 forks source link

Unable to compile Docker container via GH Actions #13

Open soup-bowl opened 2 months ago

soup-bowl commented 2 months ago

Seems like the pipeline is currently struggling to compile the container, with issues arising when AMD64 support was added to the build.

These errors are inconsistent in message too, but they point to the same aspect of the build:

------
 > [linux/arm64 build-worker 5/7] RUN dotnet restore "Discapp.Worker/Discapp.Worker.csproj":
27.06   Determining projects to restore...
90.05 /src/Discapp.Worker/Discapp.Worker.csproj : warning NU1900: Error occurred while getting package vulnerability data: Unable to cast object of type 'System.Net.Http.HttpRequestMessage' to type 'System.Text.Json.Serialization.Metadata.JsonPropertyInfo'.
90.05 /src/Discapp.Shared/Discapp.Shared.csproj : warning NU1900: Error occurred while getting package vulnerability data: Unable to cast object of type 'System.Net.Http.HttpRequestMessage' to type 'System.Text.Json.Serialization.Metadata.JsonPropertyInfo'. [/src/Discapp.Worker/Discapp.Worker.csproj]
93.27 Segmentation fault (core dumped)
------
Dockerfile:16
--------------------
  14 |     COPY Discapp.Worker/*.csproj Discapp.Worker/
  15 |     COPY Discapp.Shared/*.csproj Discapp.Shared/
  16 | >>> RUN dotnet restore "Discapp.Worker/Discapp.Worker.csproj"
  17 |     COPY . .
  18 |     RUN dotnet publish "Discapp.Worker/Discapp.Worker.csproj" -c Release -o /publish
--------------------
  > [linux/arm64 build-api 5/7] RUN dotnet restore "Discapp.API/Discapp.API.csproj":
28.07   Determining projects to restore...
29.68 /usr/share/dotnet/sdk/8.0.303/NuGet.targets(1113,5): error MSB4018: The "ConvertToAbsolutePath" task failed unexpectedly. [/src/Discapp.Shared/Discapp.Shared.csproj]
29.68 /usr/share/dotnet/sdk/8.0.303/NuGet.targets(1113,5): error MSB4018: System.ArgumentNullException: Parameter "Paths" cannot be null. [/src/Discapp.Shared/Discapp.Shared.csproj]
29.68 /usr/share/dotnet/sdk/8.0.303/NuGet.targets(1113,5): error MSB4018:    at Microsoft.Build.Shared.ErrorUtilities.ThrowArgumentNull(String parameterName, String resourceName) [/src/Discapp.Shared/Discapp.Shared.csproj]
29.68 /usr/share/dotnet/sdk/8.0.303/NuGet.targets(1113,5): error MSB4018:    at Microsoft.Build.Tasks.ConvertToAbsolutePath.Execute() [/src/Discapp.Shared/Discapp.Shared.csproj]
29.68 /usr/share/dotnet/sdk/8.0.303/NuGet.targets(1113,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/src/Discapp.Shared/Discapp.Shared.csproj]
29.68 /usr/share/dotnet/sdk/8.0.303/NuGet.targets(1113,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/src/Discapp.Shared/Discapp.Shared.csproj]
------
Dockerfile:7
--------------------
   5 |     COPY Discapp.Shared/*.csproj Discapp.Shared/
   6 |     
   7 | >>> RUN dotnet restore "Discapp.API/Discapp.API.csproj"
   8 |     COPY . . 
   9 |     RUN dotnet publish "Discapp.API/Discapp.API.csproj" -c Release -o /publish
--------------------

This appears to be possibly related to the QEMU build process. Might perhaps switch to using a self-hosted ARM builder?

soup-bowl commented 2 months ago

ARM64 builds disabled for now. To be clear, bizarrely this does compile on ARM, just not via GHA/QEMU for some strange reason.