Visitar URL original
Merge pull request #7660 from mruby/dependabot/github_actions/github-actions-dependencies-73dfd7d0f6 · mruby/mruby@eda5384 · GitHub
Skip to content

Merge pull request #7660 from mruby/dependabot/github_actions/github-… #6675

Merge pull request #7660 from mruby/dependabot/github_actions/github-…

Merge pull request #7660 from mruby/dependabot/github_actions/github-… #6675

Workflow file for this run

# https://github.com/actions/runner-images#available-images
name: Build & Test
on: [push, pull_request]
permissions:
contents: read
jobs:
GCC-CLANG:
name: "${{ matrix.os }}-${{ matrix.altname || matrix.cc }}"
runs-on: ${{ matrix.os }}
# A row that installs a toolchain is given room for that step's own
# budget on top of the work: 15 is what the rest of a job takes at
# worst, and an apt allowed 10 minutes does not fit beside it. The
# rows that install nothing keep the 15 the whole job costs them.
timeout-minutes: ${{ matrix.timeout || 15 }}
strategy:
fail-fast: false
max-parallel: 8
matrix:
include:
# x86-64 LP64 with signed plain `char`. These two also run the
# stress tests (test/assert.rb, `stress`): what those check is
# neither ABI nor compiler specific, and they are the bulk of a
# suite's running time, many times so under MRB_GC_STRESS.
- {os: ubuntu-24.04, cc: gcc, cxx: g++, stress: "1"}
- {os: ubuntu-24.04, cc: clang, cxx: clang++, stress: "1"}
# Also the one that builds with C++ exceptions in C: see
# build_config/ci/gcc-clang.rb.
- {os: ubuntu-22.04, cc: gcc, cxx: g++, cxx_exception: "1"}
- {os: ubuntu-22.04, cc: clang, cxx: clang++}
# AArch64 LP64 with unsigned plain `char`.
- {os: ubuntu-24.04-arm, cc: gcc, cxx: g++}
# x86 ILP32 with signed plain `char`.
- os: ubuntu-24.04
cc: i686-linux-gnu-gcc
cxx: i686-linux-gnu-g++
altname: "i686-gcc"
timeout: 25
# AArch32 ILP32 with unsigned plain `char`, run under qemu. The
# emulation is why this one says so: see build_config/ci/gcc-clang.rb.
- os: ubuntu-24.04
cc: arm-linux-gnueabihf-gcc
cxx: arm-linux-gnueabihf-g++
altname: "armhf-gcc"
emulated: "1"
abi_only: "1"
timeout: 25
# AArch64 LP64 with signed plain `char`.
- {os: macos-26, cc: clang, cxx: clang++}
- {os: macos-15, cc: clang, cxx: clang++}
# x86-64 LLP64 with signed plain `char`.
# The mingw compiler is what costs here: the suites finish in under
# a minute together while the seven builds take ten of the job's
# fifteen, so this runner is asked for its ABI and not for what
# reads the same everywhere. See build_config/ci/gcc-clang.rb.
- os: windows-2025
cc: gcc
cxx: g++
altname: "mingw-gcc"
abi_only: "1"
- os: windows-2022
cc: gcc
cxx: g++
altname: "mingw-gcc"
abi_only: "1"
env:
MRUBY_CONFIG: ci/gcc-clang
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
LD: ${{ matrix.cc }}
MRUBY_CI_EMULATED: ${{ matrix.emulated }}
MRUBY_CI_ABI_ONLY: ${{ matrix.abi_only }}
MRUBY_CI_CXX_EXCEPTION: ${{ matrix.cxx_exception }}
MRBTEST_STRESS: ${{ matrix.stress }}
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
# 10, not 5: the download is 64.6 MB and the step has taken more than
# five minutes, which failed master rather than the pull request that
# would have shown it. A whole job here finishes in four to five, so
# five for one step of it was never the headroom it looked like. The
# job is given 25 for the same reason: an apt that takes the ten it is
# allowed leaves nothing of a fifteen-minute job for the build and the
# suites, and a slow mirror cancelled the tests rather than failing the
# step that was slow.
- name: Install i386 cross-build toolchain
if: matrix.altname == 'i686-gcc'
timeout-minutes: 10
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
crossbuild-essential-i386
# The same, for a download that also carries qemu and binfmt.
- name: Install armhf cross-build toolchain
if: matrix.altname == 'armhf-gcc'
timeout-minutes: 10
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
crossbuild-essential-armhf binfmt-support qemu-user-static
echo 'QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf' >> "$GITHUB_ENV"
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Defines
run: rake defines
- name: Build
run: rake -m test:build
- name: Size
run: rake size
- name: Test
run: rake test:run
Cosmopolitan:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- name: Ruby version
run: ruby -v
- name: Cache cosmocc
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
id: cache-cosmocc
with:
path: ~/cosmo
key: cosmocc-${{ runner.os }}-20260104
- name: Install cosmocc
if: steps.cache-cosmocc.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cosmo && cd ~/cosmo
wget https://cosmo.zip/pub/cosmocc/cosmocc.zip
unzip cosmocc.zip
- name: Defines
run: |
COSMO_ROOT=~/cosmo rake defines MRUBY_CONFIG=cosmopolitan
- name: Build
run: |
COSMO_ROOT=~/cosmo rake -m test:build MRUBY_CONFIG=cosmopolitan
- name: Size
run: |
COSMO_ROOT=~/cosmo rake size MRUBY_CONFIG=cosmopolitan
- name: Test
run: |
COSMO_ROOT=~/cosmo rake test:run MRUBY_CONFIG=cosmopolitan
Windows-VC:
runs-on: windows-2022
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/msvc
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- name: Ruby version
run: ruby -v
- name: Defines
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake defines
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake -m test:build
- name: Size
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake size
- name: Test
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake test:run