331 Commits

Author SHA1 Message Date
dependabot[bot]
00fdcb3ecd Bump actions/checkout from 6.0.1 to 6.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6.0.1...v6.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 18:34:31 -08:00
Hiroshi SHIBATA
61724b9e4a
Update the latest versions of actions 2026-01-22 15:04:08 +09:00
Nobuyoshi Nakada
16cd9daa39
Rust interface is out of our scope 2026-01-16 18:27:17 +09:00
Stan Lo
50b719115a
Remove ruby-bench excludes (#15828)
These benchmarks should be working fine now.
2026-01-08 23:07:50 +00:00
Hiroshi SHIBATA
eaa9902ca7 Exclude ruby-lsp benchmark because released version of rbs didn't have tsort dependency 2026-01-08 18:48:00 +09:00
Hiroshi SHIBATA
1b476606f2
Update the latest versions of actions 2026-01-06 13:07:49 +09:00
Takashi Kokubun
7a1180afb6 ruby-bench: Prefer --excludes over rm -rf
to remind us of skipped benchmarks in the CI job names
2026-01-05 13:33:58 -08:00
Nobuyoshi Nakada
3f616d5701
Update ruby/setup-ruby action to v1.276.0 2025-12-30 18:33:03 +09:00
Hiroshi SHIBATA
565ea26ad1 Disabled to run lobsters benchmark because it didn't work with Ruby 4.1 yet 2025-12-26 11:00:51 +09:00
Takashi Kokubun
330ddccfee
ubuntu.yml: Add a ruby-bench job without ZJIT (#15480) 2025-12-10 10:10:54 -08:00
dependabot[bot]
bf144d8c10 Bump actions/checkout from 6.0.0 to 6.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6...v6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 18:31:11 -08:00
dependabot[bot]
3b09db3b35 Bump actions/checkout from 5.0.1 to 6.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.1 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5.0.1...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-27 16:36:52 +09:00
dependabot[bot]
b5d0aac900 Bump actions/checkout from 5.0.0 to 5.0.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v5...v5.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 18:34:37 -08:00
Takashi Kokubun
eed9441afc Revert "CI: Re-enable Ubuntu arm with CAPI check"
This reverts commit 02fd62895d9a13f56253521dedd80e39d4eafbb5.

It stopped working again.
2025-10-29 11:25:29 -07:00
Hiroshi SHIBATA
9664191e19 Use ruby/setup-ruby v1.265.0 2025-10-17 10:54:32 +09:00
Takashi Kokubun
c37d406883 ubuntu.yml: Add matrix.os in the notification label
At the moment, nothing in the notification tells you whether it was ibm
jobs or not. `matrix.os` seems like the easiest way to include that
information, so I added it in the label.
2025-10-09 21:17:16 -07:00
Jun Aruga
7a4f886cc5 CI: ubuntu.yml Remove workarounds for ppc64le/s390x
The 2 issues that we applied the workarounds for were fixed now.
2025-10-02 19:24:50 +01:00
Jun Aruga
4ac8b12a1a CI: Add make-ibm job in ubuntu.yml and remove ubuntu-ibm.yml
Add `make-ibm` job to run ppc64le/s390x cases in the `ubuntu.yml`, and remove
`ubuntu-ibm.yml`. This commit improves removing a duplicated logic between the
`ubuntu.yml` and `ubuntu-ibm.yml`.

I am using the YAML anchors and aliases feature to avoid the duplicated logic.
The document is below.

https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations#yaml-anchors-and-aliases

I don't add the `make-ibm` job to the `result` job, the line `needs: [make]`
intentionally to make the `make-ibm` job's result optional to merge PRs.
2025-09-26 22:39:45 +01:00
Nobuyoshi Nakada
02fd62895d
CI: Re-enable Ubuntu arm with CAPI check
ubuntu-24.04-arm jobs look working as of 2025-09-16.
2025-09-16 10:15:00 +09:00
Nobuyoshi Nakada
ca70f442b8
Matrix for extra checks 2025-09-12 12:08:40 +09:00
Nobuyoshi Nakada
aa173bcef8
Run CAPI check separately 2025-09-11 21:20:58 +09:00
Nobuyoshi Nakada
7ab8e16b2b
Check CAPI ext binary compatibility 2025-09-11 21:20:57 +09:00
dependabot[bot]
89bce81516 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 13:01:00 +09:00
Takashi Kokubun
5d6d8568ab Disable ubuntu-24.04-arm jobs for now
They don't start at all and they get cancelled.
https://github.com/ruby/ruby/actions/runs/17476949351/job/49639049451

To unblock PR merges, let's disable it until it's fixed.
2025-09-04 15:31:25 -07:00
Takashi Kokubun
0d179a12a3
Build ppc64le and s390x jobs in a separate workflow (#14353)
* cp ubuntu.yml ubuntu-ibm.yml

* Revert "CI: ubuntu.yml: Skip user ground id test on ppc64le and s390x"

This reverts commit 9fa87a668836f83ab836d0cbcefb4056622a0ed6.

* Revert "CI: ubuntu.yml: Set HOME env on ppc64le and s390x"

This reverts commit 05b654b43f6d0e92fbc3e1e908d811f031d59e40.

* Revert "CI: ubuntu.yml: Add GitHub Actions s390x case"

This reverts commit 099df0b40b215b2fc5db59569d45c59ee48111a7.

* Remove duplication among copied jobs
2025-08-26 11:51:53 -07:00
Nobuyoshi Nakada
7c28fb2fb2
[Bug #21546] Make the generated pc file relocatable 2025-08-17 17:13:15 +09:00
Takashi Kokubun
70b4b6fea0
Do not skip CI when it mentions "document" (#14232) 2025-08-14 15:12:46 -07:00
Jun Aruga
9fa87a6688 CI: ubuntu.yml: Skip user ground id test on ppc64le and s390x
This is a temporary workaround.
2025-08-12 15:24:53 +02:00
Jun Aruga
05b654b43f CI: ubuntu.yml: Set HOME env on ppc64le and s390x
This is a temporary workaround.
2025-08-12 15:24:53 +02:00
Jun Aruga
099df0b40b CI: ubuntu.yml: Add GitHub Actions s390x case
Add the s390x case using GitHub Actions ppc64le/s390x service.
https://github.com/IBM/actionspz

We can run the ppc64le/s390x cases only in the registered upstream repositories.
https://github.com/IBM/actionspz/blob/main/docs/FAQ.md#what-about-forked-repos

The following matrix upstream logic is to skip the ppc64le/s390x in the
downstream (fork) repositories.

```
+        upstream:
+          - ${{ github.repository == 'ruby/ruby' }}
```

Use the "os" list to determine the excluded ppc64le/s390x cases by using the
"exclude" syntax. Because the "exclude" syntax are executed before the
"include" syntax.

Add the ubuntu-24.04-ppc64le as a comment, because the GitHub Actions ppc64le
case has the following test errors and failures.
https://bugs.ruby-lang.org/issues/21534
2025-08-12 15:24:53 +02:00
Hiroshi SHIBATA
6dc37f9003 Update the latest versions of actions 2025-07-24 12:47:16 +09:00
Hiroshi SHIBATA
cf3acead9d Use https://github.com/ruby/power_assert/pull/58 2025-06-27 11:14:50 +09:00
Hiroshi SHIBATA
7d01905ef1 typeprof, rbs and repl_type_completor are working with HEAD now 2025-06-26 17:37:04 +09:00
Jeremy Evans
3a9c091cf3 Simplify Set#inspect output
As Set is now a core collection class, it should have special inspect
output.  Ideally, inspect output should be suitable to eval, similar
to array and hash (assuming the elements are also suitable to eval):

  set = Set[1, 2, 3]
  eval(set.inspect) == set # should be true

The simplest way to do this is to use the Set[] syntax.

This deliberately does not use any subclass name in the output,
similar to array and hash. It is more important that users know they
are dealing with a set than which subclass:

  Class.new(Set)[]
  # this does: Set[]
  # not: #<Class:0x00000c21c78699e0>[]

This inspect change breaks the power_assert bundled gem tests, so
add power_assert to TEST_BUNDLED_GEMS_ALLOW_FAILURES in the workflows.

Implements [Feature #21389]
2025-06-25 09:21:07 +09:00
Hiroshi SHIBATA
092ea7a163 Update to the latest step versions at the GitHub Actions 2025-06-20 17:55:48 +09:00
Nobuyoshi Nakada
aaa956e8f1
Now irb is a bundled gem and needs rubygems 2025-06-18 20:26:02 +09:00
Nobuyoshi Nakada
e66ac2a743
CI: Fix redirection errors 2025-06-06 09:37:19 +09:00
Nobuyoshi Nakada
5da3dc88d6
CI: Timeout launchable setup in 3min 2025-06-06 08:00:51 +09:00
Nobuyoshi Nakada
296a0d0b7c
CI: Create report files only when Launchable setup succeeded 2025-06-06 08:00:51 +09:00
Takashi Kokubun
2279da2c91
Bump the required BASERUBY version to 3.1 (#13321) 2025-05-13 13:39:45 -07:00
Jeremy Evans
e4f85bfc31 Implement Set as a core class
Set has been an autoloaded standard library since Ruby 3.2.
The standard library Set is less efficient than it could be, as it
uses Hash for storage, which stores unnecessary values for each key.

Implementation details:

* Core Set uses a modified version of `st_table`, named `set_table`.
  than `s/st_/set_/`, the main difference is that the stored records
  do not have values, making them 1/3 smaller. `st_table_entry` stores
  `hash`, `key`, and `record` (value), while `set_table_entry` only
  stores `hash` and `key`.  This results in large sets using ~33% less
  memory compared to stdlib Set.  For small sets, core Set uses 12% more
  memory (160 byte object slot and 64 malloc bytes, while stdlib set
  uses 40 for Set and 160 for Hash).  More memory is used because
  the set_table is embedded and 72 bytes in the object slot are
  currently wasted. Hopefully we can make this more efficient and have
  it stored in an 80 byte object slot in the future.

* All methods are implemented as cfuncs, except the pretty_print
  methods, which were moved to `lib/pp.rb` (which is where the
  pretty_print methods for other core classes are defined).  As is
  typical for core classes, internal calls call C functions and
  not Ruby methods.  For example, to check if something is a Set,
  `rb_obj_is_kind_of` is used, instead of calling `is_a?(Set)` on the
  related object.

* Almost all methods use the same algorithm that the pure-Ruby
  implementation used.  The exception is when calling `Set#divide` with a
  block with 2-arity.  The pure-Ruby method used tsort to implement this.
  I developed an algorithm that only allocates a single intermediate
  hash and does not need tsort.

* The `flatten_merge` protected method is no longer necessary, so it
  is not implemented (it could be).

* Similar to Hash/Array, subclasses of Set are no longer reflected in
  `inspect` output.

* RDoc from stdlib Set was moved to core Set, with minor updates.

This includes a comprehensive benchmark suite for all public Set
methods.  As you would expect, the native version is faster in the
vast majority of cases, and multiple times faster in many cases.
There are a few cases where it is significantly slower:

* Set.new with no arguments (~1.6x)
* Set#compare_by_identity for small sets (~1.3x)
* Set#clone for small sets (~1.5x)
* Set#dup for small sets (~1.7x)

These are slower as Set does not currently use the AR table
optimization that Hash does, so a new set_table is initialized for
each call.  I'm not sure it's worth the complexity to have an AR
table-like optimization for small sets (for hashes it makes sense,
as small hashes are used everywhere in Ruby).

The rbs and repl_type_completor bundled gems will need updates to
support core Set.  The pull request marks them as allowed failures.

This passes all set tests with no changes.  The following specs
needed modification:

* Modifying frozen set error message (changed for the better)
* `Set#divide` when passed a 2-arity block no longer yields the same
  object as both the first and second argument (this seems like an issue
  with the previous implementation).
* Set-like objects that override `is_a?` such that `is_a?(Set)` return
  `true` are no longer treated as Set instances.
* `Set.allocate.hash` is no longer the same as `nil.hash`
* `Set#join` no longer calls `Set#to_a` (it calls the underlying C
   function).
* `Set#flatten_merge` protected method is not implemented.

Previously, `set.rb` added a `SortedSet` autoload, which loads
`set/sorted_set.rb`.  This replaces the `Set` autoload in `prelude.rb`
with a `SortedSet` autoload, but I recommend removing it and
`set/sorted_set.rb`.

This moves `test/set/test_set.rb` to `test/ruby/test_set.rb`,
reflecting that switch to a core class.  This does not move the spec
files, as I'm not sure how they should be handled.

Internally, this uses the st_* types and functions as much as
possible, and only adds set_* types and functions as needed.
The underlying set_table implementation is stored in st.c, but
there is no public C-API for it, nor is there one planned, in
order to keep the ability to change the internals going forward.

For internal uses of st_table with Qtrue values, those can
probably be replaced with set_table.  To do that, include
internal/set_table.h.  To handle symbol visibility (rb_ prefix),
internal/set_table.h uses the same macro approach that
include/ruby/st.h uses.

The Set class (rb_cSet) and all methods are defined in set.c.
There isn't currently a C-API for the Set class, though C-API
functions can be added as needed going forward.

Implements [Feature #21216]

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Oliver Nutter <mrnoname1000@riseup.net>
2025-04-26 10:31:11 +09:00
Hiroshi SHIBATA
49c29cff47 Bump up to the latest versions of actions 2025-04-16 11:40:11 +09:00
Naoto Ono
56b89d31c7
Launchable: Fix CI scripts by adding backslashes (#12974)
The following command doesn't work correctly since a backslash doesn't exist after `exec`. This PR fixes it.

```
if [ -n "${LAUNCHABLE_ORGANIZATION}" ]; then
  exec
  > >(tee launchable_stdout.log) \
  2> >(tee launchable_stderr.log)
fi
```
2025-03-24 11:45:24 +00:00
Naoto Ono
c939d0c85d
Launchable: Send stdout and stderr (#12785)
Currently, the Launchable team is developing a new feature to attach any logs. Attached log can be anything, such as system logs or stdout. Users can find these logs using any text search. Please note that this feature is a work in progress, so we can't use it yet.

I'm going to attach stdout and stderr as attached logs because they will be useful for finding interpreter bugs. When running tests, we sometimes see interpreter itself crash, and the stack is output to stderr. When debugging the cause of the issue, this feature is useful.
2025-03-06 12:39:39 +09:00
Hiroshi SHIBATA
9a4d82fb09 Ubuntu 20.04 will be EOL at Apr 2025 2025-01-20 10:15:08 +09:00
Nobuyoshi Nakada
65a7c69188
CI: Skip setup-ruby on Ubuntu arm64
Use system default 3.2.3, until setup-ruby supports Ubuntu arm64
runners.
2025-01-18 09:19:17 +09:00
Nobuyoshi Nakada
a9d37ac3e5
CI: Add Ubuntu arm64 2025-01-18 09:19:17 +09:00
Nobuyoshi Nakada
f7ce62cc5b
Add hello 2024-12-22 23:14:03 +09:00
Matt Valentine-House
7caf2ffe00 Remove the GC build check in Ubuntu.yml 2024-12-06 09:48:30 +00:00
Peter Zhu
ce1ad1b816 Standardize on the name "modular GC"
We have name fragmentation for this feature, including "shared GC",
"modular GC", and "external GC". This commit standardizes the feature
name to "modular GC" and the implementation to "GC library".
2024-12-05 10:33:26 -05:00