Skip to content

Commit

Permalink
GithubActions: upgrade .NET on macOS to fix build failure
Browse files Browse the repository at this point in the history
There's an intermittent build issue on macOS, which seems related to:
NuGet/Home#10491 (comment)

Error was:
/Users/runner/.dotnet/sdk/5.0.102/NuGet.targets(131,5): warning : The folder '/Users/runner/.nuget/packages/netstandard.library/lib' contains an invalid version. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/.dotnet/sdk/5.0.102/NuGet.targets(131,5): warning : The folder '/Users/runner/.nuget/packages/netstandard.library/build' contains an invalid version. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool.Tests/Fantomas.CoreGlobalTool.Tests.fsproj : warning NU3028: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool.Tests/Fantomas.CoreGlobalTool.Tests.fsproj : error NU3037: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.Tests/Fantomas.Tests.fsproj : warning NU3028: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.Tests/Fantomas.Tests.fsproj : error NU3037: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
  Restored /Users/runner/work/fantomless/fantomless/src/Fantomas/Fantomas.fsproj (in 1.04 sec).
  Failed to restore /Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool.Tests/Fantomas.CoreGlobalTool.Tests.fsproj (in 1.04 sec).
  Failed to restore /Users/runner/work/fantomless/fantomless/src/Fantomas.Tests/Fantomas.Tests.fsproj (in 1.04 sec).
  Restored /Users/runner/work/fantomless/fantomless/src/Fantomas.Extras/Fantomas.Extras.fsproj (in 82 ms).
  Restored /Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool/Fantomas.CoreGlobalTool.fsproj (in 126 ms).
  Restored /Users/runner/work/fantomless/fantomless/src/Fantomas.Benchmarks/Fantomas.Benchmarks.fsproj (in 233 ms).

Build FAILED.

/Users/runner/.dotnet/sdk/5.0.102/NuGet.targets(131,5): warning : The folder '/Users/runner/.nuget/packages/netstandard.library/lib' contains an invalid version. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/.dotnet/sdk/5.0.102/NuGet.targets(131,5): warning : The folder '/Users/runner/.nuget/packages/netstandard.library/build' contains an invalid version. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool.Tests/Fantomas.CoreGlobalTool.Tests.fsproj : warning NU3028: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.Tests/Fantomas.Tests.fsproj : warning NU3028: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool.Tests/Fantomas.CoreGlobalTool.Tests.fsproj : error NU3037: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
/Users/runner/work/fantomless/fantomless/src/Fantomas.Tests/Fantomas.Tests.fsproj : error NU3037: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired. [/Users/runner/work/fantomless/fantomless/fantomas.sln]
    4 Warning(s)
    2 Error(s)

Time Elapsed 00:00:08.42
RestoreTask: /Users/runner/.dotnet/sdk/5.0.102/NuGet.targets(131,5): warning : The folder '/Users/runner/.nuget/packages/netstandard.library/lib' contains an invalid version.
RestoreTask: /Users/runner/.dotnet/sdk/5.0.102/NuGet.targets(131,5): warning : The folder '/Users/runner/.nuget/packages/netstandard.library/build' contains an invalid version.
RestoreTask: /Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool.Tests/Fantomas.CoreGlobalTool.Tests.fsproj(0,0): warning NU3028: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
RestoreTask: /Users/runner/work/fantomless/fantomless/src/Fantomas.Tests/Fantomas.Tests.fsproj(0,0): warning NU3028: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature's timestamp found a chain building issue: ExplicitDistrust: The trust setting for this policy was set to Deny.
RestoreTask: /Users/runner/work/fantomless/fantomless/src/Fantomas.CoreGlobalTool.Tests/Fantomas.CoreGlobalTool.Tests.fsproj(0,0): error NU3037: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired.
RestoreTask: /Users/runner/work/fantomless/fantomless/src/Fantomas.Tests/Fantomas.Tests.fsproj(0,0): error NU3037: Package 'NETStandard.Library 2.0.0' from source 'https://api.nuget.org/v3/index.json': The repository primary signature validity period has expired.
Finished (Failed) 'DotNet:build' in 00:00:10.6671433
Finished (Failed) 'Build' in 00:00:10.6719365

Build            00:00:10.6716931   (Exception of type 'Fake.DotNet.MSBuildException' was thrown.)
---------------------------------------------------------------------
UnitTests        00:00:00           (skipped)
Build Time Report
Benchmark        00:00:00           (skipped)
---------------------------------------------------------------------
Pack             00:00:00           (skipped)
Target           Duration
All              00:00:00           (skipped)
------           --------
Status:          Failure
Clean            00:00:00.0052406
ProjectVersion   00:00:00.0091144
CheckFormat      00:00:25.0205896
Total:           00:00:35.8285962
---------------------------------------------------------------------
Script reported an error:
-> BuildFailedException: Target 'Build' failed.
-> One or more errors occurred. (Exception of type 'Fake.DotNet.MSBuildException' was thrown.)
-> MSBuildException: Exception of type 'Fake.DotNet.MSBuildException' was thrown.
Hint: To further diagnose the problem you can run fake in verbose mode `fake -v run ...` or set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'
Hint: Could not find a version in your paket.dependencies file, consider adding 'version 5.257.0' at the top of your dependencies file (/Users/runner/work/fantomless/fantomless/paket.dependencies).
Read fsprojects/FAKE#2193 for details.
  • Loading branch information
knocte committed Sep 20, 2021
1 parent 81d27b5 commit 078bed2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Upgrade .NET 5 in macOS
if: ${{ runner.os == 'macOS' }}
run: sed -i '' "s/5.0.0/5.0.202/g" global.json
- name: Install local tools
run: dotnet tool restore
- name: Paket restore
Expand Down

0 comments on commit 078bed2

Please sign in to comment.