Skip to content

Add GitHub Actions to build on Windows, Linux and Mac #3819

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

Merged
merged 4 commits into from
Apr 16, 2021
Merged

Conversation

rprouse
Copy link
Member

@rprouse rprouse commented Apr 16, 2021

Fixes #3812

Currently just builds on all three platforms and saves the packages from Windows. It does not publish the packages to any NuGet package feed. In the future, we may do that.

@rprouse rprouse self-assigned this Apr 16, 2021
@rprouse
Copy link
Member Author

rprouse commented Apr 16, 2021

This is looking good now. Marking ready for review and will make Required once it is merged.

@rprouse rprouse marked this pull request as ready for review April 16, 2021 01:45
- uses: actions/checkout@v2

- name: Build and Test
run: .\build.ps1 --target=Test --test-run-name=Windows
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why you not use 'dotnet cake' to match the other two OS?

Comment on lines +9 to +13
pull_request:
branches:
- master
- release
- 'v3.13-dev'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason to block CI from running if there was ever a pull request to another branch?
There might be other better-looking ways to do it, but pull_request: by itself with nothing following it enables the pull request trigger without putting filters on it. Maybe branches: [ '*' ] underneath if that looks too weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are probably right. I might change this in my next PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if pull_request with no : would have worked.

Copy link
Contributor

Choose a reason for hiding this comment

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

if there was ever a pull request to another branch?

It sounds unusual, but I've contributed directly to the topic branches of another person's PRs on GitHub. PR inception. I've also contributed to a compiler feature branch which is not something NUnit currently does.

@jnm2
Copy link
Contributor

jnm2 commented Apr 16, 2021

One thing I'd like to do eventually is add binlog artifacts. That makes it easy to drop into https://msbuildlog.com (the F12 developer tools of MSBuild) if you have it installed to diagnose weird CI issues if they come up. It captures all environment variables though, so it's not good to expose public artifacts if there are decrypted secrets in there.

Here's what it looks like to create binlogs (three of them in this case): https://github.com/shouldly/shouldly/blob/master/build.ps1#L15-L29

And upload them: https://github.com/shouldly/shouldly/blob/037a2b9c118aa266a84988d9adf0301c4ca1ad5a/.github/workflows/CI.yml#L29-L34

@rprouse rprouse merged commit d580627 into master Apr 16, 2021
@rprouse rprouse deleted the issue/3812 branch April 16, 2021 14:46
@rprouse
Copy link
Member Author

rprouse commented Apr 16, 2021

@manfred-brands thanks for the review. I apologize, I mis-tagged you, but I appreciate your help 👍🏻

@jnm2
Copy link
Contributor

jnm2 commented Apr 16, 2021

Just thought of one more thing to recommend:

env:
  DOTNET_NOLOGO: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add GitHub Actions
3 participants