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

Swift: fix ARM build and add it to CI #16025

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Mar 22, 2024

As pointed out in bazelbuild/bazel#21768, bazel 7 moved multi-arch macOS toolchain support to apple_support, so building Swift (which must target x86_64 for now) was broken. Internally in the codeql CLI we were unaffected as we use a custom bundled toolchain.

This fixes building from this repository.

Moreover, various CI fixes have been added:

  • added an ARM build to check this will keep on working for development on ARM machines
  • removed the pretty much non-functioning shot at bazel cache, we will come back to it when we have a broader solution
  • replaced sharing the extractor pack via cache with uploading and downloading it, using zstd compression

@github-actions github-actions bot added the Swift label Mar 22, 2024
@redsun82 redsun82 force-pushed the redsun82/swift-fix-arm-build branch 2 times, most recently from 08534e9 to 470b816 Compare March 22, 2024 16:05
@redsun82 redsun82 closed this Mar 22, 2024
@redsun82 redsun82 reopened this Mar 22, 2024
@redsun82 redsun82 force-pushed the redsun82/swift-fix-arm-build branch from 470b816 to 9bac975 Compare March 22, 2024 16:15
@redsun82 redsun82 marked this pull request as ready for review March 22, 2024 16:17
@redsun82 redsun82 requested review from a team as code owners March 22, 2024 16:17
@redsun82 redsun82 requested a review from criemen March 22, 2024 16:17
criemen
criemen previously approved these changes Mar 22, 2024
Copy link
Collaborator

@criemen criemen left a comment

Choose a reason for hiding this comment

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

LGTM!

redsun82 added 6 commits April 3, 2024 08:36
As pointed out in bazelbuild/bazel#21768,
bazel 7 moved multi-arch macOS toolchain support to `apple_support`,
so building Swift (which must target `x86_64` for now) was broken.
Internally in the codeql CLI we were unaffected as we use a custom
bundled toolchain.

This fixes building from this repository.
Also:
* removed the pretty much non-functioning bazel cache, will come back to
  it when we have a broader solution
* replaced sharing the extractor pack via cache with uploading and
  downloading it
The problems running on arm are concerning, but may be caused by not
building with the internal macOS toolchain. We'll do separate work
internally to investigate and possibly fix that.

In the meantime, we can keep testing on intel as is currently done in
main.
They are now run internally by QLucie.
@redsun82 redsun82 force-pushed the redsun82/swift-fix-arm-build branch from 464143c to d0644d0 Compare April 3, 2024 06:36
@redsun82 redsun82 marked this pull request as draft April 10, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants