-
Notifications
You must be signed in to change notification settings - Fork 173
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
Linux arm build #1465
Linux arm build #1465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! I made a few comments, but nothing at all blocking approval
# This line adds a comment to our version source file to prompt cabal/GHC to rebuild Version.hs. | ||
echo "{- $GITHUB_RUN_ID -}" >> src/App/Version.hs | ||
cabal update | ||
cabal build --project-file="$PROJECT_FILE" all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is getting rid of the second attempt at a build that we used to do, like this:
$RUN_CMD || $RUN_CMD
Just double-checking that this is not something we want to keep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. Honestly I don't think I've ever seen the issue in the comment before - I think it's a holdover from a while ago. We can always add it back in in the future if needed. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good to me. No need to leave it in if we don't need it, and it's easy to add back
@@ -12,7 +12,7 @@ tikv-jemallocator = { version = "0.5.4", optional = true } | |||
clap = { version = "4.3.21", features = ["derive", "env", "cargo"] } | |||
stable-eyre = "0.2.2" | |||
srclib = { version = "*", git = "https://github.com/fossas/foundation-libs" } | |||
snippets = { version = "0.1.3", git = "https://github.com/fossas/foundation-libs", features = ["lang-all"] } | |||
snippets = { version = "0.1.3", tag = "v0.1.3", git = "https://github.com/fossas/lib-snippets", features = ["lang-all"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this just something we missed updating previously? It doesn't seem related to this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't related directly. When I was trying to get the rust deps to build I was having trouble and for one of the issues I had I tried updating this library because I thought I might have to make some changes to it. I just kept this bit since it didn't seem to be hurting anything. If you feel strongly about it I can delete.
4666f7f
to
70026e0
Compare
Overview
This PR is to add an ARM Linux binary. It's kind of complicated because of a few restrictions that I had to work within:
The basic approach I had to take here was to run the JS actions inside the default Ubuntu Linux ARM image and then run individual build steps inside the
haskell-static-alpine
image. One unfortunate side-effect of this is that some steps aren't broken out individually in GHA - instead they run all together as part of abuild.sh
script. I couldn't really see how to avoid this. I made the script output each command it runs so it shouldn't be too bad to follow though.The
build-all.yml
workflow is kind of messy right now. I would really like refactor it but I think it's out of scope for this PR.Acceptance criteria
install-latest.sh
will install the ARM binary for Linux if necessary.install-latest.sh
exits with an error if you try to install a version of the CLI for which an ARM binary doesn't exist on Linux.Testing plan
I mainly viewed the actions output and tested by downloading binaries from this draft release.
I tested by using subcommands that would use dependent binaries as well such as:
and
You can run an emulated Linux arm system in docker with a command like:
Note that if you are running this on x86_64 that emulating an arm machine will slow things down. If you want to test on a more native machine I have an EC2 instance I can get you access to.
Additionally, I tested
install-latest.sh
by giving it versions that didn't have valid Linux ARM binaries and viewing the error messages. Testing the actual download is harder because it would require me to actually make a release, but I verified the generated URLs would be what I'd expect. The worst-case for this is that customers using the CLI in CI are slightly delayed in getting to deploy on Linux ARM systems. It should not break existing workflows.Risks
Mainly I want to make sure I didn't get my wires crossed with filenames and such (e.g. putting an amd64 binary in the arm64 archive, etc.). In my testing I didn't see cases where I had but it'd be good to have another set of eyes.
Metrics
None
References
Checklist
docs/
.docs/README.ms
and gave consideration to how discoverable or not my documentation is.Changelog.md
. If this PR did not mark a release, I added my changes into an# Unreleased
section at the top..fossa.yml
orfossa-deps.{json.yml}
, I updateddocs/references/files/*.schema.json
AND I have updated example files used byfossa init
command. You may also need to update these if you have added/removed new dependency type (e.g.pip
) or analysis target type (e.g.poetry
).docs/references/subcommands/<subcommand>.md
.