codecov / uploader

Codecov's universal binary uploader.
https://docs.codecov.com/docs/codecov-uploader
Apache License 2.0
105 stars 74 forks source link

Support aarch64 / arm64 arch #523

Closed drazisil-codecov closed 10 months ago

drazisil-codecov commented 2 years ago

Is your feature request related to a problem? Please describe. Currently the uploader does not work under arm64 docker images

Describe the solution you'd like Support is needed.

Additional context

CircleCi machine executor running --platform linux/arm64 when launching the docker image.

@drazisil-codecov has more context

drazisil-codecov commented 2 years ago

https://github.com/codecov/uploader/issues/347

drazisil-codecov commented 2 years ago

CircleCI does not yet support M1 builds.

https://support.circleci.com/hc/en-us/articles/360056461452-Apple-M1-Apple-Silion-Support-on-CircleCI

kayoub5 commented 2 years ago

CircleCI does not yet support M1 builds.

https://support.circleci.com/hc/en-us/articles/360056461452-Apple-M1-Apple-Silion-Support-on-CircleCI

@drazisil-codecov this ticket is about Linux ARM Support, that is supported in CircleCI, see https://circleci.com/execution-environments/arm/ we even have a job for it running in https://github.com/dotpcap/sharppcap/blob/master/.circleci/config.yml#L42

AlexWayfer commented 1 year ago

Cirrus CI is migrating already from Intel to M1: https://cirrus-ci.org/blog/2022/11/08/sunsetting-intel-macos-instances/

andyleclair commented 1 year ago

Is there any motion on this? We're trying to use codecov on CircleCI ARM executors

thomasrockhu-codecov commented 1 year ago

@andyleclair I got a PR out here which will hopefully create the right build.

andyleclair commented 1 year ago

Nice! I'm out on paternity leave right now, but maybe @humberaquino could test it out for you all if you need that

thomasrockhu-codecov commented 1 year ago

@humberaquino if you're willing

I created an asset here (https://app.circleci.com/pipelines/github/codecov/uploader/4170/workflows/56ff966f-d2b7-43d1-9128-b6a59b0c23ba/jobs/40761/artifacts) named out/codecov-aarch64.

You should be able to download that file, chmod +x <filename>, and run it in CI. Let me know if that solves your issue and we'll work to get it supported.

AlexWayfer commented 1 year ago

Is there a new release with it?

I mean, especially https://uploader.codecov.io/latest/macos/codecov

I'm getting:

codecov/uploader
/var/folders/s0/b8snf7qj1479hhmzr90n5s4m0000gn/T/scriptsb80b6fb3eabbf315935f249b575dd5ad.sh: line 5: codecov/uploader: cannot execute binary file
Exit status: 126

https://github.com/filewatcher/filewatcher/pull/257/checks?check_run_id=16174741063

thomasrockhu-codecov commented 1 year ago

@AlexWayfer, aarch64 builds are located here: https://uploader.codecov.io/latest/aarch64/codecov

AlexWayfer commented 1 year ago

@AlexWayfer, aarch64 builds are located here: https://uploader.codecov.io/latest/aarch64/codecov

OK, still the same error: https://cirrus-ci.com/task/5491238154010624

cirrus-ci com_task_5491238154010624 (1)

thomasrockhu-codecov commented 1 year ago

@AlexWayfer did you also run chmod +x ./codecov?

AlexWayfer commented 1 year ago

@AlexWayfer did you also run chmod +x ./codecov?

Of course, the whole script: https://github.com/filewatcher/filewatcher/commit/fbc99e2bf36195c9ae3476ebc28d719505cdaa16#diff-266f128a156070b8d24c519331ba96b1b3ef940eefcdc7b3202c6b0ac88fd29dL13-L23

thomasrockhu-codecov commented 1 year ago

@AlexWayfer I'm not too well-versed with CirrusCI, so I have a few comments, let me know if this makes any sense

AlexWayfer commented 12 months ago

@AlexWayfer I'm not too well-versed with CirrusCI, so I have a few comments, let me know if this makes any sense

  • I don't see a curl -s https://uploader.codecov.io/latest/${CODECOV_OS}/codecov -o codecov/uploader line or a populate_script line item. It does say populate_script_cache. Could that be the problem?
  • 17Mb seems like the wrong size, it should be closer to 40.5Mb

Interesting observation.

I had done task cache clearing, probably it has not helped.

Now I've cleared cache of all the project.

https://cirrus-ci.com/task/5628663048175616

image

Do I need to write something more specific? For example, aarch64 instead of ENV variable interpolation. Or some size/checksum outputs.

@fkorotkov, I'd like to see your help if possible.

AlexWayfer commented 11 months ago

@AlexWayfer I'm not too well-versed with CirrusCI, so I have a few comments, let me know if this makes any sense

  • I don't see a curl -s https://uploader.codecov.io/latest/${CODECOV_OS}/codecov -o codecov/uploader line or a populate_script line item. It does say populate_script_cache. Could that be the problem?
  • 17Mb seems like the wrong size, it should be closer to 40.5Mb

Without cache, explicit script: https://cirrus-ci.com/task/5167047781384192?logs=codecov#L6

39 MB. Still cannot execute binary file.

Similar fresh report: https://github.com/codecov/uploader/issues/347#issuecomment-1737319552

thomasrockhu-codecov commented 10 months ago

Going to handle the issue here: https://github.com/codecov/feedback/issues/141