Skip to content

Add cross-compile workflow with out-of-source build #16545

Closed
hsbt wants to merge 4 commits intoruby:masterfrom
hsbt:cross-compile-action
Closed

Add cross-compile workflow with out-of-source build #16545
hsbt wants to merge 4 commits intoruby:masterfrom
hsbt:cross-compile-action

Conversation

@hsbt
Copy link
Copy Markdown
Member

@hsbt hsbt commented Mar 25, 2026

We don't have CI matrix for out-of-source build & cross compile. This workflow helps to detect issues like for #16456 at early time.

Copilot AI review requested due to automatic review settings March 25, 2026 06:51
@hsbt hsbt force-pushed the cross-compile-action branch from 06b512b to 6dcb554 Compare March 25, 2026 06:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated CI workflow to exercise out-of-source builds and cross-compilation, to catch cross-compile regressions earlier (e.g., issues like #16456).

Changes:

  • Introduces a new crosscompile GitHub Actions workflow.
  • Builds a native “baseruby”, then configures and builds Ruby for an aarch64 GNU/Linux host in an out-of-source build/ directory.
  • Verifies the produced installed binary is an aarch64-targeted executable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +52 to +61
- uses: ./.github/actions/setup/directories
with:
srcdir: src
builddir: build
makeup: true

- name: Install cross-compilation toolchain
run: |
sudo dpkg --add-architecture ${{ matrix.arch }}
cat <<'EOS' | sudo tee /etc/apt/sources.list.d/ports-${{ matrix.arch }}.list
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

.github/actions/setup/directories may generate src/configure by running ./autogen.sh (it only does so when autoreconf is available). Since this repo does not ship a pre-generated configure script, installing autoconf/autoreconf after this step can leave ../src/configure missing and make the workflow dependent on whatever happens to be preinstalled on the runner. Move the toolchain install (at least autoconf, and anything else needed for autoreconf) before setup/directories, or ensure setup/directories runs after autoconf is installed.

Copilot uses AI. Check for mistakes.
@launchable-app

This comment has been minimized.

@hsbt hsbt force-pushed the cross-compile-action branch 7 times, most recently from a9ea32c to af99f0b Compare March 26, 2026 00:26
hsbt and others added 3 commits March 26, 2026 09:40
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hsbt hsbt force-pushed the cross-compile-action branch from af99f0b to 748e2b7 Compare March 26, 2026 00:42
@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented Mar 30, 2026

This workflow has been merged at #16456

@hsbt hsbt closed this Mar 30, 2026
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.

3 participants