Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CI: Linux arm64 #166

Merged
merged 1 commit into from
Jan 20, 2025
Merged

CI: Linux arm64 #166

merged 1 commit into from
Jan 20, 2025

Conversation

kassane
Copy link
Contributor

@kassane kassane commented Jan 18, 2025

@floooh
Copy link
Owner

floooh commented Jan 18, 2025

Nice! I have a couple other PRs to take care of first but I'll try to look into this PR 'soon-ish'.

@kassane
Copy link
Contributor Author

kassane commented Jan 18, 2025

In fact, deployment will still need to be improved to avoid artifact conflicts on Linux.
However, it may require adjustments to the fips repo.

@floooh
Copy link
Owner

floooh commented Jan 18, 2025

The selection of the correct executable happens here:

https://github.com/floooh/sokol-tools-bin/blob/d80b1d8f20fef813092ba37f26723d3880839651/fips-files/generators/SokolShader.py#L18-L35

(e.g. see the code block which selects between the ARM and Intel version on macOS).

We probably don't need to introduce new fips build-configs like on macOS, because it isn't a cross-compilation scenario (as far as I currently understand it).

@kassane
Copy link
Contributor Author

kassane commented Jan 18, 2025

deployment will still need to be improved to avoid artifact conflicts on Linux.

🤦 now, renamed not found artifact!!!

ci: https://github.com/kassane/sokol-tools/actions/runs/12844591828/job/35817901710

Error: Unable to download artifact(s): Artifact not found for name: linux-ninja-release
        Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
        For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md

I also tried rename in dockerfile fips build linux-ninja-release to fips build linux-$(uname -m)-ninja-release, but get error!

@kassane
Copy link
Contributor Author

kassane commented Jan 18, 2025

fixed and artifacts generated:
my deploy test: https://github.com/kassane/sokol-tools/actions/runs/12846441876

Merge?

@floooh
Copy link
Owner

floooh commented Jan 18, 2025

There's two different directory names used here:

https://github.com/kassane/sokol-tools/actions/runs/12846441876/job/35821783093

bin/linux_aarch64 vs bin/linux_arm64 (I also noticed this arm64 vs aarch64 mixup in other places, I would suggest using arm64 everywhere to be consistent with the Mac version)

@kassane
Copy link
Contributor Author

kassane commented Jan 18, 2025

There's two different directory names

https://github.com/kassane/sokol-tools/actions/runs/12846857096

@floooh
Copy link
Owner

floooh commented Jan 20, 2025

I'll merge the PR but will change all occurances of aarch64 to arm64 (that's what I mean with being consistent to the macos version) :)

@kassane
Copy link
Contributor Author

kassane commented Jan 20, 2025

I'll merge the PR but will change all occurances of aarch64 to arm64

Wait... Hasn't it been fixed already? Did I miss something?

@floooh
Copy link
Owner

floooh commented Jan 20, 2025

I renamed the CI step from linux-aarch64-ninja-release to linux-arm64-ninja-release and the directory name from bin/linux_aarch64/ to bin/linux_arm64/ (while at it I also renamed the step name linux-x86_64-ninja-release to linux-x64-ninja-release.

@floooh floooh merged commit c083df6 into floooh:master Jan 20, 2025
4 checks passed
@floooh
Copy link
Owner

floooh commented Jan 20, 2025

E..g this commit:

8beb9ea

...looking at the CI now to check if everything is working. Thanks for the PR (ah and I'll also add a changelog entry)

@floooh
Copy link
Owner

floooh commented Jan 20, 2025

@floooh
Copy link
Owner

floooh commented Jan 20, 2025

OK i guess that worked:

image

(be aware though that the new exec is under bin/linux_arm64, not bin/linux_aarch64)

@floooh
Copy link
Owner

floooh commented Jan 20, 2025

@kassane do you have a linux-arm64 machine around? I thought I could use my old Raspi but that's only 32-bits :)

If yes, could you check in python3 what's returned here?

import platform
platform.machine()

(on ARM Macs this returns the string arm64 but I wonder what's returned on Linux).

This is needed to fix the executable selection here:

https://github.com/floooh/sokol-tools-bin/blob/176fe04861f57921a365853964961b3f29f24363/fips-files/generators/SokolShader.py#L18-L35

@kassane
Copy link
Contributor Author

kassane commented Jan 20, 2025

o you have a linux-arm64 machine around?

@floooh , my rpi4b

Ubuntu:

$ uname -a
Linux ubuntu 5.15.0-1034-raspi #37-Ubuntu SMP PREEMPT Mon Jul 17 10:02:14 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
$ python3 
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.machine()
'aarch64'

@kassane kassane deleted the linux-arm64 branch January 20, 2025 15:54
@floooh
Copy link
Owner

floooh commented Jan 20, 2025

Oki thanks, I also get aarch64 in a Linux ARM64 Docker image. But I guess I will just check against both arm64 and aarch64 just to be sure:

floooh/sokol-tools-bin@c37e663

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants