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

Add Windows CI #176

Merged
merged 36 commits into from
Nov 7, 2024
Merged

Add Windows CI #176

merged 36 commits into from
Nov 7, 2024

Conversation

jeandemanged
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

Feature

What is the current behavior?

No windows CI

What is the new behavior (if this is a feature change)?
Add windows CI, including publishing of windows binaries on release

Does this PR introduce a breaking change or deprecate an API?

  • No

@jeandemanged jeandemanged self-assigned this Oct 9, 2024
configure_file(${file} ${file} NEWLINE_STYLE LF) # required for windows ctest
execute_process( COMMAND ${CMAKE_COMMAND} -E compare_files ${file} ${expected_file}
execute_process( COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${file} ${expected_file}
Copy link
Member Author

Choose a reason for hiding this comment

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

changed this way because previous code was assuming code was checked out using LF end of files, but this is not the default git behavior on Windows.

Note that --ignore-eol requires cmake 3.14+

@@ -28,12 +28,14 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(INSTALL_CMAKE_DIR cmake CACHE PATH "Installation directory for cmake files")

if(MSVC)
add_compile_definitions(WIN32)
add_definitions(-D_WIN32_WINNT=0x0A00)
Copy link
Member Author

Choose a reason for hiding this comment

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

windows 10+

cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
Copy link
Member Author

Choose a reason for hiding this comment

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

For --ignore-eol option in tests, see metrix-simulator/cmake/tnr.cmake

metrix_test("variantes_regroupees_complexe" 11) # no check here because of random and equivalent solutions
metrix_test_no_check("variantes_regroupees_complexe" 11) # no check here because of random and equivalent solutions
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that the comment saying no check here because of random and equivalent solutions was already there...
On windows the results differ only in lines ordering.

Copy link
Member Author

@jeandemanged jeandemanged Oct 10, 2024

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not really a cmake expert ... feedback welcome

Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
Signed-off-by: Damien Jeandemange <[email protected]>
@jeandemanged jeandemanged changed the base branch from main to gh-workflows October 18, 2024 14:42
Base automatically changed from gh-workflows to main November 7, 2024 13:38
jeandemanged and others added 2 commits November 7, 2024 14:44
# Conflicts:
#	.github/old_workflows/ci_centos7.yml
#	.github/old_workflows/ci_ol8.yml
#	.github/old_workflows/ci_ubuntu.yml
#	.github/old_workflows/maven.yml
#	.github/old_workflows/qa_pr_cpp_centos7.yml
#	.github/old_workflows/qa_pr_cpp_ol8.yml
#	.github/old_workflows/qa_pr_cpp_ubuntu.yml
#	.github/workflows/dev-ci.yml
#	.github/workflows/full-ci.yml
#	.github/workflows/release-ci.yml
@jeandemanged jeandemanged changed the title [WIP] Add Windows CI Add Windows CI Nov 7, 2024
Copy link

sonarqubecloud bot commented Nov 7, 2024

Copy link

sonarqubecloud bot commented Nov 7, 2024

Copy link
Member

@rolnico rolnico left a comment

Choose a reason for hiding this comment

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

LGTM (and the CI worked)

@rolnico rolnico merged commit 3c3943a into main Nov 7, 2024
13 checks passed
@rolnico rolnico deleted the windows-ci branch November 7, 2024 14:41
rolnico pushed a commit that referenced this pull request Nov 7, 2024
* try rework github workflows

Signed-off-by: Damien Jeandemange <[email protected]>

* try rework github workflows

Signed-off-by: Damien Jeandemange <[email protected]>

* clang tidy

Signed-off-by: Damien Jeandemange <[email protected]>

* clang tidy

Signed-off-by: Damien Jeandemange <[email protected]>

* clang tidy

Signed-off-by: Damien Jeandemange <[email protected]>

* clang tidy

Signed-off-by: Damien Jeandemange <[email protected]>

* clang tidy

Signed-off-by: Damien Jeandemange <[email protected]>

* clang tidy

Signed-off-by: Damien Jeandemange <[email protected]>

* artifacts

Signed-off-by: Damien Jeandemange <[email protected]>

* artifacts

Signed-off-by: Damien Jeandemange <[email protected]>

* artifacts

Signed-off-by: Damien Jeandemange <[email protected]>

* artifacts

Signed-off-by: Damien Jeandemange <[email protected]>

* wip

Signed-off-by: Damien Jeandemange <[email protected]>

* fix

Signed-off-by: Damien Jeandemange <[email protected]>

* wip windows ci

Signed-off-by: Damien Jeandemange <[email protected]>

* wip windows ci

Signed-off-by: Damien Jeandemange <[email protected]>

* wip windows ci

Signed-off-by: Damien Jeandemange <[email protected]>

* wip windows ci / cpp tests

Signed-off-by: Damien Jeandemange <[email protected]>

* test

Signed-off-by: Damien Jeandemange <[email protected]>

* test

Signed-off-by: Damien Jeandemange <[email protected]>

* test

Signed-off-by: Damien Jeandemange <[email protected]>

* wip

Signed-off-by: Damien Jeandemange <[email protected]>

* fix

Signed-off-by: Damien Jeandemange <[email protected]>

* fix

Signed-off-by: Damien Jeandemange <[email protected]>

* fix

Signed-off-by: Damien Jeandemange <[email protected]>

* use softprops/action-gh-release

Signed-off-by: Damien Jeandemange <[email protected]>

* use softprops/action-gh-release

Signed-off-by: Damien Jeandemange <[email protected]>

* update readme for cmake 3.14

Signed-off-by: Damien Jeandemange <[email protected]>

---------

Signed-off-by: Damien Jeandemange <[email protected]>
Co-authored-by: Nicolas Rol <[email protected]>
(cherry picked from commit 3c3943a)
@rolnico rolnico mentioned this pull request Jan 10, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants