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

Add arm64 binary #127

Merged
merged 3 commits into from
Mar 1, 2024
Merged

Add arm64 binary #127

merged 3 commits into from
Mar 1, 2024

Conversation

koppor
Copy link
Contributor

@koppor koppor commented Feb 28, 2024

Fixes #126 with a "quick hack" by adding an arm64 binary - and falling back to it when x86 does not work.

I created the binary using the following command:

env GOOS=linux GOARCH=arm64 go build -o apt_query-arm64

lib.sh Outdated
@@ -103,7 +103,7 @@ function get_normalized_package_list {
| sed 's/[,\]/ /g; s/\s\+/ /g; s/^\s\+//g; s/\s\+$//g' \
| sort -t' ')
local script_dir="$(dirname -- "$(realpath -- "${0}")")"
${script_dir}/apt_query normalized-list ${packages}
${script_dir}/apt_query normalized-list ${packages} || ${script_dir}/apt_query-arm64 normalized-list ${packages}

Choose a reason for hiding this comment

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

I think we need sth like this:

  # Determine the architecture
  local architecture=$(dpkg --print-architecture)

  # Use apt_query_arm64 for arm architecture
  if [ "${architecture}" == "arm64" ]; then
    ${script_dir}/apt_query_arm64 normalized-list ${packages}
  else
    ${script_dir}/apt_query normalized-list ${packages}
  fi

@koppor
Copy link
Contributor Author

koppor commented Feb 29, 2024

Done. Note that I used a dash instead of an underscore to separate arm64.

@atilsensalduz
Copy link

Done. Note that I used a dash instead of an underscore to separate arm64.

thanks a bunch mate 🚀

Copy link
Owner

@awalsh128 awalsh128 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Can you provide access to the action yaml so I can dupe the environment? I can put it on the CI so it can get tests before I issue a release.

@awalsh128 awalsh128 merged commit a6c3917 into awalsh128:master Mar 1, 2024
1 check passed
@koppor
Copy link
Contributor Author

koppor commented Mar 1, 2024

@awalsh128 The full yaml is a bit lengthy: https://github.com/JabRef/jabref/blob/main/.github/workflows/deployment-jdk-ea.yml

The core is to sign up at BuildJet to use their arm runners: https://buildjet.com/for-github-actions

runs-on: buildjet-2vcpu-ubuntu-2204

@awalsh128 awalsh128 mentioned this pull request Mar 3, 2024
@awalsh128
Copy link
Owner

Created #128 to track this and the release.

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

Successfully merging this pull request may close these issues.

Exec Format Error on ARM Runner with apt_query
3 participants