Compare commits

...
183 Commits
Author SHA1 Message Date
ruby-builder-bot a2bbe5b1b2 Update CRuby releases on Windows 2024-11-09 16:33:51 +01:00
ruby-builder-bot 46ca53beb3 Update CRuby releases on Windows 2024-11-07 14:39:39 +01:00
Benoit Daloze 217c988b8c Skip which bundle test on mingw, mswin and ucrt
* See https://github.com/ruby/setup-ruby/issues/658
2024-11-05 12:06:00 +01:00
ruby-builder-bot c6d4d2ab97 Add ruby-3.3.6 2024-11-05 12:02:48 +01:00
ruby-builder-bot 8c27ea3449 Add jruby-9.4.9.0 2024-11-05 11:59:57 +01:00
ruby-builder-bot 7d3497fd78 Update CRuby releases on Windows 2024-10-31 20:40:36 +01:00
ruby-builder-bot 98aefb3c83 Add ruby-3.2.6 2024-10-30 20:46:56 +01:00
ruby-builder-bot 7bae1d00b5 Add truffleruby-24.1.1,truffleruby+graalvm-24.1.1 2024-10-17 21:33:08 +02:00
Benoit Daloze 4d521eadc8 Fix exclusion 2024-10-11 11:59:43 +02:00
Benoit Daloze 1d9686e3ef Mention the new ruby-asan under Supported Versions
* Remove the ASan Debugging section for now as it seems mostly redundant.
  Native extensions are automatically compiled with ASan, so there is nothing special to do to use it.
2024-10-11 11:58:05 +02:00
Samuel Williams bea2fb915c Add some details about using asan build. 2024-10-11 11:58:05 +02:00
Benoit Daloze f269373437 Test the last 3.4 preview in CI 2024-10-07 20:33:19 +02:00
ruby-builder-bot 784fcda67f Add ruby-3.4.0-preview2 2024-10-07 20:20:58 +02:00
Benoit Daloze f6e05710ec Update README.md 2024-10-05 20:53:31 +02:00
Benoit Daloze 207a39969b Move the link to the list together with other text about builds 2024-10-05 20:51:36 +02:00
Samuel Williams 086ffb1a20 Update the dist/index.js. 2024-10-05 20:46:21 +02:00
Samuel Williams 27ceac8081 Add asan to the test matrix. 2024-10-05 20:46:21 +02:00
Samuel Williams aac0c64812 Add asan as a head version of Ruby. 2024-10-05 20:46:21 +02:00
Samuel Williams 727fd4feab Update ruby-builder-versions.json 2024-10-05 20:46:21 +02:00
Stavros Ntentos 79c01b8847 README.md: Mention link to supported Ruby versions for GitHub-hosted runners
Fixes https://github.com/ruby/setup-ruby/issues/650

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
2024-10-02 22:26:31 +02:00
Benoit Daloze c04af2bb72 Replace macos-release by (parseInt(os.version()) - 9)
* That way we don't need to update that dependency to work with newer macOS releases.
2024-09-25 22:01:07 +02:00
Benoit Daloze 17f5c914a0 Add support for macos-15 and all future macos runners
* Fixes https://github.com/ruby/setup-ruby/issues/647
2024-09-25 22:00:58 +02:00
Benoit Daloze 5496baa6db Update macos-release to 3.3.0 so it recognizes macos-15 2024-09-25 21:40:23 +02:00
Benoit Daloze 0ec4904dc7 Better error for TruffleRuby on Windows
* Fixes https://github.com/ruby/setup-ruby/issues/619
2024-09-25 21:02:29 +02:00
ruby-builder-bot f321cf5a4d Add truffleruby-24.1.0,truffleruby+graalvm-24.1.0 2024-09-17 16:56:52 +02:00
MSP-Greg 6af8267b44 README.md - Windows - clarify installed packages, 2022 vs 2019 2024-09-16 22:18:39 +02:00
ruby-builder-bot a6b46b8a08 Update CRuby releases on Windows 2024-09-16 15:52:34 +02:00
ruby-builder-bot 52753b7da8 Add ruby-3.3.5 2024-09-03 21:45:07 +02:00
ruby-builder-bot a6e6f86333 Update CRuby releases on Windows 2024-07-27 15:01:55 +02:00
ruby-builder-bot bc2ba926aa Add ruby-3.2.5 2024-07-27 13:22:02 +02:00
Rui Chen 371544706a docs: update ruby-version comment 2024-07-24 23:02:41 +02:00
ruby-builder-bot 50ba3386b0 Add truffleruby-24.0.2,truffleruby+graalvm-24.0.2 2024-07-22 13:01:40 +02:00
ruby-builder-bot 161cd54b69 Update CRuby releases on Windows 2024-07-10 23:01:53 +02:00
ruby-builder-bot 2a9a743e19 Add ruby-3.3.4 2024-07-09 17:13:03 +02:00
Benoit Daloze 3a77c29278 Fix updating the v1 branch on automated releases
* Fixes https://github.com/ruby/setup-ruby/issues/618
2024-07-06 11:54:45 +02:00
Hiroshi SHIBATA 382d786c8a Removed macos-arm-oss from GitHub Actions 2024-07-05 12:11:07 +02:00
ruby-builder-bot 97e35c5302 Add jruby-9.4.8.0 2024-07-03 10:42:25 +02:00
Benoit Daloze 1d0e911f61 Fully remove macos-11 since new builds will be on macos-12 2024-06-30 12:49:37 +02:00
Benoit Daloze c48bc1e88d macos-11 is no longer available 2024-06-30 12:41:55 +02:00
Benoit Daloze 713e0f1ab5 Update CONTRIBUTING.md 2024-06-27 15:46:14 +02:00
Benoit Daloze af43264f2b GH_REPO and GH_TOKEN must be set 2024-06-27 15:41:42 +02:00
Benoit Daloze 3251c5c21b Add workflow to automatically create a release 2024-06-27 15:23:12 +02:00
ruby-builder-bot 21a479f2d7 Add jruby-9.3.15.0 2024-06-27 15:01:18 +02:00
ruby-builder-bot 3783f195e2 Update CRuby releases on Windows 2024-06-17 20:49:34 +02:00
ruby-builder-bot ff740bc00a Add ruby-3.3.3 2024-06-12 11:56:31 +02:00
Benoit Daloze 78c01b705f Improve error message for CRuby < 2.6 on macos-arm64
* Is this the best error message ever?
2024-06-08 13:39:56 +02:00
ruby-builder-bot d5fb7a202f Update CRuby releases on Windows 2024-06-03 12:03:15 +02:00
Benoit Daloze 0cde4689ba Clearer 2024-05-30 15:10:04 +02:00
Benoit Daloze a56d16ef33 Refine errors text 2024-05-30 15:06:36 +02:00
Benoit Daloze 12dfa2bb47 Better error for 404 2024-05-30 15:01:16 +02:00
Benoit Daloze 68b705993a Fix condition 2024-05-30 14:47:21 +02:00
Benoit Daloze d046db60e3 Fail clearly for CRuby < 2.6 on macos-arm64 2024-05-30 14:41:43 +02:00
Benoit Daloze d4138ebc47 Do not validate the version for self-hosted 2024-05-30 14:41:31 +02:00
Benoit Daloze 049eae0450 Remove trailing space 2024-05-30 12:56:58 +02:00
ruby-builder-bot ff22bbb25f Add ruby-3.1.6,ruby-3.3.2 2024-05-30 12:29:44 +02:00
Benoit Daloze 943103cae7 Use downloadAndExtract() for truffleruby+graalvm too
* Simpler and more consistent that way.
* Avoids rerunning the post-install hook every time.
2024-05-22 00:08:22 +09:00
Kenichi Kamiya 7dc18ff0ca Exclude ruby 1.9 and 2.2 test for ubuntu-24.04
https://github.com/ruby/setup-ruby/pull/596#discussion_r1606047680
2024-05-20 17:46:39 +08:00
Kenichi Kamiya 00a1085dff Update README about ubuntu-24.04 2024-05-20 17:46:39 +08:00
Kenichi Kamiya 868b8c0873 Test against ubuntu-24.04 runner 2024-05-20 17:46:39 +08:00
Kenichi Kamiya 4f20bb7102 Support ubuntu-24.04-x64 2024-05-20 17:46:39 +08:00
ruby-builder-bot 6615b4b8a0 Add ruby-3.4.0-preview1 2024-05-17 16:58:23 +09:00
Benoit Daloze 82dd21cb95 Remove leftover test files
* The corresponding tests were removed in e16528e678.
  They could be re-added but should generate these files dynamically to avoid confusion.
