mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 00:46:26 +08:00
Bumps the github-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [taiki-e/install-action](https://github.com/taiki-e/install-action). Bumps the github-actions group with 1 update in the /.github/actions/setup/directories directory: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) Updates `taiki-e/install-action` from 2.83.4 to 2.84.0 - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/taiki-e/install-action/compare/07b4745e0c39a41822af610387492e3e53aa222b...a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9) Updates `actions/checkout` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: taiki-e/install-action dependency-version: 2.84.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
124 lines
3.7 KiB
YAML
124 lines
3.7 KiB
YAML
name: Cross compile
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'doc/**'
|
|
- '**/man/*'
|
|
- '**.md'
|
|
- '**.rdoc'
|
|
- '**/.document'
|
|
- '.*.yml'
|
|
pull_request:
|
|
# Do not use paths-ignore for required status checks
|
|
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks
|
|
merge_group:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
|
|
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
make:
|
|
name: make (${{ matrix.host }} host on ${{ matrix.build }})
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- host: aarch64-linux-gnu
|
|
arch: arm64
|
|
build: x86_64-linux-gnu
|
|
runs-on: ubuntu-24.04
|
|
file_arch: ARM aarch64
|
|
- host: x86_64-linux-gnu
|
|
arch: amd64
|
|
build: aarch64-linux-gnu
|
|
runs-on: ubuntu-24.04-arm
|
|
file_arch: x86-64
|
|
fail-fast: false
|
|
|
|
env:
|
|
GITPULLOPTIONS: --no-tags origin ${{ github.ref }}
|
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
if: >-
|
|
${{!(false
|
|
|| contains(github.event.head_commit.message, '[DOC]')
|
|
|| contains(github.event.pull_request.title, '[DOC]')
|
|
|| contains(github.event.pull_request.labels.*.name, 'Documentation')
|
|
|| (github.event.pull_request.user.login == 'dependabot[bot]')
|
|
)}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
sparse-checkout-cone-mode: false
|
|
sparse-checkout: /.github
|
|
persist-credentials: false
|
|
|
|
- uses: ./.github/actions/setup/directories
|
|
with:
|
|
srcdir: src
|
|
builddir: build
|
|
makeup: true
|
|
|
|
- name: Setup cross-compilation toolchain sources
|
|
run: |
|
|
native_arch=$(dpkg --print-architecture)
|
|
# Restrict existing sources to native arch
|
|
sudo sed -i '/^Architectures:/d' /etc/apt/sources.list.d/ubuntu.sources
|
|
sudo sed -i "/^Types:/a Architectures: ${native_arch}" /etc/apt/sources.list.d/ubuntu.sources
|
|
# Add cross-arch sources
|
|
if [ "${{ matrix.arch }}" = "arm64" ]; then
|
|
cross_uri="http://ports.ubuntu.com/"
|
|
else
|
|
cross_uri="http://archive.ubuntu.com/ubuntu/"
|
|
fi
|
|
printf '%s\n' \
|
|
"Types: deb" \
|
|
"URIs: ${cross_uri}" \
|
|
"Suites: noble noble-updates noble-security" \
|
|
"Components: main universe" \
|
|
"Architectures: ${{ matrix.arch }}" \
|
|
| sudo tee /etc/apt/sources.list.d/cross-${{ matrix.arch }}.sources
|
|
|
|
- uses: ./.github/actions/setup/ubuntu
|
|
with:
|
|
arch: ${{ matrix.arch }}
|
|
|
|
- uses: ./.github/actions/setup/baseruby
|
|
id: baseruby
|
|
with:
|
|
srcdir: src
|
|
|
|
- name: Run configure
|
|
run: >-
|
|
../src/configure -C --disable-install-doc
|
|
--prefix=/usr
|
|
--build=${{ matrix.build }}
|
|
--host=${{ matrix.host }}
|
|
--with-baseruby="$baseruby"
|
|
env:
|
|
baseruby: ${{ steps.baseruby.outputs.ruby }}
|
|
|
|
- run: make
|
|
|
|
- run: make install DESTDIR=$PWD/install
|
|
|
|
- name: Verify cross-compiled binary
|
|
run: |
|
|
file install/usr/bin/ruby
|
|
file install/usr/bin/ruby | grep -q '${{ matrix.file_arch }}'
|
|
|
|
- uses: ./.github/actions/slack
|
|
with:
|
|
label: cross ${{ matrix.host }}
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
|
if: ${{ failure() }}
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: build
|