Skip to content

[ci] Fail build if any untracked files written in git tree#9939

Merged
jpobst merged 1 commit intomainfrom
dev/jpobst/dirty-tree
Apr 23, 2025
Merged

[ci] Fail build if any untracked files written in git tree#9939
jpobst merged 1 commit intomainfrom
dev/jpobst/dirty-tree

Conversation

@jpobst
Copy link
Copy Markdown
Contributor

@jpobst jpobst commented Mar 19, 2025

Context: #9661

Building on #9661, we also shouldn't be writing build artifacts to the source tree.

Any files generated by the build should be placed in /bin or /obj folders rather than the source tree.

Violations fixed by putting the artifact in .gitignore.

Current violations:

Mac:

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	src/native/CMakePresets.json

Linux:

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	src/native/CMakePresets.json
	src/native/clr/host/generate-pinvoke-tables
	src/native/clr/host/pinvoke-tables.include.generated
	src/native/mono/pinvoke-override/generate-pinvoke-tables
	src/native/mono/pinvoke-override/pinvoke-tables.include.generated

Windows

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	dotnet-install.ps1
	src/native/CMakePresets.json

@dotnet dotnet deleted a comment from azure-pipelines Bot Apr 18, 2025
@jpobst jpobst force-pushed the dev/jpobst/dirty-tree branch 2 times, most recently from 4439559 to 862bd2b Compare April 18, 2025 21:40
@jpobst jpobst force-pushed the dev/jpobst/dirty-tree branch from 862bd2b to 6fc2a70 Compare April 18, 2025 22:27
@jpobst jpobst marked this pull request as ready for review April 19, 2025 01:12
@jpobst jpobst requested a review from grendello April 19, 2025 01:13
Comment thread .gitignore
src/native/CMakePresets.json
src/native/clr/host/generate-pinvoke-tables
src/native/clr/host/pinvoke-tables.include.generated
src/native/mono/pinvoke-override/generate-pinvoke-tables
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@grendello: is it safe to ignore changes to these files?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, perfectly safe

@jpobst jpobst merged commit e80fc6c into main Apr 23, 2025
59 checks passed
@jpobst jpobst deleted the dev/jpobst/dirty-tree branch April 23, 2025 21:35
@github-actions github-actions Bot locked and limited conversation to collaborators May 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants