fix: force windows compiler to run in out_dir
to prevent artifacts in cwd
#1415
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MSVC was dumping
flag_check.exe
in the crate's root directory wheneveris_flag_supported_inner
was called. This PR changes the cwd of the compiler to be inout_dir
, adds a local github action to check whether the git working tree is clean, and then uses that action to check that the CI pipelines that produce artifacts haven't dumped anything in the git working tree.GitHub Actions and Workflow Improvements:
.github/actions/check-clean-git-working-tree/action.yaml
: Added a new action named "Check Clean Git Working Tree" to verify that the Git working tree is clean..github/workflows/main.yml
: Integrated the new "Check Clean Git Working Tree" action into various job steps to prevent bugs related to uncommitted changes. [1] [2] [3] [4] [5] [6].github/workflows/main.yml
: Updated several job steps to use the${{ runner.temp }}
directory for temporary files. [1] [2]Codebase Simplification:
src/lib.rs
: Simplified theBuild
implementation by directly calling methods on thecompiler
object instead of storing their results in temporary variables. [1] [2] [3]src/lib.rs
: Ensured thecmd
command runs in theout_dir
directory by using thecurrent_dir
method.fixes #1411