NightOwl888 commented on PR #1172:
URL: https://github.com/apache/lucenenet/pull/1172#issuecomment-3264255345

   In addition to setting up the NuGet restore caching functionality, this PR 
also addresses the following:
   
   1. Shared cache key between the PR tests and sonar scan
   2. Added `BUILD_FOR_ALL_TEST_TARGET_FRAMEWORKS` environment variable to the 
cache key, since our default setup only builds tests for `net9.0` by default, 
which is a subset of NuGet packages
   3. Fixed a bug with build of `Lucene.Net.Expressions` on the `sonar.yml` 
workflow. The `Antlr4BuildTasks` package has a MSBuild file that depends on the 
ANTLR4 `.jar` file, and when it fails to find it, an [error will be 
thrown](https://github.com/apache/lucenenet/actions/runs/17530407782). A 
suitable `.jar` file is in the `Antlr4.CodeGenerator` package, but adding the 
`build` assets causes other build failures. So, this adds a reference that sets 
`PrivateAssets=all` and `ExcludeAssets=all`, and adds a bit of MSBuild logic to 
set the `Antlr4ToolPath` explicitly.
   4. Upgrades all actions to the latest version.
   5. Adds the `LiquidTestReports.Markdown` report to the GitHub Actions 
summary.
   
   Do note that unlike Azure DevOps, GitHub Actions provides a [GUI to manage 
the cache contents](https://github.com/apache/lucenenet/actions/caches). So, 
there is an escape hatch if something with the caching goes wrong.
   
   If there is a better solution to the `Lucene.Net.Expressions` build error, 
let me know. I couldn't find any way to disable the MSBuild scripts that were 
included so they wouldn't search for a `.jar` file or try to run code 
generation automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to