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 aarch64/arm64 to CI #1036

Merged
merged 2 commits into from
Jan 5, 2025
Merged

Add aarch64/arm64 to CI #1036

merged 2 commits into from
Jan 5, 2025

Conversation

NickeZ
Copy link
Contributor

@NickeZ NickeZ commented Jan 3, 2025

fixes #1032

This is a proof of concept to build and test arm64 executables. If this concept is acceptable then I would like to refactor to a "strategy matrix" build.

edit: The last build in my repo is successful: https://github.com/NickeZ/cbindgen/actions/runs/12596962803/job/35109043466, so hopefully this rebased version also works.

Copy link
Collaborator

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Looks reasonable at a glance, yeah, but using a matrix would be better indeed.

@NickeZ
Copy link
Contributor Author

NickeZ commented Jan 3, 2025

Looks reasonable at a glance, yeah, but using a matrix would be better indeed.

Would you mind approving the ci job to run?

@emilio
Copy link
Collaborator

emilio commented Jan 3, 2025

Gah, for some reason I was enrolled on some github experiment that didn't show the "approve and run" button.

@emilio
Copy link
Collaborator

emilio commented Jan 3, 2025

Seems somewhat known given the discussion in https://github.com/orgs/community/discussions/143787.

Github is gradually moving ubuntu-latest to ubuntu-24.04 and the apt
sources look slightly different. My fork and upstream ends up having
different "ubuntu-latest", so I pin it to 24.
@NickeZ NickeZ force-pushed the nickez/build-arm64 branch from 062a6c4 to 9bdf01b Compare January 4, 2025 00:33
@NickeZ
Copy link
Contributor Author

NickeZ commented Jan 4, 2025

Do you prefer that I squash the commits or not?

ps. Github also "screwed" me over, in my fork I get ubuntu-24, whereas here we have ubuntu-22 when we specify ubuntu-latest...

Copy link
Collaborator

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great. I'm a bit unsure about how reliable the cross-arch sources.list stuff is, it seems ideally it shouldn't be needed? But alas, let's try this.

@emilio emilio added this pull request to the merge queue Jan 5, 2025
Merged via the queue into mozilla:master with commit e82815e Jan 5, 2025
3 checks passed
@NickeZ
Copy link
Contributor Author

NickeZ commented Jan 7, 2025

The official repos don't have arm64 and the Ubuntu docker images uses ports.ubuntu.com, so I hope it is maintained.

I tried using "cross" package as well for libc. But then I had issues running the tests that call executables. I guess std::process doesn't work with binfmt or something.

One option would be to call all binary tests with "CARGO_..._RUNNER" if available.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 19, 2025
# 0.28.0

      * Parse unsafe attributes in mozilla/cbindgen#1020
      * Fix local override of enum prefix-with-name by jsgf in mozilla/cbindgen#1006
      * Add rename-all=prefix in mozilla/cbindgen#1021
      * ir: add support for UnsafeCell and SyncUnsafeCell by alekitto in mozilla/cbindgen#1003
      * Implement mangling for arrays in mozilla/cbindgen#1022
      * Fix: Ignore `CARGO_BUILD_TARGET` in tests by bryango in mozilla/cbindgen#1010
      * Newline for each field for constexpr field constants by youknowone in mozilla/cbindgen#988
      * Fix clippy warnings by youknowone in mozilla/cbindgen#1026
      * Add aarch64/arm64 to CI by NickeZ in mozilla/cbindgen#1036
      * Add `unstable_ir` feature flag that makes the ir pub by heesooy in mozilla/cbindgen#1011
      * Support generated a symbols file by TheElectronWill in mozilla/cbindgen#916
