SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

Please provide linux/arm64 Binary Release

Open naraesk opened this issue 3 years ago • 11 comments

New Issue Checklist

Describe the bug

Since v5.6 swift releases arm64 binaries (aarch64) for Linux/Ubuntu. The swiftlint binary for Linux only runs on amd64. For arm, I have to build swiftlint myself. This is of course possible, but it would be great if arm64 binaries would be provided. This would simplify the integration into arm-based docker containers and Github Actions.

Environment

  • SwiftLint version (run swiftlint version to be sure)? 5.7.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? building from source

naraesk avatar Nov 08 '22 18:11 naraesk

Yes this would be great, and we're already using Docker Buildx so in theory it should be possible to update our CI to run that.

I tried a few months ago but the Swift 5.6.x Docker images didn't come in arm64 flavours at the time. Now I think the Swift 5.7 images do have an arm64 variant. I'll give this another shot.

jpsim avatar Nov 08 '22 18:11 jpsim

Great, thanks for already working on this. :-)

To clarify, I'm primarily interested in an arm64 binary published on https://github.com/realm/SwiftLint/releases which I can integrate into my own docker container.

naraesk avatar Nov 09 '22 08:11 naraesk

A grate blog post can be found https://www.polpiella.dev/binary-targets-in-modern-swift-packages

doozMen avatar Nov 09 '22 11:11 doozMen

The Linux binaries in the release assets are generated in Docker, so that’s the first step.

Unfortunately it looks like with QEMU and the default GitHub Actions machines they’re not beefy enough to finish building both architectures, and the CI job appears to be getting killed.

jpsim avatar Nov 09 '22 11:11 jpsim

Yes I have similar issues, ... shitty

doozMen avatar Nov 09 '22 11:11 doozMen

I managed to fix it by manually building an artifactbundle as described here https://github.com/airbnb/swift/discussions/197#discussioncomment-4109195

Would it be possible for swiftlint to provide this in the future?

doozMen avatar Nov 10 '22 16:11 doozMen

Sorry to hijack/bump. I noticed newer versions also don't have the Linux x86 binary. (We use SwiftLint in GitHub actions with the Linux runner as it's a lot cheaper than macOS runners.)

Is there anything I can help with?

If it's too complicated for the foreseeable future, may I suggest building the Linux versions in a separate GitHub action?

inket avatar Nov 28 '22 11:11 inket

Sorry to hijack/bump. I noticed newer versions also don't have the Linux x86 binary. (We use SwiftLint in GitHub actions with the Linux runner as it's a lot cheaper than macOS runners.)

I missed a manual step when releasing 0.50.1, the x86 Linux binary is up now: https://github.com/realm/SwiftLint/releases/tag/0.50.1

Direct link: https://github.com/realm/SwiftLint/releases/download/0.50.1/swiftlint_linux.zip

jpsim avatar Nov 28 '22 12:11 jpsim