Граф коммитов

36 Коммитов

Автор SHA1 Сообщение Дата
Maxime Chevalier-Boisvert e9e624b76e
YJIT: check that we correctly auto-enable YJIT on Linux (#6854)
* YJIT: check that we correctly auto-enable YJIT on Linux

YJIT should be automatically built on Linux x86-64 when
rustc is present, and we should see +YJIT in the version string.

* Use miniruby rather than system ruby
2022-12-02 15:33:47 -05:00
Hiroshi SHIBATA 8bac8772df Added permission restrictions for GitHub actions 2022-11-28 18:28:31 +09:00
StepSecurity Bot e15cd01149 [StepSecurity] ci: Harden GitHub Actions
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2022-11-25 20:12:23 +09:00
Takashi Kokubun 607fb49dbc
YJIT: Lower the required Rust version from 1.58.1 to 1.58.0 (#6780) 2022-11-21 10:27:39 -08:00
Takashi Kokubun 792dc553f1
YJIT: Test --yjit-verify-ctx on GitHub Actions as well (#6639) 2022-10-26 18:20:33 -04:00
Takashi Kokubun 1dd9511b67
Use ruby/action-slack@v3.0.0 and ref_name (#6633)
It's moved from k0kubun to ruby org.

Also, we don't need JavaScript eval to generate branch if we use
github.ref_name, so v3.0.0 is a version that doesn't use eval.

Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-10-25 17:53:08 -07:00
Nobuyoshi Nakada 1b235dcfd9
Ignore manual files only commits [ci skip] 2022-10-18 17:44:31 +09:00
Takashi Kokubun 1ad1f07306
Fix a broken Slack notification
The matrix doesn't have `os`.
2022-09-21 13:38:46 +09:00
Takashi Kokubun f8dad616c2
YJIT: Show --yjit-stats of railsbench on CI (#6403)
* YJIT: Show --yjit-stats of railsbench on CI

* YJIT: Use --enable-yjit=dev to see ratio_in_yjit

* YJIT: Show master GitHub URL for quick comparison

* YJIT: Avoid making CI red by a yjit-bench failure
2022-09-20 06:07:28 +09:00
Nobuyoshi Nakada d91865f33f
Ignore `.document` only commits [ci skip] 2022-08-22 18:08:05 +09:00
Nobuyoshi Nakada 91c05b34cd Bundled gems test needs `prepare-gems`
`prepare-gems` downloads and extracts the bundled gems, and these gems
are built by `build-exts` now.
2022-07-25 08:50:07 +09:00
Nobuyoshi Nakada 5047283070
Skip CIs if the head commit message contains '[DOC]' 2022-06-19 11:05:31 +09:00
Alan Wu 899c90cf8a
YJIT: Relax minimum Rust version requirement to 1.58.1
We want to make it convenient for people to build YJIT and Rust version 1.58.1
or above is available on Ubuntu Jammy, Debian testing, and Fedora 36 through
the usual package manager on those systems. This saves the need to install
`rustup` for some people.

Our code is already 1.58.1 compatible so this commit simply tweaks CI to make
sure that we keep supporting that version. We still test against the latest Rust
version in `--enable-yjit=dev` builds through the Rust version available in
GitHub's CI image.

Rust versions older than 1.58.1 might build YJIT today, but we might make
incompatible changes in the future.

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2022-05-29 13:43:02 -04:00
Alan Wu f90549cd38 Rust YJIT
In December 2021, we opened an [issue] to solicit feedback regarding the
porting of the YJIT codebase from C99 to Rust. There were some
reservations, but this project was given the go ahead by Ruby core
developers and Matz. Since then, we have successfully completed the port
of YJIT to Rust.

The new Rust version of YJIT has reached parity with the C version, in
that it passes all the CRuby tests, is able to run all of the YJIT
benchmarks, and performs similarly to the C version (because it works
the same way and largely generates the same machine code). We've even
incorporated some design improvements, such as a more fine-grained
constant invalidation mechanism which we expect will make a big
difference in Ruby on Rails applications.

Because we want to be careful, YJIT is guarded behind a configure
option:

```shell
./configure --enable-yjit # Build YJIT in release mode
./configure --enable-yjit=dev # Build YJIT in dev/debug mode
```

By default, YJIT does not get compiled and cargo/rustc is not required.
If YJIT is built in dev mode, then `cargo` is used to fetch development
dependencies, but when building in release, `cargo` is not required,
only `rustc`. At the moment YJIT requires Rust 1.60.0 or newer.

The YJIT command-line options remain mostly unchanged, and more details
about the build process are documented in `doc/yjit/yjit.md`.

The CI tests have been updated and do not take any more resources than
before.

The development history of the Rust port is available at the following
commit for interested parties:
1fd9573d8b

Our hope is that Rust YJIT will be compiled and included as a part of
system packages and compiled binaries of the Ruby 3.2 release. We do not
anticipate any major problems as Rust is well supported on every
platform which YJIT supports, but to make sure that this process works
smoothly, we would like to reach out to those who take care of building
systems packages before the 3.2 release is shipped and resolve any
issues that may come up.

[issue]: https://bugs.ruby-lang.org/issues/18481

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
Co-authored-by: Noah Gibbs <the.codefolio.guy@gmail.com>
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2022-04-27 11:00:22 -04:00
dependabot[bot] 137e69b481 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [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/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 20:39:14 +09:00
dependabot[bot] 9deacb3155 Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 20:38:15 +09:00
Nobuyoshi Nakada abc4a46046
Get rid of building main again when test-bundled-gems 2022-01-14 14:54:29 +09:00
Masataka Pocke Kuwabara b948b1a4e1
Fix RBS test failures of taint/trust (#5364) 2021-12-28 18:18:40 +09:00
Nobuyoshi Nakada 3a223aec2e
Ignore failures taint/trust in RBS tentatively [ci skip] 2021-12-27 00:17:42 +09:00
Nobuyoshi Nakada 922a81a994
Skip tests on pull requests labeled as Documentation 2021-12-18 13:06:15 +09:00
Nobuyoshi Nakada 5bf0060e0a
[DOC] Skip tests if only documents change [ci skip]
Run only checks for source code.  Currently, our CIs do almost
nothing about the documents.
2021-12-16 17:50:20 +09:00
Nobuyoshi Nakada 3f1dcd7fff
Cache downloaded files
Cache downloaded external libraries/gems, which are expected not
changed so frequently.

Also sometimes downloading from zlib returns the current time as
the date header in unexpected format, and checksums mismatch at
that time.
2021-12-02 22:21:20 +09:00
Nobuyoshi Nakada 784f1e1538
Throttle pull-requests only [ci skip] 2021-11-21 19:23:36 +09:00
Maxime Chevalier-Boisvert cdebf57ec6
Add --yjit-no-type-prop so we can test YJIT without type propagation (#5135)
* Add --yjit-no-type-prop so we can test YJIT without type propagation

* Fix typo in command line option

* Leave just two test workflows enable for YJIT
2021-11-18 10:44:31 -05:00
Nobuyoshi Nakada e2b78440ba
Throttle GitHub Actions [ci skip]
As GitHub Actions are choking a lot lately, throttle the checks
down to the latest commit only per branches.
2021-11-18 22:54:57 +09:00
Nobuyoshi Nakada 0a9cbe8562
Skip tests if only document files changed 2021-10-29 00:22:26 +09:00
卜部昌平 748688a63d .github: use GNUMAKEFLAGS instead of JOBS
A bit readable to me.
See also https://github.com/ruby/ruby/pull/4880
2021-10-26 09:05:46 +09:00
Nobuyoshi Nakada 1ea5325360
Reduce YJIT runs on Ubuntu [ci skip] 2021-10-24 19:35:29 +09:00
Nobuyoshi Nakada fe77a03392
Use `${{}}` for if statement 2021-10-24 19:35:28 +09:00
Alan Wu 5d2e5218f6 Use env var to turn on YJIT for test-bundled-gems
tool/test-bundled-gems.rb use sub processes for testing bundled gems and
doesn't support RUN_OPTS. We weren't enabling YJIT for these tests.
Use an include config with RUBY_YJIT_ENABLE to turn on YJIT for these
tests.

Note that we only test with the default call threshold in this setup,
which is the same as before YJIT was off by defauft. The
--yjit-call-threshold command line was never passed to the tests.
2021-10-20 18:19:43 -04:00
Alan Wu ec4a79a746 Remove YJIT CI configs for tests make check runs
"make check" runs "make test-spec" and "make test-all", so they don't
need to be individual elements of the matrix.
2021-10-20 18:19:43 -04:00
Alan Wu 413397b91e Turn on YJIT for repeat-count=2 runs through env var
It wasn't on at all before... Since it's a snowflake "include" matrix
element, might as well test the env var with it.
2021-10-20 18:19:43 -04:00
Alan Wu 34f1595405 Enable leaked global tests in YJIT workflows 2021-10-20 18:19:42 -04:00
Alan Wu 99facbc070 Correct workflow name for YJIT Ubuntu 2021-10-20 18:19:42 -04:00
Noah Gibbs 4705db6a37 Try turning off test-bundler-parallel to see if that fixes all the build errors 2021-10-20 18:19:42 -04:00
Noah Gibbs 21e58acef3 Don't enable YJIT by default. More tests on both Ubuntu and MacOS.
Add RUBY_YJIT_ENABLE env var and YJIT_FORCE_ENABLE compile-time constant.
Rename YJIT_STATS to RUBY_YJIT_STATS.
2021-10-20 18:19:42 -04:00