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

ci: Add Windows Clang builder #412

Merged
merged 29 commits into from
Jul 16, 2024
Merged

ci: Add Windows Clang builder #412

merged 29 commits into from
Jul 16, 2024

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Jul 8, 2024

This adds a Windows native msys2 builder to CI which uses the clang64 environment and build the whole dependency chain with clang instead of gcc.

The dependencies are utilizing the makepkg build system and using the patches directly come from msys2. This way we can workaround known quirks for clang on windows easier and only care about to actually modify the build configs and pin to specific version we want.

Currently, most of the packages are pulled with versioned tarball instead of direct git commit pin.

This version includes all dependencies that the one built by our current docker builder has.

Current quirk of this version is that the --enable-shared option cannot be enabled for this as clang 's lld is not happy with the libfreetype being linked multiple times in a shared library, and we have to use static build all the way.

Changes

Issues

@gnattu
Copy link
Member Author

gnattu commented Jul 8, 2024

Currently we have to commit directly to the .gitattribute file due to the checkout maintainer's personal opinion to not add the option to force Unix LF Line ending: actions/checkout#135. This does not fit our patch pushing workflow perfectly but this is probably fine because the upstream has not changed that file for 7 years.

@gnattu gnattu marked this pull request as ready for review July 8, 2024 19:41
@gnattu gnattu changed the title [WIP] Add Windows Clang builder ci: Add Windows Clang builder Jul 8, 2024
@gnattu gnattu requested a review from a team July 8, 2024 19:41
@nyanmisaka
Copy link
Member

Currently we have to commit directly to the .gitattribute file due to the checkout maintainer's personal opinion to not add the option to force Unix LF Line ending: actions/checkout#135. This does not fit our patch pushing workflow perfectly but this is probably fine because the upstream has not changed that file for 7 years.

Does this workaround still work? actions/checkout#135 (comment)

    steps:
      - name: Set git to use LF
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf

      - uses: actions/checkout@v2

@gnattu
Copy link
Member Author

gnattu commented Jul 14, 2024

Does this workaround still work? actions/checkout#135 (comment)

    steps:
      - name: Set git to use LF
        run: |
          git config --global core.autocrlf false
          git config --global core.eol lf

      - uses: actions/checkout@v2

No. I've tried it with multiple variants and it insists to checkout as crlf, and the maintainer of the checkout CI action has strong preference on directly committing it into the .gitattribute and is unlikely to fix this workaround if it does not work.

Copy link
Contributor

@Shadowghost Shadowghost left a comment

Choose a reason for hiding this comment

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

LGTM as long as it works 😄

@nyanmisaka
Copy link
Member

The libass/vf_subtitles seems unhappy: (font provider fontconfig)

[Parsed_subtitles_0 @ 0000017bddca6380] libass API version: 0x1703000
[Parsed_subtitles_0 @ 0000017bddca6380] libass source: tarball: 0.17.3
[Parsed_subtitles_0 @ 0000017bddca6380] Shaper: FriBidi 1.0.15 (SIMPLE) HarfBuzz-ng 9.0.0 (COMPLEX)
Fontconfig error: Cannot load default config file: No such file: (null)
[Parsed_subtitles_0 @ 0000017bddca6380] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file: No such file: (null)
[Parsed_subtitles_0 @ 0000017bddca6380] Using font provider fontconfig

mingw build: (font provider directwrite (with GDI))

[Parsed_subtitles_0 @ 0000017c4edede80] libass API version: 0x1703000
[Parsed_subtitles_0 @ 0000017c4edede80] libass source: commit: 0.17.3-0-ge46aedea0a0d17da4c4ef49d84b94a7994664ab5
[Parsed_subtitles_0 @ 0000017c4edede80] Shaper: FriBidi 1.0.15 (SIMPLE) HarfBuzz-ng 8.5.0 (COMPLEX)
[Parsed_subtitles_0 @ 0000017c4edede80] Using font provider directwrite (with GDI)

@gnattu
Copy link
Member Author

gnattu commented Jul 16, 2024

mingw build: (font provider directwrite (with GDI))

I enabled directwrite and libass is working now.

Copy link
Member

@nyanmisaka nyanmisaka left a comment

Choose a reason for hiding this comment

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

YOLO

@gnattu gnattu merged commit 27d2232 into jellyfin Jul 16, 2024
27 checks passed
@gnattu gnattu deleted the win64-clang branch July 16, 2024 12:18
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