Skip to content

Enable windows build in CI#730

Merged
eyal0 merged 4 commits intopcb2gcode:masterfrom
mar0x:master
Nov 24, 2025
Merged

Enable windows build in CI#730
eyal0 merged 4 commits intopcb2gcode:masterfrom
mar0x:master

Conversation

@mar0x
Copy link
Copy Markdown
Contributor

@mar0x mar0x commented Nov 17, 2025

wide_oval.gbr test disabled because calculated error is significantly less than test one.
Compilation flag -Werror removed because there are uninitialized variable warnings inside boost.

@eyal0
Copy link
Copy Markdown
Contributor

eyal0 commented Nov 17, 2025

Okay, good work! Let's see how CI goes.

I would like to maintain Werror for which ever builds that we can. It stopped working properly with clang because clang is not properly respecting the difference between -isystem and -I. The former is supposed to cause compilers to ignore warnings from files in those subdirectories. However, there was some update to clang that broke this.

I wonder why is the error in the oval. The oval is a pretty easy test so I wouldn't expect an error in there...

When there is an error, we can emit the .png file showing the error. I don't have a windows platform. If the error is only in Windows, I'd like to know what the error is! I will look at this after CI completes.

@mar0x
Copy link
Copy Markdown
Contributor Author

mar0x commented Nov 19, 2025

Okay, good work! Let's see how CI goes.

Thank you!

I would like to maintain Werror for which ever builds that we can.

It is possible to make -Werror dependent on the platform/compiler. There are the same warnings in boost with recent g++ on Ubuntu: https://github.com/pcb2gcode/pcb2gcode/actions/runs/19444891796/job/55641874471?pr=730

I wonder why is the error in the oval. The oval is a pretty easy test so I wouldn't expect an error in there...

When there is an error, we can emit the .png file showing the error. I don't have a windows platform. If the error is only in Windows, I'd like to know what the error is! I will look at this after CI completes.

Agree, this is pretty strange. The thing is the error rate is lower than expected, but it is lower for more than 0.1%:

                           wide_oval.gbr	 error rate: 0.008792%	 expected: 0.00882%
gerberimporter_tests.cpp(232): error: in "gerberimporter_tests/gerberimporter_match_gerbv/_8": difference{0.00313012} between error_rate{8.7924784894356575e-05} and expected_error_rate{8.8200000000000003e-05} exceeds 0.1%

I'm also curious about this and happy to assist you to discover the reason if you give me little a glue how to enable extra data collection.

@eyal0
Copy link
Copy Markdown
Contributor

eyal0 commented Nov 19, 2025

Oh, are you able to compile the windows version on your computer? Cool!

There are some environment variables that you can set to inhibit or enable the creation of .png files in the gerberimporter test. Those png files create the "comparison". I think that it's black where both grebv and pcb2gcode agree that a pixel is not part of a shape. Purple where they both agree that it is part of a shape, and then red where only one reports it and green for the other. Something like that. It's like a diff of two monochromatic png files. Looking at that might give insight. Or maybe we just don't really care. Drawing an oval is hard and you get all these pixels on the boundary that don't agree. Maybe that test just needs to be a little looser to accept that oval drawing will not provide the same results with different versions of Cairo.

As for the boost warnings: they were always there. It's just that the compiler's isystem flag causes them to be ignored. The correct operation of the isystem flag broke in a release of a new compiler. I don't recall if it was clang or g++. So I think that we should just disable Werror for that specific version of that specific compiler.

@eyal0
Copy link
Copy Markdown
Contributor

eyal0 commented Nov 19, 2025

https://stackoverflow.com/questions/78905687/g-13-the-isystem-flag-seems-to-work-incorrectly-with-optimization-enabled

g++ 13 broke the flag, I think. There are multiple sightings of this online.

@mar0x
Copy link
Copy Markdown
Contributor Author

mar0x commented Nov 19, 2025

Oh, are you able to compile the windows version on your computer? Cool!

Although I'm able to build on local windows machine, I prefer to modify CI workflow.

I've made this changes:

  • enable wide_oval test back
  • increase the test error up to 1.1%
  • add couple of values to output
  • enable png files generation
  • package .png and .log files to artifacts archive
  • limit the number of builds

and got builds for ubuntu and windows (available here).

As far as I understand from both gerberimporter_tests.log, the results are exactly the same on ubuntu and windows, both wide_oval.gbr.png files have the same md5. But BOOST_CHECK_CLOSE() triggers error only on windows. Most likely this is caused by boost version difference, I will check this later.

