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.cmd/sh changes #5958

Merged
merged 14 commits into from
Dec 21, 2018
Merged

build.cmd/sh changes #5958

merged 14 commits into from
Dec 21, 2018

Conversation

natemcmaster
Copy link
Contributor

@natemcmaster natemcmaster commented Dec 19, 2018

Notes for @aspnet contributors

  • build.cmd no longer runs tests. Run build.cmd -test
  • Build scripts in subfolders work again. Example: running the build.sh script will build and test only those projects found in the matching subdirectory.
$ src/Servers/Kestrel/build.sh -test
  • I didn't add a build.cmd script in every subfolder, but feel free to add new ones. Use src/DataProtection/build.{cmd,sh} as examples.

Changes:

  • Add flags like -test and -pack to control running just test or packaging
  • Add flags like -managed, -native, and -nodejs to control building sub-types of projects
  • Remove KoreBuild bootstrapper flags
  • Added build scripts specifically for CI which runs all builds in of all types on all targets.

These scripts will change a little more when we adopt Arcade SDK, but not much.

Resolves #4247

…bfolders or subgroups of projects

* Add build scripts for ci
* Remove obsolete scripts
* Add flags like --test and --pack to control running just test or packaging
* Add flags like --managed and --native to control building sub-types of projects
* Remove KoreBuild bootstrapper flags
@natemcmaster natemcmaster added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Dec 19, 2018
@natemcmaster natemcmaster added this to the 3.0.0-preview2 milestone Dec 19, 2018
@natemcmaster
Copy link
Contributor Author

PR build failures uncovered a product issue: dotnet/extensions#815 I'm going to revert some of these changes temporarily until we can resolved.

@Tratcher
Copy link
Member

Is build /t:resx still a thing? If not how do we update resource files?

@natemcmaster
Copy link
Contributor Author

Is build /t:resx still a thing? If not how do we update resource files?

Yes, that should still work. You can also do dotnet build /t:Resx on project files.

@Tratcher
Copy link
Member

resx should be included in the buildfromsource.md.

Produce packages.

.PARAMETER Test
Run tests.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure I understood whether this only runs tests, or does it also build some subset of things required to run tests? And if it literally only runs tests (i.e. it assumes all binaries are already built and in the right location), when would that be needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

build.cmd -test will build AND test. We could add a gesture for just running tests without building, but I don't think re-running tests without changes is very common.

Copy link
Member

Choose a reason for hiding this comment

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

@halter73 does this all the time, re-running tests in a loop trying to repro flaky issues.

Copy link
Member

Choose a reason for hiding this comment

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

OK I was thinking it presumably builds & runs tests.

The case of re-running tests in a loop happens, but is rare, so I didn't think that would be a frequently used case.

Copy link
Member

Choose a reason for hiding this comment

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

if the build were incremental then it would work both ways...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Builds should be incremental once we finish #4246.

re-running tests in a loop trying to repro flaky issues.

You can do it with the build.cmd script, it's just not the default. On *nix, build.sh --no-restore --no-build --test. On Windows, it's ./build.ps1 -restore:$false -build:$false -test. You can also use dotnet test --no-build on the project you're trying to use.

</PropertyGroup>

<Exec Command="npm $(NpmInstallCommand)" WorkingDirectory="%(NpmProjectDirectory.Identity)" Condition=" '%(NpmProjectDirectory.Identity)' != '' " />
<!-- Always run `npm ci` because `npm install` has a tendancy to churn package-lock.json for no apparent reason. -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@natemcmaster
Copy link
Contributor Author

/AzurePipelines run all

@azure-pipelines
Copy link

Success! 2 created and queued.

@natemcmaster
Copy link
Contributor Author

🔔 I'm going to merge this soon. Please take a look if you want to provide additional feedback.

@pakrym pakrym mentioned this pull request Dec 20, 2018
@pakrym
Copy link
Contributor

pakrym commented Dec 20, 2018

🚢 🇮🇹

@natemcmaster natemcmaster merged commit c3beb1f into dotnet:master Dec 21, 2018
@natemcmaster natemcmaster deleted the build-script branch December 21, 2018 00:52
dougbu pushed a commit to dougbu/razor-compiler that referenced this pull request Nov 17, 2021
Update the build scripts to support building subfolders or subgroups of projects

* Add build scripts for ci
* Remove obsolete scripts
* Add flags like --test and --pack to control running just test or packaging
* Add flags like --managed and --native to control building sub-types of projects
* Remove KoreBuild bootstrapper flags
* Update to extensions 3.0.0-preview.18619.1 (needed to get a fix for dotnet/extensions#815 to make this change work on MSBuild.exe)


Commit migrated from dotnet/aspnetcore@c3beb1f9b149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants