haxe icon indicating copy to clipboard operation
haxe copied to clipboard

[ci] add hlc test on Windows using MSBuild

Open yuxiaomao opened this issue 1 year ago • 6 comments

This PR add hlc test on Windows. It depends on the template that I just added to hashlink: https://github.com/HaxeFoundation/hashlink/commit/af63dba3e6b169d19e3d670ca68ee61bd43fa38d

WARNING: I disabled manually all workflow except windows64-test on hl, just to get a fast result, it uses nightly haxe. Need to revert it before merge: run cd extra/github-actions && haxe build.hxml, then push .github/workflows/main.yml.

It fail at some unit tests for now, should probably fix them some day.

yuxiaomao avatar Jul 24 '24 09:07 yuxiaomao

Good initiative!

Simn avatar Jul 24 '24 09:07 Simn

It's ready for review and we can rerun it if we need to check current haxe with hl/c on windows. I marked it as draft to prevent merge (until we decide to skip some test or fixed the bugs).

Currently the result is

results: SOME TESTS FAILURES (success: false)
unit.spec.TestReflect
  test: FAILURE ...............................................F.............................................
    line: 97, expected false
unit.TestInt64
  testShifts: FAILURE .......FFF
    line: 492, expected true
    line: 492, expected true
    line: 492, expected true
unit.issues.Issue10752
  test: FAILURE F...
    line: 9, expected 2 but it is 0
unit.issues.Issue6705
  test: FAILURE .............................F
    line: 64, expected 2 but it is 0
  test1: FAILURE .............................F
    line: 246, expected 2 but it is 0
  testButEverythingIsDynamic: FAILURE .............................F
    line: 113, expected 2 but it is 0

Additionally, I have tested on local with optimization disabled

results: SOME TESTS FAILURES (success: false)
unit.spec.TestReflect
  test: FAILURE ...............................................F.............................................
    line: 97, expected false
unit.issues.Issue6705
  test: FAILURE .............................F
    line: 64, expected 2 but it is 0
  test1: FAILURE .............................F
    line: 246, expected 2 but it is 0
  testButEverythingIsDynamic: FAILURE .............................F
    line: 113, expected 2 but it is 0

yuxiaomao avatar Jul 24 '24 09:07 yuxiaomao

It's ready for review

What do you mean exactly? I would think that the next step would be to address the unit test failures one by one.

Simn avatar Jul 25 '24 05:07 Simn

Sorry, I wasn't clear. I mean the CI code here is complete for me (if we add fix to hlc, it's to hlc and not to the CI), it can be merged - after enable main.yml - if we decided to skip those failure and fix them another time. I'll check those failure when I have time.

yuxiaomao avatar Jul 25 '24 06:07 yuxiaomao

I have fixed some failures caused by Visual Studio's optimization (merging identical function) in the templates: https://github.com/HaxeFoundation/hashlink/commit/9cf7efa118409bef3a7c263bffc36da107751e60

Now there is only int shift overflow problems ("caused by" MaxSpeed in C compiler optimization settings). Maybe I'll need to implement the shift somehow in hl2c and force compiler to keep the behavior?

results: SOME TESTS FAILURES (success: false)
unit.issues.Issue10752
  test: FAILURE F...
    line: 9, expected 2 but it is 0
unit.TestInt64
  testShifts: FAILURE .......FFF
    line: 377, expected true
    line: 378, expected true
    line: 379, expected true

yuxiaomao avatar Aug 08 '24 09:08 yuxiaomao

With the last commit, it does not fail locally with Visual Studio GUI/MSBuild on both 2019 Community and 2022 Community, strange.

yuxiaomao avatar Aug 08 '24 10:08 yuxiaomao

I would like to see this completed. Feels like we were almost done...

Simn avatar Apr 06 '25 05:04 Simn

I'll wait the haxe_latest.zip available before trigger another CI run. I think if it does not pass with -O2 I can set it to -O0, it's not the best solution but will be the same as for Linux/Mac.

yuxiaomao avatar Apr 07 '25 07:04 yuxiaomao

Turns out that I forgot to compile haxe in this CI after my change to hl2c. It seems to work now.

Note also that when I tried to run cd extra/github-actions && haxe build.hxml, there are some timeout-limit which are not in the files used for generation (e.g. the line in e66dd5b).

yuxiaomao avatar Apr 07 '25 10:04 yuxiaomao