[Cirrus] Share configuration using YAML aliases
https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
This commit is contained in:
parent
3a761dcc91
commit
d2ffd0ad3d
113
.cirrus.yml
113
.cirrus.yml
@ -6,10 +6,20 @@
|
|||||||
# Lets workaround it by specifying a custom volume mount point.
|
# Lets workaround it by specifying a custom volume mount point.
|
||||||
env:
|
env:
|
||||||
CIRRUS_VOLUME: /cirrus-ci-volume
|
CIRRUS_VOLUME: /cirrus-ci-volume
|
||||||
|
CIRRUS_CLONE_DEPTH: 50
|
||||||
LANG: C.UTF-8
|
LANG: C.UTF-8
|
||||||
|
optflags: '-O1'
|
||||||
|
debugflags: '-ggdb3'
|
||||||
|
RUBY_PREFIX: /tmp/ruby-prefix
|
||||||
|
RUBY_DEBUG: ci rgengc
|
||||||
|
RUBY_TESTOPTS: >-
|
||||||
|
-q
|
||||||
|
--color=always
|
||||||
|
--tty=no
|
||||||
|
RUST_BACKTRACE: 1
|
||||||
|
INIT_ENV: ':'
|
||||||
|
|
||||||
task:
|
config_template: &CONFIG_TEMPLATE
|
||||||
name: Arm64 Graviton2 / $CC
|
|
||||||
auto_cancellation: $CIRRUS_BRANCH != 'master'
|
auto_cancellation: $CIRRUS_BRANCH != 'master'
|
||||||
only_if: $CIRRUS_CRON != ''
|
only_if: $CIRRUS_CRON != ''
|
||||||
skip: "changesIncludeOnly('doc/**', '**.{md,rdoc,ronn,[1-8]}', '.document')"
|
skip: "changesIncludeOnly('doc/**', '**.{md,rdoc,ronn,[1-8]}', '.document')"
|
||||||
@ -22,27 +32,13 @@ task:
|
|||||||
# We can request maximum 4 GB per cpu.
|
# We can request maximum 4 GB per cpu.
|
||||||
# [memory per task] = [memory per cpu: 4 GB] * [cpu]
|
# [memory per task] = [memory per cpu: 4 GB] * [cpu]
|
||||||
memory: 32G
|
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: gcc-11
|
|
||||||
id_script: id
|
id_script: id
|
||||||
info_script: |
|
info_script: |
|
||||||
nproc
|
nproc
|
||||||
free -h
|
free -h
|
||||||
set_env_script:
|
set_env_script:
|
||||||
# Set `GNUMAKEFLAGS`, because the flags are GNU make specific. Note using
|
# Set `GNUMAKEFLAGS`, because the flags are GNU make specific.
|
||||||
# the `make` environment variable used in compilers.yml causes some rubygems
|
|
||||||
# tests to fail.
|
|
||||||
# https://github.com/rubygems/rubygems/issues/4921
|
|
||||||
- echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> "$CIRRUS_ENV"
|
- echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> "$CIRRUS_ENV"
|
||||||
- cat "$CIRRUS_ENV"
|
- cat "$CIRRUS_ENV"
|
||||||
bundled_gems_cache:
|
bundled_gems_cache:
|
||||||
@ -59,11 +55,20 @@ task:
|
|||||||
disable_ipv6_script: sudo ./tool/disable_ipv6.sh
|
disable_ipv6_script: sudo ./tool/disable_ipv6.sh
|
||||||
autogen_script: ./autogen.sh
|
autogen_script: ./autogen.sh
|
||||||
configure_script: >-
|
configure_script: >-
|
||||||
|
$INIT_ENV &&
|
||||||
./configure -C
|
./configure -C
|
||||||
--enable-debug-env
|
--enable-debug-env
|
||||||
--disable-install-doc
|
--disable-install-doc
|
||||||
--with-ext=-test-/cxxanyargs,+
|
--with-ext=-test-/cxxanyargs,+
|
||||||
--prefix="$RUBY_PREFIX"
|
--prefix="$RUBY_PREFIX"
|
||||||
|
$configure
|
||||||
|
|
||||||
|
task:
|
||||||
|
name: Arm64 Graviton2 / $CC
|
||||||
|
env:
|
||||||
|
matrix:
|
||||||
|
CC: gcc-11
|
||||||
|
<< : *CONFIG_TEMPLATE
|
||||||
make_extract-extlibs_script: make extract-extlibs
|
make_extract-extlibs_script: make extract-extlibs
|
||||||
make_incs_script: make incs
|
make_incs_script: make incs
|
||||||
make_script: make
|
make_script: make
|
||||||
@ -77,81 +82,29 @@ task:
|
|||||||
# The following is to test YJIT on ARM64 CPUs available on Cirrus CI
|
# The following is to test YJIT on ARM64 CPUs available on Cirrus CI
|
||||||
yjit_task:
|
yjit_task:
|
||||||
name: Arm64 Graviton2 / $CC YJIT
|
name: Arm64 Graviton2 / $CC YJIT
|
||||||
auto_cancellation: $CIRRUS_BRANCH != 'master'
|
|
||||||
only_if: $CIRRUS_CRON != ''
|
|
||||||
skip: "changesIncludeOnly('doc/**', '**.{md,rdoc,ronn,[1-8]}', '.document')"
|
|
||||||
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:
|
env:
|
||||||
CIRRUS_CLONE_DEPTH: 50
|
INIT_ENV: source $HOME/.cargo/env
|
||||||
optflags: '-O1'
|
|
||||||
debugflags: '-ggdb3'
|
|
||||||
RUBY_PREFIX: /tmp/ruby-prefix
|
|
||||||
RUBY_DEBUG: ci rgengc
|
|
||||||
RUBY_TESTOPTS: >-
|
|
||||||
-q
|
|
||||||
--color=always
|
|
||||||
--tty=no
|
|
||||||
matrix:
|
matrix:
|
||||||
- CC: gcc-11
|
- CC: gcc-11
|
||||||
configure: --enable-yjit
|
configure: --enable-yjit
|
||||||
id_script: id
|
|
||||||
info_script: |
|
|
||||||
nproc
|
|
||||||
free -h
|
|
||||||
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
|
|
||||||
- echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> "$CIRRUS_ENV"
|
|
||||||
- echo RUST_BACKTRACE=1 >> "$CIRRUS_ENV"
|
|
||||||
- cat "$CIRRUS_ENV"
|
|
||||||
bundled_gems_cache:
|
|
||||||
folder: .downloaded-cache
|
|
||||||
fingerprint_script:
|
|
||||||
sed -e 's/ */ /g;s/ *#.*//;/^$/d;s/\([^ ]*\) \([^ ]*\)/\1-\2.gem/;s/ .*//'
|
|
||||||
gems/bundled_gems
|
|
||||||
populate_script: |
|
|
||||||
sudo apt-get install --no-install-recommends -q -y wget
|
|
||||||
mkdir -p .downloaded-cache
|
|
||||||
sed 's/ */ /g;s/ *#.*//;/^$/d;s/\([^ ]*\) \([^ ]*\)/\1-\2.gem/;s/ .*//' gems/bundled_gems |
|
|
||||||
wget -nv -P .downloaded-cache -nd -B https://rubygems.org/downloads/ -i -
|
|
||||||
# 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:
|
install_rust_script:
|
||||||
- sudo apt-get update -y
|
- sudo apt-get update -y
|
||||||
- sudo apt-get install -y curl
|
- sudo apt-get install -y curl
|
||||||
- "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y $rustup_init"
|
- "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y $rustup_init"
|
||||||
autogen_script: ./autogen.sh
|
<< : *CONFIG_TEMPLATE
|
||||||
configure_script: >-
|
make_miniruby_script: $INIT_ENV && make miniruby
|
||||||
source $HOME/.cargo/env && ./configure -C
|
|
||||||
--enable-debug-env
|
|
||||||
--disable-install-doc
|
|
||||||
--with-ext=-test-/cxxanyargs,+
|
|
||||||
--prefix="$RUBY_PREFIX"
|
|
||||||
$configure
|
|
||||||
make_miniruby_script: source $HOME/.cargo/env && make miniruby
|
|
||||||
make_bindgen_script: |
|
make_bindgen_script: |
|
||||||
if [[ "$CC" = "clang-12" ]]; then
|
if [[ "$CC" = "clang-12" ]]; then
|
||||||
source $HOME/.cargo/env && make yjit-bindgen
|
$INIT_ENV && make yjit-bindgen
|
||||||
else
|
else
|
||||||
echo "only running bindgen on clang image"
|
echo "only running bindgen on clang image"
|
||||||
fi
|
fi
|
||||||
boot_miniruby_script: ./miniruby --yjit-call-threshold=1 -e0
|
boot_miniruby_script: ./miniruby --yjit-call-threshold=1 -e0
|
||||||
test_dump_insns_script: ./miniruby --yjit-call-threshold=1 --yjit-dump-insns -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
|
output_stats_script: ./miniruby --yjit-call-threshold=1 --yjit-stats -e0
|
||||||
full_build_script: source $HOME/.cargo/env && make
|
full_build_script: $INIT_ENV && make
|
||||||
cargo_test_script: source $HOME/.cargo/env && cd yjit && cargo test
|
cargo_test_script: $INIT_ENV && cd yjit && cargo test
|
||||||
make_test_script: source $HOME/.cargo/env && make test RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
|
make_test_script: $INIT_ENV && make test RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
|
||||||
make_test_all_script: source $HOME/.cargo/env && make test-all RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx" TESTOPTS="$RUBY_TESTOPTS"
|
make_test_all_script: $INIT_ENV && make test-all RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx" TESTOPTS="$RUBY_TESTOPTS"
|
||||||
make_test_spec_script: source $HOME/.cargo/env && make test-spec RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
|
make_test_spec_script: $INIT_ENV && make test-spec RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
|
||||||
clippy_script: source $HOME/.cargo/env && cd yjit && cargo clippy --all-targets --all-features
|
clippy_script: $INIT_ENV && cd yjit && cargo clippy --all-targets --all-features
|
||||||
|
Loading…
x
Reference in New Issue
Block a user