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

Build adjustments for code annotation #2155

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

nathanctech
Copy link

This PR overrides Nuke's log handling and removes the problematic formatting the default analyzers were unable to process as well as improving the build flow to reduce duplicate warnings (and thus annotations). Building and testing have merged into a single step, and warnings are suppressed from the test rebuild since they're just refired from the initial build process anyway.

In addition, I adjusted the workflow so pushes to an existing pull request won't trigger both the push and PR builds to occur in some cases which also contributed to the warning duplication. In the end, file changes now have code-level annotations!

@nathanctech nathanctech requested a review from a team as a code owner December 24, 2024 03:02
Copy link
Member

@KazWolfe KazWolfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub Actions sets an environment variable (CI) to true. please only ensure these changes are only active when CI == true.

build/DalamudBuild.cs Outdated Show resolved Hide resolved
@nathanctech
Copy link
Author

Well...git's quite something and re-commited a bunch of things despite my best efforts - anyway:

It now checks for the CI variable before doing any changes to the logging, so local builds will function as normal. I also added --skip-tests as a possible parameter in case those need to be skipped for some reason. You can technically still run tests without everything else locally by passing test as with the previous process and it will build as usual, too.

@wolfcomp
Copy link
Contributor

wolfcomp commented Jan 3, 2025

Maybe have skip test being the default on non CI builds?

@nathanctech
Copy link
Author

Maybe have skip test being the default on non CI builds?

Also an option, yeah. Then you could invoke it manually which would make sense since you're already having to do that with the current process. I can make that change if that's the way to go.

@KazWolfe
Copy link
Member

KazWolfe commented Jan 3, 2025

The other side is to have a ci-run target that does compile+test. That might be cleaner in general, though we'd need to probably look more into Nuke and how it works.

@nathanctech
Copy link
Author

The other side is to have a ci-run target that does compile+test. That might be cleaner in general, though we'd need to probably look more into Nuke and how it works.

From my research, the compile and test parameters being passed in the current process simply make Nuke trigger a given Target specification which then sets off the chain using the dependencies given. So, we could indeed have something like build.ps1 ci and have it trigger the build+test, with default being build only and untouched logging.

… Tests can also be manually triggered with `test`.
@nathanctech
Copy link
Author

Okay. I scratched the skip-tests thing entirely. Now, the build process runs build.ps1 ci which triggers the test after building. When done locally with build.ps1 compile, it only runs the build step as expected.

@nathanctech nathanctech requested a review from KazWolfe January 21, 2025 17:06
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

Successfully merging this pull request may close these issues.

3 participants