2021-09-14 12:20:01 -04:00
|
|
|
# This CI is used to test Arm cases. We can set the maximum 16 tasks.
|
|
|
|
# The entire testing design is inspired from .github/workflows/compilers.yml.
|
|
|
|
|
|
|
|
# By default, Cirrus mounts an empty volume to `/tmp`
|
|
|
|
# which triggers all sorts of warnings like "system temporary path is world-writable: /tmp".
|
|
|
|
# Lets workaround it by specifying a custom volume mount point.
|
|
|
|
env:
|
|
|
|
CIRRUS_VOLUME: /cirrus-ci-volume
|
2021-09-27 03:18:16 -04:00
|
|
|
LANG: C.UTF-8
|
2021-09-14 12:20:01 -04:00
|
|
|
|
|
|
|
task:
|
|
|
|
name: Arm64 Graviton2 / $CC
|
2022-08-22 05:08:05 -04:00
|
|
|
skip: "changesIncludeOnly('doc/**', '**.{md,rdoc}', '.document')"
|
2021-09-14 12:20:01 -04:00
|
|
|
arm_container:
|
2022-03-29 23:14:17 -04:00
|
|
|
# We use the arm64 images at https://github.com/ruby/ruby-ci-image/pkgs/container/ruby-ci-image .
|
2021-09-14 12:20:01 -04:00
|
|
|
image: ghcr.io/ruby/ruby-ci-image:$CC
|
|
|
|
# Define the used cpu core in each matrix task. We can use total 16 cpu
|
|
|
|
# cores in entire matrix. [cpu] = [total cpu: 16] / [number of tasks]
|
|
|
|
cpu: 8
|
|
|
|
# We can request maximum 4 GB per cpu.
|
|
|
|
# [memory per task] = [memory per cpu: 4 GB] * [cpu]
|
|
|
|
memory: 32G
|
|
|
|
env:
|
|
|
|
CIRRUS_CLONE_DEPTH: 50
|
|
|
|
optflags: '-O1'
|
|
|
|
debugflags: '-ggdb3'
|
|
|
|
RUBY_PREFIX: /tmp/ruby-prefix
|
|
|
|
RUBY_DEBUG: ci rgengc
|
|
|
|
RUBY_TESTOPTS: >-
|
|
|
|
-q
|
|
|
|
--color=always
|
|
|
|
--tty=no
|
|
|
|
matrix:
|
|
|
|
CC: clang-12
|
|
|
|
CC: gcc-11
|
|
|
|
id_script: id
|
|
|
|
set_env_script:
|
|
|
|
# Set `GNUMAKEFLAGS`, because the flags are GNU make specific. Note using
|
|
|
|
# the `make` environment variable used in compilers.yml causes some rubygems
|
|
|
|
# tests to fail.
|
|
|
|
# https://github.com/rubygems/rubygems/issues/4921
|
2022-10-12 15:50:50 -04:00
|
|
|
- echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> "$CIRRUS_ENV"
|
|
|
|
- cat "$CIRRUS_ENV"
|
2021-09-14 12:20:01 -04:00
|
|
|
# Arm containers are executed in AWS's EKS, and it's not yet supporting IPv6
|
|
|
|
# See https://github.com/aws/containers-roadmap/issues/835
|
|
|
|
disable_ipv6_script: sudo ./tool/disable_ipv6.sh
|
|
|
|
autogen_script: ./autogen.sh
|
|
|
|
configure_script: >-
|
|
|
|
./configure -C
|
|
|
|
--enable-debug-env
|
|
|
|
--disable-install-doc
|
|
|
|
--with-ext=-test-/cxxanyargs,+
|
|
|
|
--prefix="$RUBY_PREFIX"
|
|
|
|
make_extract-extlibs_script: make extract-extlibs
|
|
|
|
make_incs_script: make incs
|
|
|
|
make_script: make
|
|
|
|
make_leaked-globals_script: make leaked-globals
|
|
|
|
make_test_script: make test
|
|
|
|
make_install_script: make install
|
|
|
|
install_gems_for_test_script: $RUBY_PREFIX/bin/gem install --no-doc timezone tzinfo
|
|
|
|
make_test-tool_script: make test-tool
|
2021-09-27 11:40:31 -04:00
|
|
|
make_test-all_script: make test-all
|
2021-09-14 12:20:01 -04:00
|
|
|
make_test-spec_script: make test-spec
|
2022-07-12 13:40:59 -04:00
|
|
|
|
|
|
|
# The following is to test YJIT on ARM64 CPUs available on Cirrus CI
|
|
|
|
yjit_task:
|
2022-08-25 21:19:40 -04:00
|
|
|
name: Arm64 Graviton2 / $CC YJIT
|
2022-07-12 13:40:59 -04:00
|
|
|
auto_cancellation: $CIRRUS_BRANCH != 'master'
|
|
|
|
skip: "changesIncludeOnly('doc/**', '**.{md,rdoc}')"
|
|
|
|
arm_container:
|
|
|
|
# We use the arm64 images at https://github.com/ruby/ruby-ci-image/pkgs/container/ruby-ci-image .
|
|
|
|
image: ghcr.io/ruby/ruby-ci-image:$CC
|
|
|
|
# Define the used cpu core in each matrix task. We can use total 16 cpu
|
|
|
|
# cores in entire matrix. [cpu] = [total cpu: 16] / [number of tasks]
|
|
|
|
cpu: 8
|
|
|
|
# We can request maximum 4 GB per cpu.
|
|
|
|
# [memory per task] = [memory per cpu: 4 GB] * [cpu]
|
|
|
|
memory: 32G
|
|
|
|
env:
|
|
|
|
CIRRUS_CLONE_DEPTH: 50
|
|
|
|
optflags: '-O1'
|
|
|
|
debugflags: '-ggdb3'
|
|
|
|
RUBY_PREFIX: /tmp/ruby-prefix
|
|
|
|
RUBY_DEBUG: ci rgengc
|
|
|
|
RUBY_TESTOPTS: >-
|
|
|
|
-q
|
|
|
|
--color=always
|
|
|
|
--tty=no
|
|
|
|
matrix:
|
2022-09-01 23:05:49 -04:00
|
|
|
- CC: clang-12
|
|
|
|
configure: --enable-yjit=dev
|
2022-09-23 16:17:54 -04:00
|
|
|
rustup_init: --default-toolchain=1.58.1
|
2022-09-01 23:05:49 -04:00
|
|
|
- CC: gcc-11
|
|
|
|
configure: --enable-yjit
|
2022-07-12 13:40:59 -04:00
|
|
|
id_script: id
|
|
|
|
set_env_script:
|
|
|
|
# Set `GNUMAKEFLAGS`, because the flags are GNU make specific. Note using
|
|
|
|
# the `make` environment variable used in compilers.yml causes some rubygems
|
|
|
|
# tests to fail.
|
|
|
|
# https://github.com/rubygems/rubygems/issues/4921
|
2022-10-12 15:50:50 -04:00
|
|
|
- echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> "$CIRRUS_ENV"
|
|
|
|
- echo RUST_BACKTRACE=1 >> "$CIRRUS_ENV"
|
|
|
|
- cat "$CIRRUS_ENV"
|
2022-07-12 13:40:59 -04:00
|
|
|
# Arm containers are executed in AWS's EKS, and it's not yet supporting IPv6
|
|
|
|
# See https://github.com/aws/containers-roadmap/issues/835
|
|
|
|
disable_ipv6_script: sudo ./tool/disable_ipv6.sh
|
|
|
|
install_rust_script:
|
|
|
|
- sudo apt-get update -y
|
|
|
|
- sudo apt-get install -y curl
|
2022-09-23 16:17:54 -04:00
|
|
|
- "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y $rustup_init"
|
2022-07-12 13:40:59 -04:00
|
|
|
autogen_script: ./autogen.sh
|
|
|
|
configure_script: >-
|
|
|
|
source $HOME/.cargo/env && ./configure -C
|
|
|
|
--enable-debug-env
|
|
|
|
--disable-install-doc
|
|
|
|
--with-ext=-test-/cxxanyargs,+
|
|
|
|
--prefix="$RUBY_PREFIX"
|
2022-09-01 23:05:49 -04:00
|
|
|
$configure
|
2022-08-31 05:37:07 -04:00
|
|
|
make_miniruby_script: source $HOME/.cargo/env && make miniruby
|
2022-07-20 10:43:14 -04:00
|
|
|
make_bindgen_script: |
|
|
|
|
if [[ "$CC" = "clang-12" ]]; then
|
2022-08-31 05:37:07 -04:00
|
|
|
source $HOME/.cargo/env && make yjit-bindgen
|
2022-07-20 10:43:14 -04:00
|
|
|
else
|
|
|
|
echo "only running bindgen on clang image"
|
|
|
|
fi
|
2022-10-12 15:50:50 -04:00
|
|
|
boot_miniruby_script: ./miniruby --yjit-call-threshold=1 -e0
|
|
|
|
test_dump_insns_script: ./miniruby --yjit-call-threshold=1 --yjit-dump-insns -e0
|
|
|
|
output_stats_script: ./miniruby --yjit-call-threshold=1 --yjit-stats -e0
|
2022-08-31 05:37:07 -04:00
|
|
|
full_build_script: source $HOME/.cargo/env && make
|
2022-08-30 15:44:55 -04:00
|
|
|
cargo_test_script: source $HOME/.cargo/env && cd yjit && cargo test
|
2022-08-31 05:37:07 -04:00
|
|
|
make_test_script: source $HOME/.cargo/env && make test RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
|
2022-09-01 23:05:13 -04:00
|
|
|
make_test_all_script: source $HOME/.cargo/env && make test-all RUN_OPTS="--yjit-call-threshold=1" TESTOPTS="$RUBY_TESTOPTS"
|
2022-08-31 05:37:07 -04:00
|
|
|
make_test_spec_script: source $HOME/.cargo/env && make test-spec RUN_OPTS="--yjit-call-threshold=1"
|