-
Notifications
You must be signed in to change notification settings - Fork 18
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
Introduce MSVC CI support #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple nits on platform-independent syntax, but otherwise looks good.
.github/workflows/ci_tests.yml
Outdated
# MSVC has limited support for sanitizers, so we use include here for MSVC as an exception. | ||
# This should be simplified after beman-project/exemplar#76 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# MSVC has limited support for sanitizers, so we use include here for MSVC as an exception. | |
# This should be simplified after beman-project/exemplar#76 is merged. |
It isn't clear what is meant by "use include here". Also, it is unclear if #76 in its current form will be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah sorry I should check my comment
.github/workflows/ci_tests.yml
Outdated
CMAKE_GENERATOR: "Ninja Multi-Config" | ||
- name: Build Release | ||
run: | | ||
cmake --build build --config Release --verbose | ||
cmake --build build --config Release --target all_verify_interface_header_sets | ||
cmake --install build --config Release --prefix /opt/beman.exemplar | ||
find /opt/beman.exemplar -type f | ||
tree /opt/beman.exemplar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like this?
tree /opt/beman.exemplar | |
cd /opt/beman.exemplar | |
tree | |
cd - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a great idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agh, it's a quirk with powershell tree.
See: https://superuser.com/questions/1270040/windows-10-powershell-tree-command-how-to-show-files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the same trick I suggested in this comment to use the /F
flag on windows only
.github/workflows/ci_tests.yml
Outdated
${{ matrix.platform.cpp }} --version | ||
${{ matrix.platform.c }} --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that --version
isn't a cl.exe
flag. Maybe something like this? See this reference page.
${{ matrix.platform.cpp }} --version | |
${{ matrix.platform.c }} --version | |
${{ matrix.platform.cpp }} ${{ matrix.platform.cpp == 'cl' && '' || '--version' }} | |
${{ matrix.platform.c }} ${{ matrix.platform.cpp == 'cl' && '' || '--version' }} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
This reverts commit 01bf599.
CMAKE_GENERATOR: "Ninja Multi-Config" | ||
- name: Build Release | ||
run: | | ||
cmake --build build --config Release --verbose | ||
cmake --build build --config Release --target all_verify_interface_header_sets | ||
cmake --install build --config Release --prefix /opt/beman.exemplar | ||
find /opt/beman.exemplar -type f | ||
ls -R /opt/beman.exemplar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why find
is not good?
do we just prefer a recursive display? If so, why not using tree
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we need to execute this on windows runner for MSVC, where tree doesn't work with the /opt/.... Directory.
Should I include a comment here documenting this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, got it, right. I would add a command like name: Build Release # Portable commands only
. thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adopted.
.github/workflows/ci_tests.yml
Outdated
compiler: | ||
- cpp: g++ | ||
platform: | ||
- description: "ubuntu gcc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- description: "ubuntu gcc" | |
- description: "Ubuntu GCC" |
if it's in description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adopted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The # Portable commands only
comments clutter up the code in my opinion, but I don't want to hold up merging for that :-D
Yeah I do agree it clutters up the code... Edit: I will wait for @neatudarius to confirm review before merging. Maybe there's a better way to comment this? |
- name: Test Release | ||
run: ctest --test-dir build --build-config Release | ||
- name: Build Debug | ||
run: | | ||
# Portable commands only | ||
cmake --build build --config Debug --verbose | ||
cmake --build build --config Debug --target all_verify_interface_header_sets | ||
cmake --install build --config Debug --prefix /opt/beman.exemplar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This install isn't going to do anything because it's installing to the same location as the Release install. Unless that's the intent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intention here is to test the install command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It ends up skipping installation because it's already installed, which is a sort of test. Not critical for header only, but if there's any generated config or binaries, they shouldn't clobber each other.
Perhaps an explanatory general comment, once, reminding us to use the portable subset of commands. |
Ops I didn't see this before merging. I don't think this is fine. We can move this out in a later PR. |
This PR adds MSVC CI support.
Could be improved after #76 is merged.
Conflict with unknown state PR #66 .
Closes #24 .