-
Notifications
You must be signed in to change notification settings - Fork 356
Add Windows CI #4507
Add Windows CI #4507
Conversation
This adds an MSCV2019 Release build to the build and test job. The job uses conan for dependencies other than qt. We might want to consider also moving to conan for the linux build at some later point in time. Note, Ninja is needed to support ccache. Also note, ccache does not support "-Zi", so there is no relwithdebinfo build. Test: Run CI
.github/workflows/build-and-test.yml
Outdated
cxx: "clang++", | ||
os: "ubuntu-22.04" | ||
} | ||
- { | ||
name: "MSVC Release", |
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.
Nit: The indentation is not consistent
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.
.github/workflows/build-and-test.yml
Outdated
working-directory: ./build | ||
- run: ccache -p | ||
- run: ccache -z | ||
- run: mkdir "build_${{ matrix.config.conan_profile }}" |
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.
I don't understand that. conan_profile
is only set for the MSVC build in the matrix. And even if it were, it might be confusing since we don't use Conan for this build.
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.
Removed it here.
.github/workflows/build-and-test.yml
Outdated
- name: Install conan config (Windows) | ||
if: ${{ startsWith(matrix.config.os, 'windows') }} | ||
run: | | ||
./third_party/conan/configs/install.ps1 |
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.
For symmetry reasons, you could also just call py -3 -m conans.conan config install .\third_party\conan\configs\windows\
here.
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.
.github/workflows/build-and-test.yml
Outdated
Qt5_DIR: "C:\\Qt\\5.15.2\\msvc2019_64" | ||
CMAKE_CXX_COMPILER_LAUNCHER: "ccache" | ||
CMAKE_C_COMPILER_LAUNCHER: "ccache" | ||
run: ./build.ps1 ${{ matrix.config.conan_profile }} |
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.
I would consider calling Conan directly here. That simplifies the build - especially because you could have a static build directory path (build/ for example - as before). These are the commands:
py -3 -m conans.conan install -pr:b msvc2019_release -pr:h ${{ matrix.config.conan_profile }} -if build/ --build outdated --update ./
py -3 -m conans.conan build -bf build/
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 (also used ${{ matrix.config.conan_profile }} for the first msvc2019_release).
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.
Thanks for the comments. I addressed them (hopefully).
.github/workflows/build-and-test.yml
Outdated
cxx: "clang++", | ||
os: "ubuntu-22.04" | ||
} | ||
- { | ||
name: "MSVC Release", |
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.
.github/workflows/build-and-test.yml
Outdated
- name: Install conan config (Windows) | ||
if: ${{ startsWith(matrix.config.os, 'windows') }} | ||
run: | | ||
./third_party/conan/configs/install.ps1 |
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.
.github/workflows/build-and-test.yml
Outdated
Qt5_DIR: "C:\\Qt\\5.15.2\\msvc2019_64" | ||
CMAKE_CXX_COMPILER_LAUNCHER: "ccache" | ||
CMAKE_C_COMPILER_LAUNCHER: "ccache" | ||
run: ./build.ps1 ${{ matrix.config.conan_profile }} |
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 (also used ${{ matrix.config.conan_profile }} for the first msvc2019_release).
.github/workflows/build-and-test.yml
Outdated
working-directory: ./build | ||
- run: ccache -p | ||
- run: ccache -z | ||
- run: mkdir "build_${{ matrix.config.conan_profile }}" |
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.
Removed it here.
.github/workflows/build-and-test.yml
Outdated
working-directory: ./build | ||
- name: CMake Test (Ubuntu) | ||
if: ${{ startsWith(matrix.config.os, 'ubuntu') }} | ||
working-directory: ./build_${{ matrix.config.conan_profile }} |
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.
I think the working directory is wrong here.
.github/workflows/build-and-test.yml
Outdated
CMAKE_CXX_COMPILER_LAUNCHER: "ccache" | ||
CMAKE_C_COMPILER_LAUNCHER: "ccache" | ||
run: | | ||
py -3 -m conans.conan install -pr:b ${{ matrix.config.conan_profile }} -pr:h ${{ matrix.config.conan_profile }} -if build/ --build outdated --update ./ |
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 build profile -pr:b
should be hard coded to some release profile. It's the profile that we use to build things like cmake and protoc. msvc2019_release
is probably the best fit here.
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.
(Of course this is kind of forward looking for when we have more than a single windows build with maybe different profiles.)
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.
Otherwise LGTM
This adds an MSCV2019 Release build to the
build and test job. The job uses conan
for dependencies other than qt.
We might want to consider also moving to
conan for the linux build at some later
point in time.
Note, Ninja is needed to support ccache.
Also note, ccache does not support "-Zi",
so there is no relwithdebinfo build.
Test: Run CI