I'll try to update error rate and enable wide_oval back.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread gerberimporter_tests.cpp
@eyal0
Copy link
Copy Markdown
Contributor

eyal0 commented Nov 19, 2025

Does your work need a merge with the master branch?

@mar0x mar0x marked this pull request as draft November 19, 2025 23:48
@mar0x
Copy link
Copy Markdown
Contributor Author

mar0x commented Nov 19, 2025

Does your work need a merge with the master branch?

I'm not insist you merge it on master. Let me know if I should change the PR or create another one.

I have started my changes in my 'master' and then create PR with it. Since I've made a changes according to your comments, I've made the PR draft to not bother you. Once CI finishes I'll make it 'ready' again.

UPD: it seems I've answered wrong question, sorry. I've re-based my commits over the master branch.

@mar0x mar0x marked this pull request as ready for review November 20, 2025 00:31
mar0x and others added 3 commits November 20, 2025 10:55
Comment thread .github/workflows/ci.yml
Comment on lines -40 to -43
boost: 1_66
compiler: g++-10
geos: 'main'
code_coverage: "--enable-code-coverage"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's put these lines back, please. boost can be latest and geos can be latest, too.

Right now, the CI is failing because none of the CI runs are exporting any code coverage information. But everything else passes, that's great!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've changed g++ to latest as well, if you don't mind.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

FYI: Ubuntu-24.04 used in github actions. There is lcov-2.0 in Ubuntu-24.04 Noble repository. It is incompatible with lcov-1.16. To use lcov-2.0 it requires to do more changes than simple installation (take 1) and command line update (take 2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, okay. Well, good to know. This can be fixed in a different PR one day.

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 59.007%. first build
when pulling 24c191e on mar0x:master
into 07c6df4 on pcb2gcode:master.

@mar0x
Copy link
Copy Markdown
Contributor Author

mar0x commented Nov 21, 2025

https://stackoverflow.com/questions/78905687/g-13-the-isystem-flag-seems-to-work-incorrectly-with-optimization-enabled

g++ 13 broke the flag, I think. There are multiple sightings of this online.

Yes, it was deliberately changed in gcc 12 - see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119388 .

There is the trick in configure.ac, to make boost system. And similar more complex subst for gerbv. Recently I was trying to add mingw64 package for gerbv and found this trick is not always works in windows world.

Comment thread .github/workflows/ci.yml
Comment on lines -40 to -43
boost: 1_66
compiler: g++-10
geos: 'main'
code_coverage: "--enable-code-coverage"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, okay. Well, good to know. This can be fixed in a different PR one day.

Comment thread .github/workflows/ci.yml
Comment thread gerberimporter_tests.cpp
@eyal0
Copy link
Copy Markdown
Contributor

eyal0 commented Nov 21, 2025

It seems like everything is passing. Ready to merge?

@mar0x
Copy link
Copy Markdown
Contributor Author

mar0x commented Nov 24, 2025

It seems like everything is passing. Ready to merge?

Yes, please.

@eyal0 eyal0 enabled auto-merge November 24, 2025 14:30
@eyal0 eyal0 disabled auto-merge November 24, 2025 14:34
@eyal0 eyal0 merged commit e251364 into pcb2gcode:master Nov 24, 2025
13 checks passed
@mar0x
Copy link
Copy Markdown
Contributor Author

mar0x commented Nov 26, 2025

Thank you for mention me in Pre-Release! It looks like a personal release now :)

Could you please attach the latest windows binary there.

Just checked CI, this should be done automatically, but failed. Maybe I can fix this as well...

@mar0x mar0x mentioned this pull request Nov 27, 2025
@eyal0
Copy link
Copy Markdown
Contributor

eyal0 commented Dec 10, 2025 via email

eyal0 added a commit to eyal0/pcb2gcode that referenced this pull request Jan 13, 2026
In pcb2gcode#730, we accidentally didn't update the integration tests to run
when code coverage was enabled.  This caused us to lose a bunch of
coverage.

We'll reverse this.  We'll also try to be broader about when we
running integration tests, for stricter testing.
eyal0 added a commit to eyal0/pcb2gcode that referenced this pull request Jan 13, 2026
In pcb2gcode#730, we accidentally didn't update the integration tests to run
when code coverage was enabled.  This caused us to lose a bunch of
coverage.

We'll reverse this.  We'll also try to be broader about when we
running integration tests, for stricter testing.
timaydin pushed a commit to timaydin/pcb2gcode that referenced this pull request Jan 27, 2026
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.

3 participants