2024-05-06 19:16:43 +02:00
ruby-builder-bot cacc9f1c0b Add jruby-9.4.7.0 2024-05-03 12:07:05 +02:00
ruby-builder-bot 1198b07430 Update CRuby releases on Windows 2024-04-26 11:20:31 +02:00
ruby-builder-bot 70da3bbf44 Add ruby-3.0.7,ruby-3.1.5,ruby-3.2.4,ruby-3.3.1 2024-04-23 18:56:06 +02:00
ruby-builder-bot 6bd3d993c6 Add truffleruby-24.0.1,truffleruby+graalvm-24.0.1 2024-04-16 18:16:08 +02:00
ruby-builder-bot 5f19ec79ce Add truffleruby-24.0.0,truffleruby+graalvm-24.0.0 2024-03-19 17:12:25 +01:00
ruby-builder-bot d4526a5553 Add jruby-9.3.14.0,jruby-9.4.6.0 2024-02-21 11:49:15 +01:00
Benoit Daloze e9d41d6cc1 Added dependabot for GitHub Actions 2024-02-17 12:27:49 +01:00
Benoit Daloze 22fdc77bf4 Clarify comment in test.yml 2024-01-31 16:00:45 +01:00
なつき 98f8f7e659 Update README.md 2024-01-31 15:57:37 +01:00
なつき 56dbe84af1 Add support for macos-14-x64 GitHub runners 2024-01-31 15:57:37 +01:00
なつき e8677f0f39 Add support for macos-14-arm64 GitHub runners 2024-01-31 15:57:37 +01:00
Ståle Storø Hauknes 7f2d473c10 Update url 2024-01-31 12:20:18 +01:00
Benoit Daloze bd03e04863 Test 3.3 on Windows 2024-01-25 17:18:05 +01:00
ruby-builder-bot 9c6c84224a Update CRuby releases on Windows 2024-01-25 17:17:32 +01:00
Benoit Daloze 5daca16544 Remove default in action.yml for windows-toolchain
* Otherwise it shows up in every usage of the action even if not set.
* Consistent with other non-required inputs.
2024-01-22 11:08:37 +01:00
MSP-Greg 558057564b Add windows-toolchain input 2024-01-22 11:07:31 +01:00
ruby-builder-bot 432702e864 Add ruby-3.2.3 2024-01-19 11:31:38 +01:00
Benoit Daloze b203567269 Workaround bug in XCode 14.2 linker not respecting RTLD_LAZY
* See https://github.com/oracle/truffleruby/issues/3390
2024-01-16 16:42:00 +01:00
ruby-builder-bot c6e5aea595 Add truffleruby-23.1.2,truffleruby+graalvm-23.1.2 2024-01-16 16:21:06 +01:00
Benoit Daloze 360dc864d5 Shorten job title to fit in GH UI 2023-12-28 12:21:45 +01:00
MSP-Greg 251b9047a8 Fixup rubygems: latest to work with Rubies < 2.3 2023-12-28 13:20:54 +02:00
Benoit Daloze 961f85197f Rename workflow and variable for clarity 2023-12-27 20:27:45 +01:00
MSP-Greg 28f930222f Fixup Rubygems latest 2023-12-27 21:23:02 +02:00
ruby-builder-bot df99e806d4 Update CRuby releases on Windows 2023-12-27 15:38:49 +02:00
m-nakamura145 ff4c96868c Update sample ruby version in README.md 2023-12-27 15:37:28 +02:00
ruby-builder-bot b256bd96bb Add ruby-3.3.0 2023-12-25 21:48:06 +01:00
ruby-builder-bot af848b40be Add ruby-3.3.0-rc1 2023-12-11 16:12:18 +01:00
ruby-builder-bot 8575951200 Add ruby-3.3.0-preview3 2023-11-13 16:01:45 +01:00
Benoit Daloze 036ef458dd Explicitly exit after this action runs to not wait for hanging promises
* See https://github.com/ruby/setup-ruby/issues/543
2023-11-07 19:05:04 +01:00
ruby-builder-bot 552f83fe52 Add jruby-9.3.13.0,jruby-9.4.5.0 2023-11-07 18:53:58 +01:00
Róbert Papp 54a18e26db Update deprecated Node 16 to 20 2023-10-26 15:25:49 +02:00
ruby-builder-bot cd48c8e227 Add truffleruby-23.1.1,truffleruby+graalvm-23.1.1 2023-10-25 12:21:54 +02:00
Benoit Daloze a05e47355e Java is now available on macos-arm-oss 2023-10-21 12:52:54 +02:00
ruby-builder-bot eba3a0f992 Add jruby-9.4.4.0 2023-10-21 12:48:45 +02:00
Benoit Daloze 679e23d4a3 Improve documentation about the self-hosted input
* Fixes https://github.com/ruby/setup-ruby/issues/535
2023-10-12 13:33:38 +02:00
Benoit Daloze 9f4cc09ff9 3.1 is now available on macos-arm64 2023-10-12 12:54:54 +02:00
Benoit Daloze 4d745286b4 Cleanup 2023-10-12 01:43:00 +02:00
Benoit Daloze 5cfe23c062 Add support for macos-13-arm64 GitHub runners 2023-10-11 18:58:56 +02:00
Benoit Daloze f887fb3d0e Update versions-strings-for-builder.rb 2023-10-11 18:52:53 +02:00
Benoit Daloze b1c3bf6751 Rename getVirtualEnvironmentName() to getOSNameVersion() for clarity 2023-10-11 18:52:53 +02:00
r7kamura d37167af45 Consider BUNDLE_ONLY in cache key 2023-10-08 11:45:20 +02:00
ruby-builder-bot 52b8784594 Add truffleruby-23.1.0,truffleruby+graalvm-23.1.0 2023-09-19 16:13:37 +02:00
Benoit Daloze 9aede54d98 Exclude known failing combination
* See https://github.com/ruby/setup-ruby/issues/496
2023-09-19 12:28:45 +02:00
Benoit Daloze 24a61db157 yarn upgrade 2023-09-19 12:26:46 +02:00
ruby-builder-bot 5311f05890 Add jruby-9.3.11.0 2023-09-14 12:36:28 +02:00
ruby-builder-bot cb3f1e45ed Add ruby-3.3.0-preview2 2023-09-14 12:34:53 +02:00
Lorenzo Zabot 4f1c6a74a7 Update actions/checkout to v4 2023-09-06 11:47:06 +02:00
Rotzbua b252db7f27 Update ruby version in README.md
Use current ruby version in examples.
2023-08-23 13:20:36 +02:00
ruby-builder-bot 250fcd6a74 Add truffleruby-23.0.0,truffleruby+graalvm-23.0.0 2023-06-14 11:28:44 +02:00
ruby-builder-bot bc1dd263b6 Add jruby-9.4.3.0 2023-06-08 11:15:41 +02:00
MSP-Greg 8a45918450 Update 'setup-ruby-bundler-cache-v5' to 'setup-ruby-bundler-cache-v6'
Needed to allow cache save when lock file hash is unchanged
2023-05-20 15:09:49 +02:00
MSP-Greg 92a3389c13 Fix cache with @actions/cache 2023-05-20 15:09:49 +02:00
Benoit Daloze 7d546f4868 Test 3.3 preview 2023-05-14 14:27:22 +02:00
ruby-builder-bot 4e64415f09 Add ruby-3.3.0-preview1 2023-05-14 14:27:22 +02:00
Benoit Daloze d2b39ad0b5 Consider truffleruby preview releases to be stable versions 2023-04-28 17:06:17 +02:00
ruby-builder-bot e939497f6f Add truffleruby-23.0.0-preview1,truffleruby+graalvm-23.0.0-preview1 2023-04-28 17:01:21 +02:00
Benoit Daloze 6cecb48364 Use ubuntu-20.04 for test using Ruby 2.2
* https://github.com/ruby/setup-ruby/issues/496#issuecomment-1520667671
2023-04-24 22:02:59 +02:00
Dan Federman 4d88f85d08 Add support for macos-13 (#501) 2023-04-24 21:44:28 +02:00
ruby-builder-bot 55283cc231 Update CRuby releases on Windows 2023-04-04 17:55:30 +08:00
ruby-builder-bot 904f3fef85 Add ruby-2.7.8,ruby-3.0.6,ruby-3.1.4,ruby-3.2.2 2023-03-31 23:32:47 +08:00
MSP-Greg ec02537da5 Lock @actions/cache to 3.0.6, later versions break bundler caching 2023-03-20 16:55:33 +01:00
Benoit Daloze 089557fc38 Require a public workflow run URL for issues 2023-03-20 16:52:53 +01:00
MSP-Greg e6689b4deb Update yarn.lock, remove Windows mswin ssl cert related code 2023-03-16 18:55:42 +01:00
ruby-builder-bot 9669f3ee51 Add jruby-9.4.2.0 2023-03-09 22:37:36 +01:00
Benoit Daloze 31a7f6d628 No longer remove the prefix before extraction, extracting should be idempotent
* Fixes https://github.com/ruby/setup-ruby/issues/191
2023-03-05 15:39:16 +01:00
Benoit Daloze 59b5745c73 Use tc.find() with the effective tool cache path
* So it finds already-download prebuilt Ruby in the GH-hosted tool cache path
  on self-hosted, where $RUNNER_TOOL_CACHE is often different than on GH-hosted.
* See #475.
* This relies on tc.find() looking up the env var every time:
  https://github.com/actions/toolkit/blob/1f4b3fac06/packages/tool-cache/src/tool-cache.ts#L522
2023-03-05 14:56:02 +01:00
Benoit Daloze d03a71de6e Fix tc.find() calls to use the proper name on self-hosted 2023-03-05 14:56:02 +01:00
Benoit Daloze ddde3938f5 Use the default tool cache path on self-hosted runners matching a GH-hosted runner image
* See https://github.com/ruby/setup-ruby/issues/475
* Semantically reverts 377a94bc68
2023-03-05 14:56:02 +01:00
Benoit Daloze 5a73aa9f67 Explain why it was detected as self-hosted 2023-03-03 18:01:46 +01:00
Benoit Daloze d01c52ad8b Add a self-hosted input to force considering the current runner as self-hosted
* Since checking for self-hosted is based on guessing as there is
  no proper predicate for it in GitHub Actions (AFAIK).
2023-03-03 18:01:46 +01:00
Benoit Daloze 377a94bc68 Consider a different $RUNNER_TOOL_CACHE than the default as a self-hosted runner
* Fixes https://github.com/ruby/setup-ruby/issues/242
2023-03-03 18:01:46 +01:00
Benoit Daloze 66dc012cc3 Detect self-hosted runners not matching a GitHub-hosted runner image
* And give instructions for that case.
* Get the OS and OS version ourselves since some users set ImageOS incorrectly.
* This partially reverts commit ad1ebae995.
2023-03-03 16:33:57 +01:00
Benoit Daloze 2789f85824 Update bug_report.yml 2023-03-03 13:39:36 +01:00
Benoit Daloze fbb865d04d Update bug_report.yml 2023-03-03 13:36:11 +01:00
Benoit Daloze 96ac949ea0 Update bug_report.yml 2023-03-03 13:33:53 +01:00
Hiroshi SHIBATA 92aece5fc9 Also removed deprecated ubuntu-18.04 2023-02-27 19:56:46 +01:00
Hiroshi SHIBATA db791aad7b Removed macos-10.15 because it will be removed at 2023-03-31 2023-02-27 19:56:46 +01:00
ruby-builder-bot d3c9825d67 Update CRuby releases on Windows 2023-02-14 18:20:01 +01:00
Benoit Daloze f60ef1e808 Include working directory, $BUNDLE_WITH and $BUNDLE_WITHOUT in cache key
* Fixes https://github.com/ruby/setup-ruby/issues/350
* Fixes https://github.com/ruby/setup-ruby/issues/176
2023-02-11 14:17:29 +01:00
Benoit Daloze bc4e585e26 Don't show timing on error for clearer error output 2023-02-11 13:48:39 +01:00
Benoit Daloze 2cf593d66b Don't group bundle install output
* So any error from Bundler is immediately shown.
* Some users do not realize they should expand the group apparently.
2023-02-11 13:45:25 +01:00
Benoit Daloze a26e1fb6b3 Do not show a stacktrace if a process failed, only the message
* The stacktrace is confusing and rarely useful in that case.
2023-02-11 13:39:22 +01:00
ruby-builder-bot 4d060a10e6 Add ruby-3.2.1 2023-02-09 18:20:44 +00:00
ruby-builder-bot 77fe3b48b7 Add jruby-9.4.1.0 2023-02-08 10:26:25 +00:00
ruby-builder-bot 8df78e5576 Add jruby-9.3.10.0 2023-02-06 12:43:15 +00:00
ruby-builder-bot b8e62b879e Add truffleruby-22.3.1,truffleruby+graalvm-22.3.1 2023-01-24 19:23:27 +01:00
Benoit Daloze d60780f6b6 Simplify new-versions.rb 2023-01-24 19:15:59 +01:00
Benoit Daloze 8aa012b56d Debug new-versions.rb 2023-01-24 19:12:32 +01:00
Benoit Daloze 628be4e0e4 Fix new-versions.rb 2023-01-24 19:10:46 +01:00
MSP-Greg ee26e27437 Updates for Windows MSYS2 update to OpenSSL 3 2023-01-21 18:22:09 +01:00
Benoit Daloze 93287a1fa8 Revert "Export BUNDLER_VERSION after installing Bundler"
* This reverts commit 3190662165.
* It causes other issues such as https://github.com/ruby/setup-ruby/issues/444
  due to creating additional global state.
* The use-case it solves is too niche to risk such issues,
  using `bundler-cache: true` avoids the problem.
* See https://github.com/ruby/setup-ruby/issues/444#issuecomment-1377723414
2023-01-10 20:17:22 +01:00
Benoit Daloze 3190662165 Export BUNDLER_VERSION after installing Bundler
* Fixes https://github.com/ruby/setup-ruby/issues/440
2023-01-06 12:50:46 +01:00
Benoit Daloze eb7f94ffae Consider Bundler pre and rc versions valid, just exclude .dev
* Fixes https://github.com/ruby/setup-ruby/issues/439
2023-01-06 12:49:10 +01:00
Benoit Daloze ad718faf7a Break long line in workflow 2022-12-30 15:59:58 +01:00
Benoit Daloze 09c10210cc Implement targetRubyVersion for TruffleRuby
* Fixes #433
2022-12-30 15:55:07 +01:00
Lars Kanis f78d71faf4 Add RubyInstaller-3.2.0-1 for Windows 2022-12-30 15:39:39 +01:00
MSP-Greg fe42d0e73b Windows - updates for using OpenSSL 3 in Ruby 3.2 & head 2022-12-30 14:40:10 +01:00
David Rodríguez 8a6667e214 Reenable fixed RubyGems test
Use the same Ruby as the previous test, since it's very related, but
use a newer RubyGems to force the upgrade case.
2022-12-26 13:56:15 +01:00
Piotr Murach 03b78bdda2 Fix automatic bundler installation on JRuby 9.2 2022-12-25 20:06:54 +01:00
David Rodríguez 5fe1a6694c Respect explicit user's choice 2022-12-25 19:28:37 +01:00
David Rodríguez bb3a0553d5 Bundler higher than ~> 2.4.0 will require Ruby 3.0 or later 2022-12-25 19:28:37 +01:00
ruby-builder-bot 02c9cccf0e Add ruby-3.2.0 2022-12-25 14:08:20 +01:00
Hiroshi SHIBATA 8d6236c5db Bundler-2.4 requires Ruby 2.6 or later. 2022-12-24 23:31:20 +01:00
ruby-builder-bot 4b2d1d631e Update CRuby releases on Windows 2022-12-21 20:16:13 +01:00
Benoit Daloze 349473288f Update platforms docs
* No need to duplicate docs about which is *-latest here.
2022-12-19 12:35:28 +01:00
Konstantin Filtschew 846173692d ubuntu-latest is now 22.04
According to GitHub Blog ubuntu-latest is now 22.04.

see: https://github.blog/changelog/2022-11-09-github-actions-ubuntu-latest-workflows-will-use-ubuntu-22-04/
2022-12-19 12:30:52 +01:00
kojix2 9d93e96fe7 Update README.md
Added example of using the latest stable version of ruby
Related to #364
2022-12-13 12:21:40 +01:00
Benoit Daloze ee2113536a Test 3.2 RCs 2022-12-06 07:08:21 -06:00
Benoit Daloze ee37499046 Fix README auto update for preview/RC 2022-12-06 07:08:21 -06:00
ruby-builder-bot a5e2883296 Add ruby-3.2.0-rc1 2022-12-06 07:08:21 -06:00
Benoit Daloze 705fe056cf Improve wording 2022-12-06 05:33:15 -06:00
Hiroshi SHIBATA 8e7720ca42 virtual-environment has been renamed 2022-12-06 05:33:15 -06:00
Benoit Daloze 7a0bff23cb Disable failing test on old Ruby version
* See https://github.com/ruby/setup-ruby/issues/405
2022-11-25 17:20:21 +01:00
ruby-builder-bot c7079efafd Add ruby-2.7.7,ruby-3.0.5 2022-11-25 17:14:51 +01:00
Benoit Daloze 384fc1b92f Make new version script accept multiple versions 2022-11-25 16:34:19 +01:00
ruby-builder-bot 0a6498048c Add ruby-3.1.3 2022-11-24 20:23:06 +01:00
ruby-builder-bot de6f5b9c34 Add jruby-9.4.0.0 2022-11-23 23:00:18 +01:00
Benoit Daloze 4887fd8753 Ignore Bundler dev version in Gemfile.lock
* Fixes https://github.com/ruby/setup-ruby/issues/394
2022-11-22 16:22:30 +01:00
MSP-Greg c4fe7bd15d Update Packages (tool-cache, http-client) & regenerate dist/index.js (#399) 2022-11-14 11:51:13 +01:00
ruby-builder-bot 84dd2abab6 Add ruby-3.2.0-preview3 2022-11-12 13:16:34 +01:00
Étienne Barrié 8ddb7b3348 Update @actions/cache 2022-11-10 14:42:13 +01:00
26 changed files with 4660 additions and 7767 deletions
+7 -14
View File
@@ -3,7 +3,12 @@ description: Create a report to help us improve
body:
- type: markdown
attributes:
value: Please note we will close your issue without comment if you do not fill out the requested information.
value: |
First, take some time to think whether this is really an issue of ruby/setup-ruby and whether it is fixable in this action.
This action basically just downloads a prebuilt Ruby and adds it to `PATH`, so it is unlikely the bug is in this action.
Give some thoughts whether it could be an issue in your workflow, in the gems you use, in GitHub Actions, in Ruby, RubyGems, Bundler, etc.
This is NOT the place to ask help about your workflow failing (ask that on [GitHub Community](https://github.com/orgs/community/discussions/categories/actions) or [Discussions](https://github.com/ruby/setup-ruby/discussions) instead), it is only to report issues about ruby/setup-ruby.
Please note we will close your issue without comment if you do not fill out the requested information.
- type: checkboxes
attributes:
label: Ensure the following before filing this issue
@@ -26,21 +31,9 @@ body:
- self-hosted runner
validations:
required: true
- type: textarea
attributes:
render: yaml
label: The workflow code or a link to the workflow file
validations:
required: true
- type: input
attributes:
label: Link to the log of a failed workflow job, or to a gist with the output
validations:
required: true
- type: textarea
attributes:
render: shell
label: The command and output of the failing step
label: Link to the failed workflow job (must be a public workflow job, so the necessary information is available)
validations:
required: true
- type: textarea
+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
+14 -7
View File
@@ -1,17 +1,24 @@
name: Update the v1 branch when a release is published
name: Create a Release
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
contents: write # for creating release
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # for git push
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./
with:
ruby-version: '3.3'
- run: ruby release.rb
# The same as the update-v1-branch.yml workflow.
# That workflow is not triggered by the release created above because of
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
- run: git push origin HEAD:v1
+111 -31
View File
@@ -17,32 +17,60 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, macos-10.15, macos-11, macos-12, windows-2019, windows-2022 ]
ruby: [ '1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', ruby-head, jruby, jruby-head, truffleruby, truffleruby-head, truffleruby+graalvm, truffleruby+graalvm-head ]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-12, macos-13, macos-14, macos-15, windows-2019, windows-2022 ]
ruby: [
'1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', ruby-head,
jruby, jruby-head,
truffleruby, truffleruby-head,
truffleruby+graalvm, truffleruby+graalvm-head
]
include:
- { os: windows-2019, ruby: mingw }
- { os: windows-2019, ruby: mswin }
- { os: windows-2022, ruby: mingw }
- { os: windows-2022, ruby: mswin }
- { os: windows-2022, ruby: ucrt }
- { os: ubuntu-24.04, ruby: asan }
exclude:
# https://github.com/ruby/setup-ruby/issues/496
- { os: ubuntu-22.04, ruby: '2.2' }
- { os: ubuntu-24.04, ruby: '1.9' }
- { os: ubuntu-24.04, ruby: '2.2' }
# These old Rubies fail to compile on macOS arm64
- { os: macos-14, ruby: '1.9' }
- { os: macos-14, ruby: '2.0' }
- { os: macos-14, ruby: '2.1' }
- { os: macos-14, ruby: '2.2' }
- { os: macos-14, ruby: '2.3' }
- { os: macos-14, ruby: '2.4' }
- { os: macos-14, ruby: '2.5' }
- { os: macos-15, ruby: '1.9' }
- { os: macos-15, ruby: '2.0' }
- { os: macos-15, ruby: '2.1' }
- { os: macos-15, ruby: '2.2' }
- { os: macos-15, ruby: '2.3' }
- { os: macos-15, ruby: '2.4' }
- { os: macos-15, ruby: '2.5' }
# Windows (note: previews are not available on Windows)
- { os: windows-2019, ruby: '1.9' }
- { os: windows-2019, ruby: debug }
- { os: windows-2019, ruby: truffleruby }
- { os: windows-2019, ruby: truffleruby-head }
- { os: windows-2019, ruby: truffleruby+graalvm }
- { os: windows-2019, ruby: truffleruby+graalvm-head }
- { os: windows-2022, ruby: '1.9' }
- { os: windows-2019, ruby: '3.4' } # 3.4.0-preview2
- { os: windows-2022, ruby: '3.4' } # 3.4.0-preview2
- { os: windows-2019, ruby: debug }
- { os: windows-2022, ruby: debug }
- { os: windows-2019, ruby: truffleruby }
- { os: windows-2022, ruby: truffleruby }
- { os: windows-2019, ruby: truffleruby-head }
- { os: windows-2022, ruby: truffleruby-head }
- { os: windows-2019, ruby: truffleruby+graalvm }
- { os: windows-2022, ruby: truffleruby+graalvm }
- { os: windows-2019, ruby: truffleruby+graalvm-head }
- { os: windows-2022, ruby: truffleruby+graalvm-head }
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
@@ -115,9 +143,14 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/gem_from_github.gemfile
- name: which ruby, bundle
- name: which ruby
shell: bash
run: which -a ruby bundle
run: which -a ruby
- name: which bundle
shell: bash
run: which -a bundle
# https://github.com/ruby/setup-ruby/issues/658
if: "matrix.ruby != 'mingw' && matrix.ruby != 'mswin' && matrix.ruby != 'ucrt'"
- name: which rake
run: which -a rake
if: "!startsWith(matrix.os, 'windows')"
@@ -143,7 +176,7 @@ jobs:
name: "Test with no Gemfile"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rm Gemfile
- uses: ./
with:
@@ -151,21 +184,32 @@ jobs:
- run: ruby -v
testLatestRubygemsVersion:
name: "Test rubygems: latest upgrades the default RubyGems version"
name: "Test rubygems: latest on ${{ matrix.ruby }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { ruby: '3.2', expected_rubygems_version: '3.5.3' }
- { ruby: '3.0', expected_rubygems_version: '3.5.3' }
- { ruby: '2.7', expected_rubygems_version: '3.4.22' }
- { ruby: '2.6', expected_rubygems_version: '3.4.22' }
- { ruby: '2.5', expected_rubygems_version: '3.3.27' }
- { ruby: '2.3', expected_rubygems_version: '3.3.27' }
- { ruby: '2.0', expected_rubygems_version: '2.7.11' }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.6'
ruby-version: ${{ matrix.ruby }}
rubygems: latest
- run: ruby -e "exit(Gem.rubygems_version > Gem::Version.new('3.0.3'))"
- run: ruby -e 'puts Gem::VERSION; exit(Gem.rubygems_version >= Gem::Version.new("${{ matrix.expected_rubygems_version }}"))'
testFixedRubygemsVersionUpgrades:
name: "Test rubygems: version upgrades RubyGems to that version if the default is older"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.6'
@@ -176,7 +220,7 @@ jobs:
name: "Test rubygems: version noops if the default is newer"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '3.1.0'
@@ -187,19 +231,19 @@ jobs:
name: "Test rubygems: version uses the Bundler installed by the rubygems update"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.2'
rubygems: 2.7.11
- run: gem --version | grep -F "2.7.11"
- run: bundle --version | grep -F "1.16.6"
ruby-version: '3.1.0'
rubygems: 3.4.0
- run: gem --version | grep -F "3.4.0"
- run: bundle --version | grep -F "2.4.0"
testFixedBundlerVersionForOldRuby:
name: "Test bundler: 1.x for old Ruby"
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.2'
@@ -210,7 +254,7 @@ jobs:
name: "Test with a major Bundler version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.6'
@@ -221,7 +265,7 @@ jobs:
name: "Test with a minor Bundler version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.6'
@@ -232,20 +276,43 @@ jobs:
name: "Test with an exact Bundler version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.6'
bundler: 2.2.3
- run: bundle --version | grep -F "Bundler version 2.2.3"
testBundlerPre:
name: "Test with a Bundler pre/rc version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.6'
bundler: 2.2.0.rc.2
- run: bundle --version | grep -F "Bundler version 2.2.0.rc.2"
testBundlerDev:
name: "Test BUNDLED WITH Bundler dev"
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/bundler-dev.gemfile
steps:
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: ruby-head
bundler-cache: true
testDependencyOnBundler1:
name: "Test gemfile depending on Bundler 1"
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/bundler1.gemfile
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.7'
@@ -263,7 +330,7 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.6'
@@ -276,17 +343,30 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/nokogiri.gemfile
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: truffleruby-head
bundler-cache: true
- run: bundle list | grep nokogiri
testWindowsToolchain:
name: "Test windows-toolchain: none"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
ruby-version: '2.7'
windows-toolchain: none
bundler: none
- name: C:/msys64/mingw64/bin/gcc.exe not installed
run: ruby -e "abort if File.exist?('C:/msys64/mingw64/bin/gcc.exe')"
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: yarn install
- run: yarn run package
- name: Check generated files are up to date
+15
View File
@@ -0,0 +1,15 @@
name: Update the v1 branch when a release is published manually
on:
release:
types: [published]
permissions:
contents: write # for git push
jobs:
update_branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git push origin HEAD:v1
-1
View File
@@ -1 +0,0 @@
ruby-2.6.5
-2
View File
@@ -1,2 +0,0 @@
nodejs 16.0.0
ruby 2.7.0
+4
View File
@@ -24,3 +24,7 @@ $ cp pre-commit .git/hooks/pre-commit
This is entirely automated now since [this issue](https://github.com/ruby/setup-ruby/issues/254).
If you do not see a new version more than 24 hours after it was released feel free to file an issue.
## Release
Maintainers can create a release automatically by running [this workflow](https://github.com/ruby/setup-ruby/actions/workflows/release.yml).
+33 -26
View File
@@ -15,12 +15,16 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:
| Interpreter | Versions |
| ----------- | -------- |
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 3.2.0-preview1, head, debug, mingw, mswin, ucrt |
| `jruby` | 9.1.17.0 - 9.3.9.0, head |
| `truffleruby` | 19.3.0 - 22.3.0, head |
| `truffleruby+graalvm` | 21.2.0 - 22.3.0, head |
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 3.4.0-preview2, head, debug, mingw, mswin, ucrt |
| `jruby` | 9.1.17.0 - 9.4.9.0, head |
| `truffleruby` | 19.3.0 - 24.1.1, head |
| `truffleruby+graalvm` | 21.2.0 - 24.1.1, head |
`ruby-debug` is the same as `ruby-head` but with assertions enabled (`-DRUBY_DEBUG=1`).
`ruby-debug` is the same as `ruby-head` but with assertions enabled (`-DRUBY_DEBUG=1`).
`ruby-asan` is the same as `ruby-head` but with AddressSanitizer (ASan) enabled, helpful for finding memory issues in native extensions.
Native extensions are automatically compiled with AddressSanitizer when using `ruby-asan`.
`ruby-asan` is currently only available on `ubuntu-24.04`.
Regarding Windows ruby master builds, `mingw` is a MSYS2/MinGW build, `head` & `ucrt` are MSYS2/UCRT64
builds, and `mswin` is a MSVC/VS 2022 build.
@@ -38,23 +42,23 @@ which means Ruby ≤ 2.4 is unmaintained and considered insecure.
### Supported Platforms
The action works on these [GitHub-hosted runners](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners) virtual environments. Virtual environments not listed below are unsupported.
The action works on these [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) images. Runner images not listed below are not supported yet. `$OS-latest` just alias to one of these images.
| Operating System | Recommended | Other Supported Versions |
| ---------------- | ----------- | ------------------------ |
| Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04`, `ubuntu-22.04` |
| macOS | `macos-latest` (= `macos-11`) | `macos-10.15`, `macos-12` |
| Windows | `windows-latest` (= `windows-2022`) | `windows-2019` |
| Operating System | Supported |
| ---------------- | --------- |
| Ubuntu | `ubuntu-20.04`, `ubuntu-22.04`, `ubuntu-24.04` |
| macOS | `macos-12`, `macos-13`, `macos-14` |
| Windows | `windows-2019`, `windows-2022` |
The prebuilt releases are generated by [ruby-builder](https://github.com/ruby/ruby-builder)
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
The `mingw`, `ucrt` and `mswin` builds are generated by [ruby-loco](https://github.com/MSP-Greg/ruby-loco).
`ruby-head` is generated by [ruby-dev-builder](https://github.com/ruby/ruby-dev-builder),
`jruby-head` is generated by [jruby-dev-builder](https://github.com/ruby/jruby-dev-builder),
`truffleruby-head` is generated by [truffleruby-dev-builder](https://github.com/ruby/truffleruby-dev-builder)
and `truffleruby+graalvm` is generated by [graalvm-ce-dev-builds](https://github.com/graalvm/graalvm-ce-dev-builds).
The full list of available Ruby versions can be seen in [ruby-builder-versions.json](ruby-builder-versions.json)
for Ubuntu and macOS and in [windows-versions.json](windows-versions.json) for Windows.
`truffleruby-head` and `truffleruby+graalvm-head` are generated by [truffleruby-dev-builder](https://github.com/ruby/truffleruby-dev-builder).
The full list of available Ruby versions can be seen in [ruby-builder-versions.json](ruby-builder-versions.json) for Ubuntu and macOS
(although some combinations are not available, see [the full list](https://github.com/ruby/ruby-builder/releases/tag/toolcache))
and in [windows-versions.json](windows-versions.json) for Windows.
## Usage
@@ -67,10 +71,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0' # Not needed with a .ruby-version file
ruby-version: '3.3' # Not needed with a `.ruby-version` or `.tool-versions`
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake
```
@@ -89,10 +93,10 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['2.7', '3.0', '3.1', head, jruby, jruby-head, truffleruby, truffleruby-head]
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', head, jruby, jruby-head, truffleruby, truffleruby-head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
@@ -115,10 +119,10 @@ jobs:
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: '3.3'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake
```
@@ -132,7 +136,7 @@ and the [condition and expression syntax](https://help.github.com/en/actions/ref
* engine-version like `ruby-2.6.5` and `truffleruby-19.3.0`
* short version like `'2.6'`, automatically using the latest release matching that version (`2.6.10`)
* version only like `'2.6.5'`, assumes MRI for the engine
* engine only like `truffleruby`, uses the latest stable release of that implementation
* engine only like `ruby` and `truffleruby`, uses the latest stable release of that implementation
* `.ruby-version` reads from the project's `.ruby-version` file
* `.tool-versions` reads from the project's `.tool-versions` file
* If the `ruby-version` input is not specified, `.ruby-version` is tried first, followed by `.tool-versions`
@@ -233,6 +237,7 @@ It is recommended to first get your build working on Ubuntu and macOS before try
* For Ruby < 2.4, the DevKit MSYS tools are installed and prepended to the `Path`.
* Use JRuby 9.2.20+ on Windows (older versions have [bugs](https://github.com/ruby/setup-ruby/issues/18#issuecomment-889072695)).
* JRuby on Windows has multiple issues ([jruby/jruby#7106](https://github.com/jruby/jruby/issues/7106), [jruby/jruby#7182](https://github.com/jruby/jruby/issues/7182)).
* When compiling extension code, note that the packages required to build Ruby are included when using Windows 2022, but that Windows 2019 does not include all of them, and may require installing package(s). This can be done with [setup-ruby-pkgs](https://github.com/ruby/setup-ruby-pkgs) or via MSYS2's pacman. These packages may be required when installing or updating Ruby std-lib extension gems.
## Versioning
@@ -249,10 +254,9 @@ This follows the [recommendations](https://github.com/actions/toolkit/blob/maste
## Using self-hosted runners
This action might work with [self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners)
if the [virtual environment](https://github.com/actions/virtual-environments) is very similar to the ones used by GitHub runners. Notably:
if the [Runner Image](https://github.com/actions/runner-images) is very similar to the ones used by GitHub runners. Notably:
* Make sure to use the same operating system and version.
* Set the environment variable `ImageOS` on the runner to the corresponding value on GitHub-hosted runners (e.g. `ubuntu18`/`macos1015`/`win19`). This is necessary to detect the operating system and version.
* Make sure to use the same version of libssl.
* Make sure that the operating system has `libyaml-0` and [`libgmp`](https://stackoverflow.com/questions/26555902/ruby-v-dyld-library-not-loaded-usr-local-lib-libgmp-10-dylib) installed
* The default tool cache directory (`/opt/hostedtoolcache` on Linux, `/Users/runner/hostedtoolcache` on macOS,
@@ -260,9 +264,12 @@ if the [virtual environment](https://github.com/actions/virtual-environments) is
This is necessary since the Ruby builds embed the install path when built and cannot be moved around.
* `/home/runner` must be writable by the `runner` user.
In other cases, please use a system Ruby or [install Ruby manually](https://github.com/postmodern/chruby/wiki#installing-rubies) instead.
In other cases, you will need to install Ruby in the runner tool cache as shown by the action when it detects that case
(run it so it will show you where to install Ruby).
You could of course also not use this action and e.g. use Ruby from a system package or use a Docker image instead.
On a self-hosted runner you need to define the `ImageOs` as an evironment variable on the host, you can do this in the `~/actions-runner/.env` file (See [#230](https://github.com/ruby/setup-ruby/issues/230)).
See also the [`self-hosted:` input](action.yml).
You can set it to `true` if you want to use custom-built Rubies in your self-hosted toolcache instead of prebuild Rubies.
## History
+17 -2
View File
@@ -12,7 +12,8 @@ inputs:
description: |
The version of RubyGems to use. Either 'default' (the default), 'latest', or a version number (e.g., 3.3.5).
For 'default', no action is taken and the version of RubyGems that comes with Ruby by default is used.
For 'latest', `gem update --system` is run to update to the latest RubyGems version.
For 'latest', `gem update --system` is run to update to the latest compatible RubyGems version.
Ruby head/master builds will not be updated.
Similarly, if a version number is given, `gem update --system <version>` is run to update to that version of RubyGems, as long as that version is newer than the one provided by default.
bundler:
description: |
@@ -30,9 +31,23 @@ inputs:
description: |
Arbitrary string that will be added to the cache key of the bundler cache. Set or change it if you need
to invalidate the cache.
self-hosted:
description: |
Consider the runner as a self-hosted runner, which means not using prebuilt Ruby binaries which only work
on GitHub-hosted runners or self-hosted runners with a very similar image to the ones used by GitHub runners.
The default is to detect this automatically based on the OS, OS version and architecture.
windows-toolchain:
description: |
This input allows to override the default toolchain setup on Windows.
The default setting ('default') installs a toolchain based on the selected Ruby.
Specifically, it installs MSYS2 if not already there and installs mingw/ucrt/mswin build tools and packages.
It also sets environment variables using 'ridk' or 'vcvars64.bat' based on the selected Ruby.
At present, the only other setting than 'default' is 'none', which only adds Ruby to PATH.
No build tools or packages are installed, nor are any ENV setting changed to activate them.
outputs:
ruby-prefix:
description: 'The prefix of the installed ruby'
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
+38 -9
View File
@@ -7,6 +7,10 @@ const common = require('./common')
export const DEFAULT_CACHE_VERSION = '0'
function isValidBundlerVersion(bundlerVersion) {
return /^\d+(?:\.\d+){0,2}/.test(bundlerVersion) && !bundlerVersion.endsWith('.dev')
}
// The returned gemfile is guaranteed to exist, the lockfile might not exist
export function detectGemfiles() {
const gemfilePath = process.env['BUNDLE_GEMFILE'] || 'Gemfile'
@@ -30,10 +34,14 @@ function readBundledWithFromGemfileLock(lockFile) {
const bundledWithLine = lines.findIndex(line => /^BUNDLED WITH$/.test(line.trim()))
if (bundledWithLine !== -1) {
const nextLine = lines[bundledWithLine+1]
if (nextLine && /^\d+/.test(nextLine.trim())) {
if (nextLine) {
const bundlerVersion = nextLine.trim()
console.log(`Using Bundler ${bundlerVersion} from ${lockFile} BUNDLED WITH ${bundlerVersion}`)
return bundlerVersion
if (isValidBundlerVersion(bundlerVersion)) {
console.log(`Using Bundler ${bundlerVersion} from ${lockFile} BUNDLED WITH ${bundlerVersion}`)
return bundlerVersion
} else {
console.log(`Could not parse BUNDLED WITH version as a valid Bundler release, ignoring it: ${bundlerVersion}`)
}
}
}
}
@@ -72,7 +80,7 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
if (bundlerVersion === 'default') {
if (common.isBundler2dot2Default(engine, rubyVersion)) {
if (common.windows && engine === 'ruby' && (common.isStableVersion(rubyVersion) || rubyVersion === 'head')) {
if (common.windows && engine === 'ruby' && (common.isStableVersion(engine, rubyVersion) || rubyVersion === 'head')) {
// https://github.com/ruby/setup-ruby/issues/371
console.log(`Installing latest Bundler for ${engine}-${rubyVersion} on Windows because bin/bundle does not work in bash otherwise`)
bundlerVersion = 'latest'
@@ -95,7 +103,7 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
bundlerVersion = '2'
}
if (/^\d+(?:\.\d+){0,2}$/.test(bundlerVersion)) {
if (isValidBundlerVersion(bundlerVersion)) {
// OK - input is a 1, 2, or 3 part version number
} else {
throw new Error(`Cannot parse bundler input: ${bundlerVersion}`)
@@ -115,13 +123,26 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
}
}
const targetRubyVersion = common.targetRubyVersion(engine, rubyVersion)
// Use Bundler 2.3 when we use Ruby 2.3.2 - 2.5
// Use Bundler 2.4 when we use Ruby 2.6-2.7
if (bundlerVersion == '2') {
if (targetRubyVersion <= 2.5) { // < 2.3.2 already handled above
console.log('Ruby 2.3.2 - 2.5 only works with Bundler 2.3')
bundlerVersion = '2.3'
} else if (targetRubyVersion <= 2.7) {
console.log('Ruby 2.6-2.7 only works with Bundler 2.4')
bundlerVersion = '2.4'
}
}
const gem = path.join(rubyPrefix, 'bin', 'gem')
// Workaround for https://github.com/rubygems/rubygems/issues/5245
// and for https://github.com/oracle/truffleruby/issues/2780
const force = ((platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) || (engine === 'truffleruby')) ? ['--force'] : []
const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length
const bundlerVersionConstraint = versionParts === 3 ? bundlerVersion : `~> ${bundlerVersion}.0`
const bundlerVersionConstraint = versionParts >= 3 ? bundlerVersion : `~> ${bundlerVersion}.0`
await exec.exec(gem, ['install', 'bundler', ...force, '-v', bundlerVersionConstraint])
@@ -170,7 +191,8 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
// restore cache & install
let cachedKey = null
try {
cachedKey = await cache.restoreCache(paths, key, restoreKeys)
// .slice() to workaround https://github.com/actions/toolkit/issues/1377
cachedKey = await cache.restoreCache(paths.slice(), key, restoreKeys)
} catch (error) {
if (error.name === cache.ValidationError.name) {
throw error;
@@ -211,8 +233,15 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
}
async function computeBaseKey(platform, engine, version, lockFile, cacheVersion) {
const cacheVersionSuffix = DEFAULT_CACHE_VERSION === cacheVersion ? '' : `-cachever:${cacheVersion}`
let key = `setup-ruby-bundler-cache-v4-${platform}-${engine}-${version}${cacheVersionSuffix}`
const cwd = process.cwd()
const bundleWith = process.env['BUNDLE_WITH'] || ''
const bundleWithout = process.env['BUNDLE_WITHOUT'] || ''
const bundleOnly = process.env['BUNDLE_ONLY'] || ''
let key = `setup-ruby-bundler-cache-v6-${common.getOSNameVersionArch()}-${engine}-${version}-wd-${cwd}-with-${bundleWith}-without-${bundleWithout}-only-${bundleOnly}`
if (cacheVersion !== DEFAULT_CACHE_VERSION) {
key += `-v-${cacheVersion}`
}
if (common.isHeadVersion(version)) {
if (engine !== 'jruby') {
+205 -53
View File
@@ -5,12 +5,18 @@ const util = require('util')
const stream = require('stream')
const crypto = require('crypto')
const core = require('@actions/core')
const tc = require('@actions/tool-cache')
const { performance } = require('perf_hooks')
const linuxOSInfo = require('linux-os-info')
export const windows = (os.platform() === 'win32')
// Extract to SSD on Windows, see https://github.com/ruby/setup-ruby/pull/14
export const drive = (windows ? (process.env['GITHUB_WORKSPACE'] || 'C')[0] : undefined)
export const inputs = {
selfHosted: undefined
}
export function partition(string, separator) {
const i = string.indexOf(separator)
if (i === -1) {
@@ -47,12 +53,28 @@ export async function measure(name, block) {
}
}
export function isHeadVersion(rubyVersion) {
return ['head', 'debug', 'mingw', 'mswin', 'ucrt'].includes(rubyVersion)
// Same as mesaure() but without the group, and no time shown on error
export async function time(name, block) {
console.log(`> ${name}`)
const start = performance.now()
const value = await block()
const end = performance.now()
const duration = (end - start) / 1000.0
console.log(`Took ${duration.toFixed(2).padStart(6)} seconds`)
return value
}
export function isStableVersion(rubyVersion) {
return /^\d+(\.\d+)*$/.test(rubyVersion)
export function isHeadVersion(rubyVersion) {
return ['head', 'debug', 'mingw', 'mswin', 'ucrt', 'asan'].includes(rubyVersion)
}
export function isStableVersion(engine, rubyVersion) {
if (engine.startsWith('truffleruby')) {
return /^\d+(\.\d+)*(-preview\d+)?$/.test(rubyVersion)
} else {
return /^\d+(\.\d+)*$/.test(rubyVersion)
}
}
export function hasBundlerDefaultGem(engine, rubyVersion) {
@@ -95,6 +117,31 @@ export function isBundler2dot2Default(engine, rubyVersion) {
}
}
export function targetRubyVersion(engine, rubyVersion) {
const version = floatVersion(rubyVersion)
if (engine === 'ruby') {
return version
} else if (engine === 'jruby') {
if (version === 9.1) {
return 2.3
} else if (version === 9.2) {
return 2.5
} else if (version === 9.3) {
return 2.6
}
} else if (engine.startsWith('truffleruby')) {
if (version < 21.0) {
return 2.6
} else if (version < 22.0) {
return 2.7
} else if (version < 23.0) {
return 3.0
}
}
return 9.9 // unknown, assume recent
}
export function floatVersion(rubyVersion) {
const match = rubyVersion.match(/^\d+\.\d+/)
if (match) {
@@ -114,75 +161,179 @@ export async function hashFile(file) {
return hash.digest('hex')
}
function getImageOS() {
const imageOS = process.env['ImageOS']
if (!imageOS) {
throw new Error('The environment variable ImageOS must be set')
}
return imageOS
}
export const supportedPlatforms = [
'ubuntu-18.04',
'ubuntu-20.04',
'ubuntu-22.04',
'macos-10.15',
'macos-11',
'macos-12',
'windows-2019',
'windows-2022',
// macos is not listed explicitly, see below
const GitHubHostedPlatforms = [
'ubuntu-20.04-x64',
'ubuntu-22.04-x64',
'ubuntu-24.04-x64',
'windows-2019-x64',
'windows-2022-x64',
]
export function getVirtualEnvironmentName() {
const imageOS = getImageOS()
// Precisely: whether we have builds for that platform and there are GitHub-hosted runners to test it
function isSupportedPlatform() {
const platform = getOSName()
switch (platform) {
case 'ubuntu':
return GitHubHostedPlatforms.includes(getOSNameVersionArch())
case 'macos':
// See https://github.com/ruby/ruby-builder/blob/master/README.md#naming
// 13 on arm64 because of old macos-arm-oss runners
return (os.arch() === 'x64' && parseInt(getOSVersion()) >= 12) ||
(os.arch() === 'arm64' && parseInt(getOSVersion()) >= 13)
case 'windows':
return GitHubHostedPlatforms.includes(getOSNameVersionArch())
}
}
let match = imageOS.match(/^ubuntu(\d+)/) // e.g. ubuntu18
if (match) {
return `ubuntu-${match[1]}.04`
// Actually a self-hosted runner for which the OS and OS version does not correspond to a GitHub-hosted runner image,
export function isSelfHostedRunner() {
if (inputs.selfHosted === undefined) {
throw new Error('inputs.selfHosted should have been already set')
}
match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos1015, macos11
if (match) {
if (match[2]) {
return `macos-${match[1]}.${match[2]}`
} else {
return `macos-${match[1]}`
}
return inputs.selfHosted === 'true' || !isSupportedPlatform()
}
export function selfHostedRunnerReason() {
if (inputs.selfHosted === 'true') {
return 'the self-hosted input was set'
} else if (!isSupportedPlatform()) {
return 'the platform does not match a GitHub-hosted runner image (or that image is deprecated and no longer supported)'
} else {
return 'unknown reason'
}
}
let osName = undefined
let osVersion = undefined
export function getOSName() {
if (osName !== undefined) {
return osName
}
match = imageOS.match(/^win(\d+)/) // e.g. win19
if (match) {
return `windows-20${match[1]}`
const platform = os.platform()
if (platform === 'linux') {
const info = linuxOSInfo({mode: 'sync'})
osName = info.id
} else if (platform === 'darwin') {
osName = 'macos'
} else if (platform === 'win32') {
osName = 'windows'
} else {
throw new Error(`Unknown platform ${platform}`)
}
throw new Error(`Unknown ImageOS ${imageOS}`)
return osName
}
export function getOSVersion() {
if (osVersion !== undefined) {
return osVersion
}
const platform = os.platform()
if (platform === 'linux') {
const info = linuxOSInfo({mode: 'sync'})
osVersion = info.version_id
} else if (platform === 'darwin') {
// See https://github.com/sindresorhus/macos-release/blob/main/index.js
const darwinVersion = parseInt(os.release().match(/^\d+/)[0])
osVersion = `${darwinVersion - 9}`
} else if (platform === 'win32') {
osVersion = findWindowsVersion()
} else {
throw new Error(`Unknown platform ${platform}`)
}
return osVersion
}
export function getOSNameVersion() {
return `${getOSName()}-${getOSVersion()}`
}
export function getOSNameVersionArch() {
return `${getOSName()}-${getOSVersion()}-${os.arch()}`
}
function findWindowsVersion() {
const version = os.version()
const match = version.match(/^Windows Server (\d+) Datacenter/)
if (match) {
return match[1]
} else {
throw new Error('Could not find Windows version')
}
}
export function shouldUseToolCache(engine, version) {
return engine === 'ruby' && !isHeadVersion(version)
return (engine === 'ruby' && !isHeadVersion(version)) || isSelfHostedRunner()
}
function getPlatformToolCache(platform) {
// Hardcode paths rather than using $RUNNER_TOOL_CACHE because the prebuilt Rubies cannot be moved anyway
if (platform.startsWith('ubuntu-')) {
return '/opt/hostedtoolcache'
} else if (platform.startsWith('macos-')) {
return '/Users/runner/hostedtoolcache'
} else if (platform.startsWith('windows-')) {
return 'C:/hostedtoolcache/windows'
export function getToolCachePath() {
if (isSelfHostedRunner()) {
return getRunnerToolCache()
} else {
throw new Error('Unknown platform')
// Rubies prebuilt by this action embed this path rather than using $RUNNER_TOOL_CACHE
// so use that path if not isSelfHostedRunner()
return getDefaultToolCachePath()
}
}
export function getToolCacheRubyPrefix(platform, version) {
const toolCache = getPlatformToolCache(platform)
return path.join(toolCache, 'Ruby', version, 'x64')
export function getRunnerToolCache() {
const runnerToolCache = process.env['RUNNER_TOOL_CACHE']
if (!runnerToolCache) {
throw new Error('$RUNNER_TOOL_CACHE must be set')
}
return runnerToolCache
}
// Rubies prebuilt by this action embed this path rather than using $RUNNER_TOOL_CACHE
function getDefaultToolCachePath() {
const platform = getOSName()
switch (platform) {
case 'ubuntu':
return '/opt/hostedtoolcache'
case 'macos':
return '/Users/runner/hostedtoolcache'
case 'windows':
return 'C:\\hostedtoolcache\\windows'
}
}
// tc.find() but using RUNNER_TOOL_CACHE=getToolCachePath()
export function toolCacheFind(engine, version) {
const originalToolCache = getToolCachePath()
process.env['RUNNER_TOOL_CACHE'] = getToolCachePath()
try {
return tc.find(engineToToolCacheName(engine), version)
} finally {
process.env['RUNNER_TOOL_CACHE'] = originalToolCache
}
}
function engineToToolCacheName(engine) {
return {
ruby: 'Ruby',
jruby: 'JRuby',
truffleruby: 'TruffleRuby',
"truffleruby+graalvm": 'TruffleRubyGraalVM'
}[engine]
}
export function getToolCacheRubyPrefix(platform, engine, version) {
const toolCache = getToolCachePath()
return path.join(toolCache, engineToToolCacheName(engine), version, os.arch())
}
export function toolCacheCompleteFile(toolCacheRubyPrefix) {
return `${toolCacheRubyPrefix}.complete`
}
export function createToolCacheCompleteFile(toolCacheRubyPrefix) {
const completeFile = `${toolCacheRubyPrefix}.complete`
fs.writeFileSync(completeFile, '')
fs.writeFileSync(toolCacheCompleteFile(toolCacheRubyPrefix), '')
}
// convert windows path like C:\Users\runneradmin to /c/Users/runneradmin
@@ -222,7 +373,8 @@ export function setupPath(newPathEntries) {
// Then add new path entries using core.addPath()
let newPath
if (windows) {
const windowsToolchain = core.getInput('windows-toolchain')
if (windows && windowsToolchain !== 'none') {
// main Ruby dll determines whether mingw or ucrt build
msys2Type = rubyIsUCRT(newPathEntries[0]) ? 'ucrt64' : 'mingw64'
Generated Vendored
+3857 -7339
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem "path"
+13
View File
@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
path (2.0.1)
PLATFORMS
x86_64-linux
DEPENDENCIES
path
BUNDLED WITH
2.4.0.dev
+50 -10
View File
@@ -16,6 +16,8 @@ const inputDefaults = {
'bundler-cache': 'false',
'working-directory': '.',
'cache-version': bundler.DEFAULT_CACHE_VERSION,
'self-hosted': 'false',
'windows-toolchain': 'default',
}
// entry point when this action is run on its own
@@ -23,8 +25,15 @@ export async function run() {
try {
await setupRuby()
} catch (error) {
core.setFailed(error.stack)
if (/\bprocess\b.+\bfailed\b/.test(error.message)) {
core.setFailed(error.message)
} else {
core.setFailed(error.stack)
}
}
// Explicit process.exit() to not wait hanging promises,
// see https://github.com/ruby/setup-ruby/issues/543
process.exit()
}
// entry point when this action is run from other actions
@@ -35,28 +44,35 @@ export async function setupRuby(options = {}) {
inputs[key] = core.getInput(key) || inputDefaults[key]
}
}
common.inputs.selfHosted = inputs['self-hosted']
process.chdir(inputs['working-directory'])
const platform = common.getVirtualEnvironmentName()
const platform = common.getOSNameVersion()
const [engine, parsedVersion] = parseRubyEngineAndVersion(inputs['ruby-version'])
let installer
if (platform.startsWith('windows-') && engine === 'ruby') {
if (platform.startsWith('windows-') && engine === 'ruby' && !common.isSelfHostedRunner()) {
installer = require('./windows')
} else {
installer = require('./ruby-builder')
}
const engineVersions = installer.getAvailableVersions(platform, engine)
const version = validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVersion)
let version
if (common.isSelfHostedRunner()) {
// The list of available Rubies in the hostedtoolcache is unrelated to getAvailableVersions()
version = parsedVersion
} else {
const engineVersions = installer.getAvailableVersions(platform, engine)
version = validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVersion)
}
createGemRC(engine, version)
envPreInstall()
// JRuby can use compiled extension code, so make sure gcc exists.
// As of Jan-2022, JRuby compiles against msvcrt.
if (platform.startsWith('windows') && (engine === 'jruby') &&
if (platform.startsWith('windows') && engine === 'jruby' &&
!fs.existsSync('C:\\msys64\\mingw64\\bin\\gcc.exe')) {
await require('./windows').installJRubyTools()
}
@@ -69,7 +85,7 @@ export async function setupRuby(options = {}) {
const rubygemsInputSet = inputs['rubygems'] !== 'default'
if (rubygemsInputSet) {
await common.measure('Updating RubyGems', async () =>
rubygems.rubygemsUpdate(inputs['rubygems'], rubyPrefix))
rubygems.rubygemsUpdate(inputs['rubygems'], rubyPrefix, platform, engine, version))
}
// When setup-ruby is used by other actions, this allows code in them to run
@@ -88,7 +104,7 @@ export async function setupRuby(options = {}) {
}
if (inputs['bundler-cache'] === 'true') {
await common.measure('bundle install', async () =>
await common.time('bundle install', async () =>
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version']))
}
@@ -139,7 +155,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
if (!engineVersions.includes(parsedVersion)) {
const latestToFirstVersion = engineVersions.slice().reverse()
// Try to match stable versions first, so an empty version (engine-only) matches the latest stable version
let found = latestToFirstVersion.find(v => common.isStableVersion(v) && v.startsWith(parsedVersion))
let found = latestToFirstVersion.find(v => common.isStableVersion(engine, v) && v.startsWith(parsedVersion))
if (!found) {
// Exclude head versions, they must be exact matches
found = latestToFirstVersion.find(v => !common.isHeadVersion(v) && v.startsWith(parsedVersion))
@@ -149,11 +165,35 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
version = found
} else {
throw new Error(`Unknown version ${parsedVersion} for ${engine} on ${platform}
available versions for ${engine} on ${platform}: ${engineVersions.join(', ')}
Available versions for ${engine} on ${platform}: ${engineVersions.join(', ')}
Make sure you use the latest version of the action with - uses: ruby/setup-ruby@v1`)
}
}
// Well known version-platform combinations which do not work:
if (engine === 'ruby' && platform.startsWith('macos') && os.arch() === 'arm64' && common.floatVersion(version) < 2.6) {
throw new Error(`CRuby < 2.6 does not support macos-arm64.
Either use a newer Ruby version or use a macOS image running on amd64, e.g., macos-13 or macos-12.
Note that GitHub changed the meaning of macos-latest from macos-12 (amd64) to macos-14 (arm64):
https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/
If you are using a matrix of Ruby versions, a good solution is to run only < 2.6 on amd64, like so:
matrix:
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
os: [ ubuntu-latest, macos-latest ]
# CRuby < 2.6 does not support macos-arm64, so test those on amd64 instead
exclude:
- { os: macos-latest, ruby: '2.4' }
- { os: macos-latest, ruby: '2.5' }
include:
- { os: macos-13, ruby: '2.4' }
- { os: macos-13, ruby: '2.5' }
But of course you should consider dropping support for these long-EOL Rubies, which cannot even be built on recent macOS machines.`)
} else if (engine === 'truffleruby' && platform.startsWith('windows')) {
throw new Error('TruffleRuby does not currently support Windows.')
}
return version
}
+19 -19
View File
@@ -1,24 +1,24 @@
engine_input, version = ARGV.fetch(0).split('-', 2)
versions = ARGV.fetch(0).split(',').map(&:strip)
p versions
if engine_input == 'windows'
require_relative 'generate-windows-versions'
exit
end
versions.each do |engine_version|
puts engine_version
engine, version = engine_version.split('-', 2)
p [engine, version]
MATCH = case engine_input
when 'ruby', 'jruby'
/^\d+\.\d+\./
when 'truffleruby'
/^\d+\./
end
if engine == 'windows'
require_relative 'generate-windows-versions'
exit
end
raise unless version[MATCH]
match = case engine
when 'ruby', 'jruby'
/^\d+\.\d+\./
when 'truffleruby', 'truffleruby+graalvm'
/^\d+\./
end
engines = [engine_input]
engines << 'truffleruby+graalvm' if engine_input == 'truffleruby'
engines.each do |engine|
puts engine
raise engine_version unless version[match]
# Update ruby-builder-versions.json
file = "#{__dir__}/ruby-builder-versions.json"
@@ -35,7 +35,7 @@ engines.each do |engine|
puts lines[from..to]
release_line = lines[from..to].find { |line|
v = line[/"([^"]+)"/, 1] and v[MATCH] == version[MATCH]
v = line[/"([^"]+)"/, 1] and v[match] == version[match]
}
if release_line
@@ -51,7 +51,7 @@ engines.each do |engine|
file = "#{__dir__}/README.md"
lines = File.readlines(file)
engine_line = lines.find { |line| line.start_with?("| `#{engine}`") }
engine_line.sub!(/(.+ (?:-|until)) (\d+(?:\.\d+)+)/) do
engine_line.sub!(/(.+ (?:-|until)) (\d+(?:\.\d+)+(?:-\w+)?)/) do
if Gem::Version.new(version) > Gem::Version.new($2)
"#{$1} #{version}"
else
+4 -3
View File
@@ -22,11 +22,12 @@
},
"homepage": "https://github.com/ruby/setup-ruby",
"dependencies": {
"@actions/cache": "^2.0.2",
"@actions/core": "^1.9.1",
"@actions/cache": "^3",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.2",
"@actions/tool-cache": "^1.7.2",
"@actions/tool-cache": "^2",
"linux-os-info": "^2.0.0",
"semver": "^7.3.7"
},
"devDependencies": {
+17
View File
@@ -0,0 +1,17 @@
require 'json'
def run(command_line)
puts "$ #{command_line}"
output = `#{command_line}`
puts output
raise $?.inspect unless $?.success?
output
end
latest_release_tag = run 'gh release view --json tagName'
latest_release_tag = JSON.load(latest_release_tag).fetch('tagName')
raise latest_release_tag unless latest_release_tag =~ /\Av(\d+).(\d+).(\d+)\z/
tag = "v#{$1}.#{Integer($2)+1}.0"
run "gh release create --generate-notes --latest #{tag}"
+15 -8
View File
@@ -8,28 +8,35 @@
"2.4.0", "2.4.1", "2.4.2", "2.4.3", "2.4.4", "2.4.5", "2.4.6", "2.4.7", "2.4.9", "2.4.10",
"2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.5.4", "2.5.5", "2.5.6", "2.5.7", "2.5.8", "2.5.9",
"2.6.0", "2.6.1", "2.6.2", "2.6.3", "2.6.4", "2.6.5", "2.6.6", "2.6.7", "2.6.8", "2.6.9", "2.6.10",
"2.7.0", "2.7.1", "2.7.2", "2.7.3", "2.7.4", "2.7.5", "2.7.6",
"3.0.0-preview1", "3.0.0-preview2", "3.0.0-rc1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4",
"3.1.0-preview1", "3.1.0", "3.1.1", "3.1.2",
"3.2.0-preview1", "3.2.0-preview2",
"head", "debug"
"2.7.0", "2.7.1", "2.7.2", "2.7.3", "2.7.4", "2.7.5", "2.7.6", "2.7.7", "2.7.8",
"3.0.0-preview1", "3.0.0-preview2", "3.0.0-rc1", "3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7",
"3.1.0-preview1", "3.1.0", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6",
"3.2.0-preview1", "3.2.0-preview2", "3.2.0-preview3", "3.2.0-rc1", "3.2.0", "3.2.1", "3.2.2", "3.2.3", "3.2.4", "3.2.5", "3.2.6",
"3.3.0-preview1", "3.3.0-preview2", "3.3.0-preview3", "3.3.0-rc1", "3.3.0", "3.3.1", "3.3.2", "3.3.3", "3.3.4", "3.3.5", "3.3.6",
"3.4.0-preview1", "3.4.0-preview2",
"head", "debug", "asan"
],
"jruby": [
"9.1.17.0",
"9.2.9.0", "9.2.10.0", "9.2.11.0", "9.2.11.1", "9.2.12.0", "9.2.13.0", "9.2.14.0", "9.2.15.0", "9.2.16.0", "9.2.17.0", "9.2.18.0", "9.2.19.0", "9.2.20.0", "9.2.20.1", "9.2.21.0",
"9.3.0.0", "9.3.1.0", "9.3.2.0", "9.3.3.0", "9.3.4.0", "9.3.6.0", "9.3.7.0", "9.3.8.0", "9.3.9.0",
"9.3.0.0", "9.3.1.0", "9.3.2.0", "9.3.3.0", "9.3.4.0", "9.3.6.0", "9.3.7.0", "9.3.8.0", "9.3.9.0", "9.3.10.0", "9.3.11.0", "9.3.13.0", "9.3.14.0", "9.3.15.0",
"9.4.0.0", "9.4.1.0", "9.4.2.0", "9.4.3.0", "9.4.4.0", "9.4.5.0", "9.4.6.0", "9.4.7.0", "9.4.8.0", "9.4.9.0",
"head"
],
"truffleruby": [
"19.3.0", "19.3.1",
"20.0.0", "20.1.0", "20.2.0", "20.3.0",
"21.0.0", "21.1.0", "21.2.0", "21.2.0.1", "21.3.0",
"22.0.0.2", "22.1.0", "22.2.0", "22.3.0",
"22.0.0.2", "22.1.0", "22.2.0", "22.3.0", "22.3.1",
"23.0.0-preview1", "23.0.0", "23.1.0", "23.1.1", "23.1.2",
"24.0.0", "24.0.1", "24.0.2", "24.1.0", "24.1.1",
"head"
],
"truffleruby+graalvm": [
"21.2.0", "21.3.0",
"22.0.0.2", "22.1.0", "22.2.0", "22.3.0",
"22.0.0.2", "22.1.0", "22.2.0", "22.3.0", "22.3.1",
"23.0.0-preview1", "23.0.0", "23.1.0", "23.1.1", "23.1.2",
"24.0.0", "24.0.1", "24.0.2", "24.1.0", "24.1.1",
"head"
]
}
+47 -40
View File
@@ -1,6 +1,7 @@
const os = require('os')
const fs = require('fs')
const path = require('path')
const core = require('@actions/core')
const exec = require('@actions/exec')
const io = require('@actions/io')
const tc = require('@actions/tool-cache')
@@ -13,21 +14,31 @@ const releasesURL = 'https://github.com/ruby/ruby-builder/releases'
const windows = common.windows
export function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
return rubyBuilderVersions[engine]
}
export async function install(platform, engine, version) {
let rubyPrefix, inToolCache
if (common.shouldUseToolCache(engine, version)) {
inToolCache = tc.find('Ruby', version)
inToolCache = common.toolCacheFind(engine, version)
if (inToolCache) {
rubyPrefix = inToolCache
} else {
rubyPrefix = common.getToolCacheRubyPrefix(platform, version)
const toolCacheRubyPrefix = common.getToolCacheRubyPrefix(platform, engine, version)
if (common.isSelfHostedRunner()) {
const rubyBuildDefinition = engine === 'ruby' ? version : `${engine}-${version}`
core.error(
`The current runner (${common.getOSNameVersionArch()}) was detected as self-hosted because ${common.selfHostedRunnerReason()}.\n` +
`In such a case, you should install Ruby in the $RUNNER_TOOL_CACHE yourself, for example using https://github.com/rbenv/ruby-build\n` +
`You can take inspiration from this workflow for more details: https://github.com/ruby/ruby-builder/blob/master/.github/workflows/build.yml\n` +
`$ ruby-build ${rubyBuildDefinition} ${toolCacheRubyPrefix}\n` +
`Once that completes successfully, mark it as complete with:\n` +
`$ touch ${common.toolCacheCompleteFile(toolCacheRubyPrefix)}\n` +
`It is your responsibility to ensure installing Ruby like that is not done in parallel.\n`)
process.exit(1)
} else {
rubyPrefix = toolCacheRubyPrefix
}
}
} else if (windows) {
rubyPrefix = path.join(`${common.drive}:`, `${engine}-${version}`)
@@ -39,48 +50,36 @@ export async function install(platform, engine, version) {
common.setupPath([path.join(rubyPrefix, 'bin')])
if (!inToolCache) {
await preparePrefix(rubyPrefix)
if (engine === 'truffleruby+graalvm') {
await installWithRubyBuild(engine, version, rubyPrefix)
} else {
await downloadAndExtract(platform, engine, version, rubyPrefix)
}
await io.mkdirP(rubyPrefix)
await downloadAndExtract(platform, engine, version, rubyPrefix)
}
// https://github.com/oracle/truffleruby/issues/3390
if (engine.startsWith('truffleruby') && common.floatVersion(version) >= 24.0 && !common.isSelfHostedRunner() && common.getOSNameVersionArch() === 'macos-12-x64') {
console.log('Setting MACOSX_DEPLOYMENT_TARGET=11.0 to workaround bug in XCode 14.2 linker not respecting RTLD_LAZY, see https://github.com/oracle/truffleruby/issues/3390')
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', '11.0')
}
return rubyPrefix
}
async function preparePrefix(rubyPrefix) {
const parentDir = path.dirname(rubyPrefix)
await io.rmRF(rubyPrefix)
if (!(fs.existsSync(parentDir) && fs.statSync(parentDir).isDirectory())) {
await io.mkdirP(parentDir)
}
}
async function installWithRubyBuild(engine, version, rubyPrefix) {
const tmp = process.env['RUNNER_TEMP'] || os.tmpdir()
const rubyBuildDir = path.join(tmp, 'ruby-build-for-setup-ruby')
await common.measure('Cloning ruby-build', async () => {
await exec.exec('git', ['clone', 'https://github.com/rbenv/ruby-build.git', rubyBuildDir])
})
const rubyName = `${engine}-${version === 'head' ? 'dev' : version}`
await common.measure(`Installing ${engine}-${version} with ruby-build`, async () => {
await exec.exec(`${rubyBuildDir}/bin/ruby-build`, [rubyName, rubyPrefix])
})
await io.rmRF(rubyBuildDir)
}
async function downloadAndExtract(platform, engine, version, rubyPrefix) {
const parentDir = path.dirname(rubyPrefix)
const downloadPath = await common.measure('Downloading Ruby', async () => {
const url = getDownloadURL(platform, engine, version)
console.log(url)
return await tc.downloadTool(url)
try {
return await tc.downloadTool(url)
} catch (error) {
if (error.message.includes('404')) {
throw new Error(`Unavailable version ${version} for ${engine} on ${platform}
You can request it at https://github.com/ruby/setup-ruby/issues
Cause: ${error.message}`)
} else {
throw error
}
}
})
await common.measure('Extracting Ruby', async () => {
@@ -99,10 +98,14 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
function getDownloadURL(platform, engine, version) {
let builderPlatform = platform
if (platform.startsWith('windows-')) {
if (platform.startsWith('windows-') && os.arch() === 'x64') {
builderPlatform = 'windows-latest'
} else if (platform.startsWith('macos-')) {
builderPlatform = 'macos-latest'
if (os.arch() === 'x64') {
builderPlatform = 'macos-latest'
} else if (os.arch() === 'arm64') {
builderPlatform = 'macos-13-arm64'
}
}
if (common.isHeadVersion(version)) {
@@ -113,5 +116,9 @@ function getDownloadURL(platform, engine, version) {
}
function getLatestHeadBuildURL(platform, engine, version) {
return `https://github.com/ruby/${engine}-dev-builder/releases/latest/download/${engine}-${version}-${platform}.tar.gz`
var repo = `${engine}-dev-builder`
if (engine === 'truffleruby+graalvm') {
repo = 'truffleruby-dev-builder'
}
return `https://github.com/ruby/${repo}/releases/latest/download/${engine}-${version}-${platform}.tar.gz`
}
+30 -2
View File
@@ -1,8 +1,9 @@
const common = require('./common')
const path = require('path')
const exec = require('@actions/exec')
const semver = require('semver')
export async function rubygemsUpdate(rubygemsVersionInput, rubyPrefix) {
export async function rubygemsUpdate(rubygemsVersionInput, rubyPrefix, platform, engine, rubyVersion) {
const gem = path.join(rubyPrefix, 'bin', 'gem')
let gemVersion = ''
@@ -18,7 +19,7 @@ export async function rubygemsUpdate(rubygemsVersionInput, rubyPrefix) {
if (rubygemsVersionInput === 'latest') {
console.log('Updating RubyGems to latest version')
await exec.exec(gem, ['update', '--system'])
await rubygemsLatest(gem, platform, engine, rubyVersion)
} else if (semver.gt(rubygemsVersionInput, gemVersion)) {
console.log(`Updating RubyGems to ${rubygemsVersionInput}`)
await exec.exec(gem, ['update', '--system', rubygemsVersionInput])
@@ -28,3 +29,30 @@ export async function rubygemsUpdate(rubygemsVersionInput, rubyPrefix) {
return true
}
// Older RubyGems versions do not account for 'required_ruby_version' when
// running 'gem update --system', so we have to force a compatible version of
// rubygems-update. See https://github.com/ruby/setup-ruby/pull/551 and
// https://github.com/rubygems/rubygems/issues/7329
async function rubygemsLatest(gem, platform, engine, rubyVersion) {
if (engine === 'ruby') {
const floatVersion = common.floatVersion(rubyVersion)
if (common.isHeadVersion(rubyVersion)) {
console.log('Ruby master builds use included RubyGems')
} else if (floatVersion >= 3.0) {
await exec.exec(gem, ['update', '--system'])
} else if (floatVersion >= 2.6) {
await exec.exec(gem, ['update', '--system', '3.4.22'])
} else if (floatVersion >= 2.3) {
await exec.exec(gem, ['update', '--system', '3.3.27'])
} else if (floatVersion >= 1.9) {
await exec.exec(`${gem} install rubygems-update -v 2.7.11 --no-document`)
await exec.exec('update_rubygems')
} else {
console.log(`Cannot update RubyGems for Ruby version ${rubyVersion}`)
}
} else {
// non MRI Rubies (TruffleRuby and JRuby)
await exec.exec(gem, ['update', '--system'])
}
}
+7 -4
View File
@@ -4,15 +4,18 @@ versions = JSON.load(hash).transform_keys(&:to_sym)
by_minor = versions[:ruby].group_by { |v| v[/^\d\.\d/] }
(1..7).each do |minor|
p by_minor["2.#{minor}"].map { |v| "ruby-#{v}" }
by_minor.each_pair do |minor, versions|
puts versions.map { |v| "ruby-#{v}" }.join(', ') if minor
end
puts
p (versions[:truffleruby] - %w[head]).map { |v| "truffleruby-#{v}" }
puts (versions[:truffleruby] - %w[head]).map { |v| "truffleruby-#{v}" }.join(', ')
puts
p (versions[:jruby] - %w[head]).map { |v| "jruby-#{v}" }
puts (versions[:"truffleruby+graalvm"] - %w[head]).map { |v| "truffleruby+graalvm-#{v}" }.join(', ')
puts
puts (versions[:jruby] - %w[head]).map { |v| "jruby-#{v}" }.join(', ')
(versions[:jruby] - %w[head]).each do |v|
puts "- { os: windows-latest, jruby-version: #{v}, ruby: jruby-#{v} }"
+23
View File
@@ -40,14 +40,37 @@
"2.7.4": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.4-1/rubyinstaller-2.7.4-1-x64.7z",
"2.7.5": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.5-1/rubyinstaller-2.7.5-1-x64.7z",
"2.7.6": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.6-1/rubyinstaller-2.7.6-1-x64.7z",
"2.7.7": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.7-1/rubyinstaller-2.7.7-1-x64.7z",
"2.7.8": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.8-1/rubyinstaller-2.7.8-1-x64.7z",
"3.0.0": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.0-1/rubyinstaller-3.0.0-1-x64.7z",
"3.0.1": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.1-1/rubyinstaller-3.0.1-1-x64.7z",
"3.0.2": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.2-1/rubyinstaller-3.0.2-1-x64.7z",
"3.0.3": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.3-1/rubyinstaller-3.0.3-1-x64.7z",
"3.0.4": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.4-1/rubyinstaller-3.0.4-1-x64.7z",
"3.0.5": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.5-1/rubyinstaller-3.0.5-1-x64.7z",
"3.0.6": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.6-1/rubyinstaller-3.0.6-1-x64.7z",
"3.0.7": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.0.7-1/rubyinstaller-3.0.7-1-x64.7z",
"3.1.0": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.0-1/rubyinstaller-3.1.0-1-x64.7z",
"3.1.1": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.1-1/rubyinstaller-3.1.1-1-x64.7z",
"3.1.2": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.2-1/rubyinstaller-3.1.2-1-x64.7z",
"3.1.3": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.3-1/rubyinstaller-3.1.3-1-x64.7z",
"3.1.4": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.4-1/rubyinstaller-3.1.4-1-x64.7z",
"3.1.5": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.5-1/rubyinstaller-3.1.5-1-x64.7z",
"3.1.6": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.6-1/rubyinstaller-3.1.6-1-x64.7z",
"3.2.0": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.0-1/rubyinstaller-3.2.0-1-x64.7z",
"3.2.1": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.1-1/rubyinstaller-3.2.1-1-x64.7z",
"3.2.2": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.2-1/rubyinstaller-3.2.2-1-x64.7z",
"3.2.3": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.3-1/rubyinstaller-3.2.3-1-x64.7z",
"3.2.4": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.4-1/rubyinstaller-3.2.4-1-x64.7z",
"3.2.5": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.5-1/rubyinstaller-3.2.5-1-x64.7z",
"3.2.6": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.6-1/rubyinstaller-3.2.6-1-x64.7z",
"3.3.0": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.3.0-1/rubyinstaller-3.3.0-1-x64.7z",
"3.3.1": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.3.1-1/rubyinstaller-3.3.1-1-x64.7z",
"3.3.2": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.3.2-1/rubyinstaller-3.3.2-1-x64.7z",
"3.3.3": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.3.3-1/rubyinstaller-3.3.3-1-x64.7z",
"3.3.4": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.3.4-1/rubyinstaller-3.3.4-1-x64.7z",
"3.3.5": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.3.5-1/rubyinstaller-3.3.5-1-x64.7z",
"3.3.6": "https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.3.6-2/rubyinstaller-3.3.6-2-x64.7z",
"head": "https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-x64.7z",
"mingw": "https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mingw.7z",
"mswin": "https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mswin.7z",
+37 -42
View File
@@ -1,6 +1,8 @@
// 7z arguments
// -aoa overwrite existing, -bd disable progress indicator
// OpenSSL version detection is needed in installGCCTools and installJRubyTools
const fs = require('fs')
const path = require('path')
const cp = require('child_process')
@@ -18,20 +20,20 @@ const msys2GCCReleaseURI = 'https://github.com/ruby/setup-msys2-gcc/releases/do
const msys2BasePath = process.env['GHCUP_MSYS2']
const vcPkgBasePath = process.env['VCPKG_INSTALLATION_ROOT']
// needed for Ruby 2.0-2.3, and mswin, cert file used by Git for Windows
const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
// needed for Ruby 2.0-2.3, cert file used by Git for Windows
let certFile = 'C:\\Program Files\\Git\\mingw64\\etc\\ssl\\cert.pem'
if (!fs.existsSync(certFile)) {
certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
if (!fs.existsSync(certFile)) {
throw new Error("Cannot find Git's cert file")
}
}
// location & path for old RubyInstaller DevKit (MSYS1), used with Ruby 2.0-2.3
const msys1 = `${drive}:\\DevKit64`
const msysPathEntries = [`${msys1}\\mingw\\x86_64-w64-mingw32\\bin`, `${msys1}\\mingw\\bin`, `${msys1}\\bin`]
const virtualEnv = common.getVirtualEnvironmentName()
export function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
if (engine === 'ruby') {
return Object.keys(rubyInstallerVersions)
} else {
@@ -44,7 +46,7 @@ export async function install(platform, engine, version) {
// The windows-2016 and windows-2019 images have MSYS2 build tools (C:/msys64/usr)
// and MinGW build tools installed. The windows-2022 image has neither.
const hasMSYS2PreInstalled = ['windows-2019', 'windows-2016'].includes(virtualEnv)
const hasMSYS2PreInstalled = ['windows-2019', 'windows-2016'].includes(platform)
if (!url.endsWith('.7z')) {
throw new Error(`URL should end in .7z: ${url}`)
@@ -53,22 +55,27 @@ export async function install(platform, engine, version) {
let rubyPrefix, inToolCache
if (common.shouldUseToolCache(engine, version)) {
inToolCache = tc.find('Ruby', version)
inToolCache = common.toolCacheFind(engine, version)
if (inToolCache) {
rubyPrefix = inToolCache
} else {
rubyPrefix = common.getToolCacheRubyPrefix(platform, version)
rubyPrefix = common.getToolCacheRubyPrefix(platform, engine, version)
}
} else {
rubyPrefix = `${drive}:\\${base}`
}
let toolchainPaths = (version === 'mswin') ? await setupMSWin() : await setupMingw(version)
if (!inToolCache) {
await downloadAndExtract(engine, version, url, base, rubyPrefix);
}
const windowsToolchain = core.getInput('windows-toolchain')
if (windowsToolchain === 'none') {
common.setupPath([`${rubyPrefix}\\bin`])
return rubyPrefix
}
let toolchainPaths = (version === 'mswin') ? await setupMSWin() : await setupMingw(version)
const msys2Type = common.setupPath([`${rubyPrefix}\\bin`, ...toolchainPaths])
// install msys2 tools for all Ruby versions, only install mingw or ucrt for Rubies >= 2.4
@@ -80,7 +87,7 @@ export async function install(platform, engine, version) {
// windows 2016 and 2019 need ucrt64 installed, 2022 and future images need
// ucrt64 or mingw64 installed, depending on Ruby version
if (((msys2Type === 'ucrt64') || !hasMSYS2PreInstalled) && common.floatVersion(version) >= 2.4) {
await installGCCTools(msys2Type)
await installGCCTools(msys2Type, version)
}
if (version === 'mswin') {
@@ -97,14 +104,24 @@ export async function install(platform, engine, version) {
// Actions windows-2022 image does not contain any mingw or ucrt build tools. Install tools for it,
// and also install ucrt tools on earlier versions, which have msys2 and mingw tools preinstalled.
async function installGCCTools(type) {
const downloadPath = await common.measure(`Downloading ${type} build tools`, async () => {
let url = `${msys2GCCReleaseURI}/msys2-gcc-pkgs/${type}.7z`
async function installGCCTools(type, version) {
// 2022-Dec ruby/msys2-gcc-pkgs now uses a suffix to delineate different archive versions.
// At present, the only use is to indicate the included OpenSSL version.
// With no suffix, archives include OpenSSL 1.1.1, with a '-3.0' suffix, they include
// OpenSSL 3.0.x. Note that the mswin archive uses OpenSSL 3.
// As of Jan-2023, OpenSSL 3 is used in Ruby 3.2 & all head versions. MSYS2 updated
// to OpenSSL 3 on 14-Jan-2023.
let suffix = ''
if (common.isHeadVersion(version) || common.floatVersion(version) >= 3.2) {
suffix = '-3.0'
}
const downloadPath = await common.measure(`Downloading ${type}${suffix} build tools`, async () => {
let url = `${msys2GCCReleaseURI}/msys2-gcc-pkgs/${type}${suffix}.7z`
console.log(url)
return await tc.downloadTool(url)
})
await common.measure(`Extracting ${type} build tools`, async () =>
await common.measure(`Extracting ${type}${suffix} build tools`, async () =>
exec.exec('7z', ['x', downloadPath, '-aoa', '-bd', `-o${msys2BasePath}`], { silent: true }))
}
@@ -129,7 +146,8 @@ async function installMSYS2Tools() {
// windows-2022 and later images
export async function installJRubyTools() {
await installMSYS2Tools()
await installGCCTools('mingw64')
// Will need to add OpenSSL version detection when JRuby uses OpenSSL 3.0 ?
await installGCCTools('mingw64', '2.7')
}
// Install vcpkg files needed to build mswin Ruby
@@ -199,29 +217,6 @@ async function installMSYS1(version) {
async function setupMSWin() {
core.exportVariable('MAKE', 'nmake.exe')
// Pre-installed OpenSSL use C:\Program Files\Common Files\SSL
let certsDir = 'C:\\Program Files\\Common Files\\SSL\\certs'
if (!fs.existsSync(certsDir)) {
fs.mkdirSync(certsDir, { recursive: true })
}
// cert.pem location is hard-coded by OpenSSL msvc builds
let cert = 'C:\\Program Files\\Common Files\\SSL\\cert.pem'
if (!fs.existsSync(cert)) {
fs.copyFileSync(certFile, cert)
}
// vcpkg openssl uses packages\openssl_x64-windows\certs
certsDir = `${vcPkgBasePath}\\packages\\openssl_x64-windows\\certs`
if (!fs.existsSync(certsDir)) {
fs.mkdirSync(certsDir, { recursive: true })
}
// vcpkg openssl uses packages\openssl_x64-windows\cert.pem
cert = `${vcPkgBasePath}\\packages\\openssl_x64-windows\\cert.pem`
fs.copyFileSync(certFile, cert)
return await common.measure('Setting up MSVC environment', async () => addVCVARSEnv())
}
Generated
+88 -155
View File
@@ -2,25 +2,26 @@
# yarn lockfile v1
"@actions/cache@^2.0.2":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@actions/cache/-/cache-2.0.6.tgz#fa5d150219c11eb297b2b766b5ba53aeee3e6e3e"
integrity sha512-Z39ZrWaTRRPaV/AOQdY7hve+Iy/HloH5prpz+k+0lZgGQs/3SeO0UYSIakVuXOk2pdMZnl0Nv0PoK1rmh9YfGQ==
"@actions/cache@^3":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@actions/cache/-/cache-3.2.2.tgz#e7bbb5f9b67c613f96f98f91506c69424c9aa288"
integrity sha512-6D0Jq5JrLZRQ3VApeQwQkkV20ZZXjXsHNYXd9VjNUdi9E0h93wESpxfMJ2JWLCUCgHNLcfY0v3GjNM+2FdRMlg==
dependencies:
"@actions/core" "^1.2.6"
"@actions/core" "^1.10.0"
"@actions/exec" "^1.0.1"
"@actions/glob" "^0.1.0"
"@actions/http-client" "^2.0.1"
"@actions/http-client" "^2.1.1"
"@actions/io" "^1.0.1"
"@azure/abort-controller" "^1.1.0"
"@azure/ms-rest-js" "^2.6.0"
"@azure/storage-blob" "^12.8.0"
"@azure/storage-blob" "^12.13.0"
semver "^6.1.0"
uuid "^3.3.3"
"@actions/core@^1.2.6", "@actions/core@^1.9.1":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f"
integrity sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==
"@actions/core@^1.10.0", "@actions/core@^1.2.6":
version "1.10.1"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.1.tgz#61108e7ac40acae95ee36da074fa5850ca4ced8a"
integrity sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==
dependencies:
"@actions/http-client" "^2.0.1"
uuid "^8.3.2"
@@ -40,38 +41,31 @@
"@actions/core" "^1.2.6"
minimatch "^3.0.4"
"@actions/http-client@^1.0.8":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.11.tgz#c58b12e9aa8b159ee39e7dd6cbd0e91d905633c0"
integrity sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==
dependencies:
tunnel "0.0.6"
"@actions/http-client@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c"
integrity sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==
"@actions/http-client@^2.0.1", "@actions/http-client@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.1.1.tgz#a8e97699c315bed0ecaeaaeb640948470d4586a0"
integrity sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==
dependencies:
tunnel "^0.0.6"
"@actions/io@^1.0.1", "@actions/io@^1.1.1", "@actions/io@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.1.2.tgz#766ac09674a289ce0f1550ffe0a6eac9261a8ea9"
integrity sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw==
version "1.1.3"
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.1.3.tgz#4cdb6254da7962b07473ff5c335f3da485d94d71"
integrity sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==
"@actions/tool-cache@^1.7.2":
version "1.7.2"
resolved "https://registry.yarnpkg.com/@actions/tool-cache/-/tool-cache-1.7.2.tgz#389ad15916f91999959c6b2865144839ecc571a9"
integrity sha512-GYlcgg/PK2RWBrGG2sFg6s7im3S94LMKuqAv8UPDq/pGTZbuEvmN4a95Fn1Z19OE+vt7UbUHeewOD5tEBT+4TQ==
"@actions/tool-cache@^2":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@actions/tool-cache/-/tool-cache-2.0.1.tgz#8a649b9c07838d9d750c9864814e66a7660ab720"
integrity sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA==
dependencies:
"@actions/core" "^1.2.6"
"@actions/exec" "^1.0.0"
"@actions/http-client" "^1.0.8"
"@actions/http-client" "^2.0.1"
"@actions/io" "^1.1.1"
semver "^6.1.0"
uuid "^3.3.2"
"@azure/abort-controller@^1.0.0":
"@azure/abort-controller@^1.0.0", "@azure/abort-controller@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.1.0.tgz#788ee78457a55af8a1ad342acb182383d2119249"
integrity sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==
@@ -79,47 +73,48 @@
tslib "^2.2.0"
"@azure/core-auth@^1.1.4", "@azure/core-auth@^1.3.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.4.0.tgz#6fa9661c1705857820dbc216df5ba5665ac36a9e"
integrity sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==
version "1.5.0"
resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.5.0.tgz#a41848c5c31cb3b7c84c409885267d55a2c92e44"
integrity sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/core-util" "^1.1.0"
tslib "^2.2.0"
"@azure/core-http@^2.0.0":
version "2.2.7"
resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-2.2.7.tgz#f4f52b3b7b8adb5387acf11102e751358a31fa6f"
integrity sha512-TyGMeDm90mkRS8XzSQbSMD+TqnWL1XKGCh0x0QVGMD8COH2yU0q5SaHm/IBEBkzcq0u73NhS/p57T3KVSgUFqQ==
"@azure/core-http@^3.0.0":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-3.0.3.tgz#792c0af7d8ebec7d34a99bbd7108aa370cd49948"
integrity sha512-QMib3wXotJMFhHgmJBPUF9YsyErw34H0XDFQd9CauH7TPB+RGcyl9Ayy7iURtJB04ngXhE6YwrQsWDXlSLrilg==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/core-auth" "^1.3.0"
"@azure/core-tracing" "1.0.0-preview.13"
"@azure/core-util" "^1.1.0"
"@azure/core-util" "^1.1.1"
"@azure/logger" "^1.0.0"
"@types/node-fetch" "^2.5.0"
"@types/tunnel" "^0.0.3"
form-data "^4.0.0"
node-fetch "^2.6.7"
process "^0.11.10"
tough-cookie "^4.0.0"
tslib "^2.2.0"
tunnel "^0.0.6"
uuid "^8.3.0"
xml2js "^0.4.19"
xml2js "^0.5.0"
"@azure/core-lro@^2.2.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.4.0.tgz#e3fdff797b045ee753aab25c3d2ecc0aa3e0a539"
integrity sha512-F65+rYkll1dpw3RGm8/SSiSj+/QkMeYDanzS/QKlM1dmuneVyXbO46C88V1MRHluLGdMP6qfD3vDRYALn0z0tQ==
version "2.5.4"
resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.5.4.tgz#b21e2bcb8bd9a8a652ff85b61adeea51a8055f90"
integrity sha512-3GJiMVH7/10bulzOKGrrLeG/uCBH/9VtxqaMcB9lIqAeamI/xYQSHJL/KcsLDuH+yTjYpro/u6D/MuRe4dN70Q==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/core-util" "^1.2.0"
"@azure/logger" "^1.0.0"
tslib "^2.2.0"
"@azure/core-paging@^1.1.1":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.3.0.tgz#ebf6520a931be7d5ff1cf58bc4fe6c14d6a3080d"
integrity sha512-H6Tg9eBm0brHqLy0OSAGzxIh1t4UL8eZVrSUMJ60Ra9cwq2pOskFqVpz2pYoHDsBY1jZ4V/P8LRGb5D5pmC6rg==
version "1.5.0"
resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.5.0.tgz#5a5b09353e636072e6a7fc38f7879e11d0afb15f"
integrity sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==
dependencies:
tslib "^2.2.0"
@@ -131,43 +126,42 @@
"@opentelemetry/api" "^1.0.1"
tslib "^2.2.0"
"@azure/core-util@^1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.1.1.tgz#8f87b3dd468795df0f0849d9f096c3e7b29452c1"
integrity sha512-A4TBYVQCtHOigFb2ETiiKFDocBoI1Zk2Ui1KpI42aJSIDexF7DHQFpnjonltXAIU/ceH+1fsZAWWgvX6/AKzog==
"@azure/core-util@^1.1.0", "@azure/core-util@^1.1.1", "@azure/core-util@^1.2.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.4.0.tgz#c120a56b3e48a9e4d20619a0b00268ae9de891c7"
integrity sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==
dependencies:
"@azure/abort-controller" "^1.0.0"
tslib "^2.2.0"
"@azure/logger@^1.0.0":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.0.3.tgz#6e36704aa51be7d4a1bae24731ea580836293c96"
integrity sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==
version "1.0.4"
resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.0.4.tgz#28bc6d0e5b3c38ef29296b32d35da4e483593fa1"
integrity sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==
dependencies:
tslib "^2.2.0"
"@azure/ms-rest-js@^2.6.0":
version "2.6.2"
resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-2.6.2.tgz#185a9d643ea55c696134af76a5c6026c94e26217"
integrity sha512-0/8rOxAoR9M3qKUdbGOIYtHtQkm4m5jdoDNdxTU0DkOr84KwyAdJuW/RfjJinGyig4h73DNF0rdCl6XowgCYcg==
version "2.7.0"
resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz#8639065577ffdf4946951e1d246334ebfd72d537"
integrity sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==
dependencies:
"@azure/core-auth" "^1.1.4"
abort-controller "^3.0.0"
form-data "^2.5.0"
node-fetch "^2.6.7"
tough-cookie "^3.0.1"
tslib "^1.10.0"
tunnel "0.0.6"
uuid "^8.3.2"
xml2js "^0.4.19"
xml2js "^0.5.0"
"@azure/storage-blob@^12.8.0":
version "12.11.0"
resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.11.0.tgz#2e27902ab293715411ab1f7c8fae422ad0b4b827"
integrity sha512-na+FisoARuaOWaHWpmdtk3FeuTWf2VWamdJ9/TJJzj5ZdXPLC3juoDgFs6XVuJIoK30yuBpyFBEDXVRK4pB7Tg==
"@azure/storage-blob@^12.13.0":
version "12.16.0"
resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.16.0.tgz#c41fb1e538d6f6e2a6756bfcc69382eededf4fa1"
integrity sha512-jz33rUSUGUB65FgYrTRgRDjG6hdPHwfvHe+g/UrwVG8MsyLqSxg9TaW7Yuhjxu1v1OZ5xam2NU6+IpCN0xJO8Q==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/core-http" "^2.0.0"
"@azure/core-http" "^3.0.0"
"@azure/core-lro" "^2.2.0"
"@azure/core-paging" "^1.1.1"
"@azure/core-tracing" "1.0.0-preview.13"
@@ -176,22 +170,22 @@
tslib "^2.2.0"
"@opentelemetry/api@^1.0.1":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.2.0.tgz#89ef99401cde6208cff98760b67663726ef26686"
integrity sha512-0nBr+VZNKm9tvNDZFstI3Pq1fCTEDK5OZTnVKNvBNAKgd0yIvmwsP4m61rEv7ZP+tOUjWJhROpxK5MsnlF911g==
version "1.6.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.6.0.tgz#de2c6823203d6f319511898bb5de7e70f5267e19"
integrity sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==
"@types/node-fetch@^2.5.0":
version "2.6.2"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da"
integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==
version "2.6.5"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.5.tgz#972756a9a0fe354b2886bf3defe667ddb4f0d30a"
integrity sha512-OZsUlr2nxvkqUFLSaY2ZbA+P1q22q+KrlxWOn/38RX+u5kTkYL2mTujEpzUhGkS+K/QCYp9oagfXG39XOzyySg==
dependencies:
"@types/node" "*"
form-data "^3.0.0"
form-data "^4.0.0"
"@types/node@*":
version "18.8.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.5.tgz#6a31f820c1077c3f8ce44f9e203e68a176e8f59e"
integrity sha512-Bq7G3AErwe5A/Zki5fdD3O6+0zDChhg671NfPjtIcbtzDNZTv4NPKMRFr7gtYPG7y+B8uTiNK4Ngd9T0FTar6Q==
version "20.6.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.2.tgz#a065925409f59657022e9063275cd0b9bd7e1b12"
integrity sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==
"@types/tunnel@^0.0.3":
version "0.0.3"
@@ -266,15 +260,6 @@ form-data@^2.5.0:
combined-stream "^1.0.6"
mime-types "^2.1.12"
form-data@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f"
integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
@@ -284,10 +269,10 @@ form-data@^4.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"
ip-regex@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
integrity sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==
linux-os-info@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/linux-os-info/-/linux-os-info-2.0.0.tgz#32a251077c13af1a69dbcb36a168901208e32776"
integrity sha512-ZopyH4kT2Ehnmix8iUgS/41pfv7fSlUV1JukIn3DB3qD3byvhBNtgCbUApoAtiqcHRLKXCY3zakXlJgiExm2Qg==
lru-cache@^6.0.0:
version "6.0.0"
@@ -316,9 +301,9 @@ minimatch@^3.0.4:
brace-expansion "^1.1.7"
node-fetch@^2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"
@@ -327,62 +312,23 @@ process@^0.11.10:
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
psl@^1.1.28, psl@^1.1.33:
version "1.9.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==
punycode@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
querystringify@^2.1.1:
version "2.2.0"
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
requires-port@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==
sax@>=0.6.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
semver@^6.1.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
version "6.3.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
semver@^7.3.7:
version "7.3.8"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
tough-cookie@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2"
integrity sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==
dependencies:
ip-regex "^2.1.0"
psl "^1.1.28"
punycode "^2.1.1"
tough-cookie@^4.0.0:
version "4.1.2"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874"
integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==
dependencies:
psl "^1.1.33"
punycode "^2.1.1"
universalify "^0.2.0"
url-parse "^1.5.3"
tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
@@ -394,28 +340,15 @@ tslib@^1.10.0:
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.2.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
tunnel@0.0.6, tunnel@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
universalify@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0"
integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==
url-parse@^1.5.3:
version "1.5.10"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1"
integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==
dependencies:
querystringify "^2.1.1"
requires-port "^1.0.0"
uuid@^3.3.2, uuid@^3.3.3:
version "3.4.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
@@ -439,10 +372,10 @@ whatwg-url@^5.0.0:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"
xml2js@^0.4.19:
version "0.4.23"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66"
integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==
xml2js@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7"
integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==
dependencies:
sax ">=0.6.0"
xmlbuilder "~11.0.0"