zshipko pushed a commit to extism/extism that referenced this pull request Jan 20, 2025
Updates the requirements on
[cbindgen](https://github.com/mozilla/cbindgen) to permit the latest
version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla/cbindgen/releases">cbindgen's
releases</a>.</em></p>
<blockquote>
<h1>0.28.0</h1>
<ul>
<li>Parse unsafe attributes in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1020">mozilla/cbindgen#1020</a></li>
<li>Fix local override of enum prefix-with-name by jsgf in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1006">mozilla/cbindgen#1006</a></li>
<li>Add rename-all=prefix in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1021">mozilla/cbindgen#1021</a></li>
<li>ir: add support for UnsafeCell and SyncUnsafeCell by alekitto in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1003">mozilla/cbindgen#1003</a></li>
<li>Implement mangling for arrays in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1022">mozilla/cbindgen#1022</a></li>
<li>Fix: Ignore <code>CARGO_BUILD_TARGET</code> in tests by bryango in
<a
href="https://redirect.github.com/mozilla/cbindgen/pull/1010">mozilla/cbindgen#1010</a></li>
<li>Newline for each field for constexpr field constants by youknowone
in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/988">mozilla/cbindgen#988</a></li>
<li>Fix clippy warnings by youknowone in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1026">mozilla/cbindgen#1026</a></li>
<li>Add aarch64/arm64 to CI by NickeZ in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1036">mozilla/cbindgen#1036</a></li>
<li>Add <code>unstable_ir</code> feature flag that makes the ir pub by
heesooy in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1011">mozilla/cbindgen#1011</a></li>
<li>Support generated a symbols file by TheElectronWill in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/916">mozilla/cbindgen#916</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla/cbindgen/blob/master/CHANGES">cbindgen's
changelog</a>.</em></p>
<blockquote>
<h1>0.28.0</h1>
<pre><code> * Parse unsafe attributes in
mozilla/cbindgen#1020
* Fix local override of enum prefix-with-name by jsgf in
mozilla/cbindgen#1006
* Add rename-all=prefix in mozilla/cbindgen#1021
* ir: add support for UnsafeCell and SyncUnsafeCell by alekitto in
mozilla/cbindgen#1003
* Implement mangling for arrays in
mozilla/cbindgen#1022
* Fix: Ignore `CARGO_BUILD_TARGET` in tests by bryango in
mozilla/cbindgen#1010
* Newline for each field for constexpr field constants by youknowone in
mozilla/cbindgen#988
* Fix clippy warnings by youknowone in
mozilla/cbindgen#1026
* Add aarch64/arm64 to CI by NickeZ in
mozilla/cbindgen#1036
* Add `unstable_ir` feature flag that makes the ir pub by heesooy in
mozilla/cbindgen#1011
* Support generated a symbols file by TheElectronWill in
mozilla/cbindgen#916
</code></pre>
<h1>0.27.0</h1>
<pre><code>  * Revert: The `Config` struct now has a private member.
* Allow users to specify a crate version for bindings generation
([#901](mozilla/cbindgen#901)).
* Update MSRV to 1.74
([#912](mozilla/cbindgen#912),
[#987](mozilla/cbindgen#987)).
* Support #[deprecated] on enum variants
([#933](mozilla/cbindgen#933)).
* Support integrating the package_version information in a header file
comment ([#939](mozilla/cbindgen#939)).
* Add a language backend
([#942](mozilla/cbindgen#942)).
* Support generics with defaulted args
([#959](mozilla/cbindgen#959)).
* Add `VaList` compatibility
([#970](mozilla/cbindgen#970)).
</code></pre>
<h1>0.26.0</h1>
<pre><code>  * Fix swapping of `&gt;&gt;=` and `&lt;&lt;=` in constants.
* Add support for #[deprecated]
([#860](mozilla/cbindgen#860)).
  * Built-in support for bitflags 2.0.
  * Support for &quot;C-unwind&quot; ABI.
* Generate bindings for non-public extern items if they are
#[no_mangle].
</code></pre>
<h2>0.25.0</h2>
<pre><code>  * Re-release of yanked 0.24.6 as a major release
  * Update MSRV to 1.57
* Support variadic arguments (`...`)
([#805](mozilla/cbindgen#805))
* Add --depfile option
([#820](mozilla/cbindgen#820))
  * Breaking changes: The `Config` struct now has a private member.
</code></pre>
<h2>0.24.6 (YANKED: depfile option was breaking, see <a
href="https://redirect.github.com/mozilla/cbindgen/issues/841">#841</a>)</h2>
<pre><code>  * Update MSRV to 1.57
* Support variadic arguments (`...`)
([#805](mozilla/cbindgen#805))
* Add --depfile option
([#820](mozilla/cbindgen#820))
</code></pre>
<h2>0.24.5</h2>
<pre><code>  * Don't enforce tempfile version.
</code></pre>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mozilla/cbindgen/commit/bd78bbe59b10eda6ef1255e4acda95c56c6d0279"><code>bd78bbe</code></a>
Release 0.28.0</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/8ca9c4c20ff9ca59a3c4f0b068ce3a7da2e02e9e"><code>8ca9c4c</code></a>
tests: Fix symbol file and tests.</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/152f91dee070b1ebc28505b908066c9c418ed50e"><code>152f91d</code></a>
Appease clippy.</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/70b9d7a98084c39dbb5d0f0115d4e5917e2c8f6c"><code>70b9d7a</code></a>
tests: Run rustfmt.</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/87afbf9e01ae8d9190638d4b347676ff7e282d4f"><code>87afbf9</code></a>
Add a way to generate a list of symbols for dynamic linkage, resolves <a
href="https://redirect.github.com/mozilla/cbindgen/issues/907">#907</a></li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/80c50c643a453bd396331b4a8eb17a47f7c6c6b1"><code>80c50c6</code></a>
Add <code>unstable_ir</code> feature flag that makes the ir pub</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/e82815e99a96d9510316855583d4fef094396f10"><code>e82815e</code></a>
Refactor arm64 build to matrix strategy</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/a5e1443a4503826036bfaa6a349fc0b05d188d61"><code>a5e1443</code></a>
Add aarch64/arm64 to CI</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/b9b8f8878ac272935193c449066b88c0cb94ced2"><code>b9b8f88</code></a>
Fix clippy warnings</li>
<li><a
href="https://github.com/mozilla/cbindgen/commit/89a9faa97cc267e90fc95a1cc6177a001aed5b51"><code>89a9faa</code></a>
newlines for constexpr</li>
<li>Additional commits viewable in <a
href="https://github.com/mozilla/cbindgen/compare/v0.27.0...0.28.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

Adding arm64 builds in releases?
2 participants