summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml109
-rw-r--r--.github/workflows/yjit-macos.yml28
-rw-r--r--.github/workflows/yjit-ubuntu.yml4
3 files changed, 30 insertions, 111 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
deleted file mode 100644
index b59badfb4a..0000000000
--- a/.cirrus.yml
+++ /dev/null
@@ -1,109 +0,0 @@
-# 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
- CIRRUS_CLONE_DEPTH: 50
- 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:
-
-config_template: &CONFIG_TEMPLATE
- only_if: changesInclude('.cirrus.yml', 'yjit.{c,h,rb}', 'yjit/**.{mk,rs,toml}', 'bootstraptest/test_yjit*.rb', 'test/ruby/test_yjit*.rb')
- skip: >-
- $CIRRUS_CHANGE_MESSAGE =~ '.*\[DOC\].*' ||
- $CIRRUS_PR_LABELS =~ '.*Documentation.*' ||
- 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
-
- id_script: id
- info_script: |
- nproc
- free -h
- set_env_script:
- # Set `GNUMAKEFLAGS`, because the flags are GNU make specific.
- - echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> "$CIRRUS_ENV"
- - '[ -z "$INIT_ENV" ] || printenv | sort | comm -13 - <(set -x; source $INIT_ENV && printenv | sort) | tee -a "$CIRRUS_ENV"'
- - cat "$CIRRUS_ENV"
- bundled_gems_cache:
- folder: .downloaded-cache
- fingerprint_script:
- sed '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
- autogen_script: ./autogen.sh
- configure_script: >-
- ./configure -C
- --enable-debug-env
- --disable-install-doc
- --with-ext=-test-/cxxanyargs,+
- --prefix="$RUBY_PREFIX"
- $configure
-
-task:
- name: Arm64 Graviton2 / $CC
- env:
- matrix:
- CC: gcc-11
- << : *CONFIG_TEMPLATE
- make_extract-extlibs_script: make extract-extlibs
- make_incs_script: make incs
- make_script: make
- 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
- make_test-all_script: make test-all
- make_test-spec_script: make test-spec
-
-# The following is to test YJIT on ARM64 CPUs available on Cirrus CI
-yjit_task:
- name: Arm64 Graviton2 / $CC YJIT
- env:
- INIT_ENV: $HOME/.cargo/env
- matrix:
- - CC: gcc-11
- configure: --enable-yjit
- << : *CONFIG_TEMPLATE
- make_miniruby_script: make miniruby
- make_bindgen_script: |
- if [[ "$CC" = "clang-12" ]]; then
- make yjit-bindgen
- else
- echo "only running bindgen on clang image"
- fi
- 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
- full_build_script: make
- cargo_test_script: cd yjit && cargo test
- make_test_script: make test RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
- make_test_all_script: make test-all RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx" TESTOPTS="$RUBY_TESTOPTS"
- make_test_spec_script: make test-spec RUN_OPTS="--yjit-call-threshold=1 --yjit-verify-ctx"
- # Cirrus Rust environments don't have enough permission to run `rustup component add clippy`.
- # clippy_script: cd yjit && rustup component add clippy && cargo clippy --all-targets --all-features
diff --git a/.github/workflows/yjit-macos.yml b/.github/workflows/yjit-macos.yml
index 1f244fd9e4..eb6cd60e17 100644
--- a/.github/workflows/yjit-macos.yml
+++ b/.github/workflows/yjit-macos.yml
@@ -26,6 +26,34 @@ permissions:
contents: read
jobs:
+ cargo:
+ name: cargo test
+
+ runs-on: macos-arm-oss
+
+ if: >-
+ ${{github.repository == 'ruby/ruby' &&
+ !(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_name == 'push' && github.actor == 'dependabot[bot]')
+ )}}
+
+ steps:
+ - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+
+ - run: RUST_BACKTRACE=1 cargo test
+ working-directory: yjit
+
+ # Also compile and test with all features enabled
+ - run: RUST_BACKTRACE=1 cargo test --all-features
+ working-directory: yjit
+
+ # Check that we can build in release mode too
+ - run: cargo build --release
+ working-directory: yjit
+
make:
strategy:
matrix:
diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml
index 1e9d21154a..c188bea3e2 100644
--- a/.github/workflows/yjit-ubuntu.yml
+++ b/.github/workflows/yjit-ubuntu.yml
@@ -27,7 +27,7 @@ permissions:
jobs:
cargo:
- name: Rust cargo test
+ name: cargo test
# GitHub Action's image seems to already contain a Rust 1.58.0.
runs-on: ubuntu-20.04
@@ -59,7 +59,7 @@ jobs:
working-directory: yjit
lint:
- name: Rust lint
+ name: cargo clippy
# GitHub Action's image seems to already contain a Rust 1.58.0.
runs-on: ubuntu-20.04