Compare commits

...
13 Commits
Author SHA1 Message Date
Benoit Daloze 8029ebd6e5 Cleanup 2022-05-17 18:24:10 +02:00
MSP-Greg 356354c8aa Actions - show vcpkg list for mswin 2022-05-17 18:24:10 +02:00
MSP-Greg be54de855e Windows mswin - install vcpkg archive with required Ruby packages, cert 2022-05-17 18:24:10 +02:00
MSP-Greg cd4241788a MSP-Greg/setup-msys2-gcc -> ruby/setup-msys2-gcc, rmdirSync -> rmSync 2022-05-16 12:23:31 +02:00
MSP-Greg 3c76dcfa76 Update packages - @vercel/ncc, semver
semver was major update, but mostly refactor and dropping compatibility with old node versions
2022-05-16 12:23:31 +02:00
Benoit Daloze a7439cf424 Add support for macos-12 2022-05-16 12:08:36 +02:00
Benoit Daloze b9675e15ad Use quotes consistently for Ruby versions in docs
* To avoid issues from https://github.com/actions/runner/issues/849
2022-05-15 13:26:47 +02:00
Benoit Daloze 57a3395c80 Support some Rubies on ubuntu-22.04 2022-05-15 13:05:40 +02:00
Benoit Daloze 296bf7f67a Use an explicit list of supported platforms for nicer error messages 2022-05-15 12:21:30 +02:00
Yutaka Kamei e92b7971f0 Update Node.js from v12 to v16
According to the release policy of Node.js,
Node.js v12 reached EOL (end-of-life).

https://nodejs.org/en/about/releases/

I think ruby/setup-ruby is ready to update Node.js to v16
because GitHub Actions runners support v16.

https://github.com/actions/runner/issues/772
2022-05-10 11:19:53 +02:00
Hiroshi SHIBATA b2e1b33839 Merge pull request #329 from jwillemsen/patch-1
Updated README.md
2022-05-07 16:47:06 +09:00
Johnny Willemsen 645077fe5e Updated README.md
windows-latest is now windows-2022
2022-05-07 09:02:14 +02:00
Benoit Daloze 301d3e0984 Make it clear what is supported 2022-05-04 18:11:45 +02:00
11 changed files with 6966 additions and 1543 deletions
+20 -14
View File
@@ -15,22 +15,26 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11.0, windows-2019, windows-2022 ] os: [ ubuntu-18.04, ubuntu-20.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 ] 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 ]
include: include:
- { os: ubuntu-22.04, ruby: '3.1.0' }
- { os: ubuntu-22.04, ruby: '3.1' }
- { os: ubuntu-22.04, ruby: '3.2.0-preview1' }
- { os: ubuntu-22.04, ruby: ruby-head }
- { os: windows-2019, ruby: mingw } - { os: windows-2019, ruby: mingw }
- { os: windows-2019, ruby: mswin } - { os: windows-2019, ruby: mswin }
- { os: windows-2022, ruby: mingw } - { os: windows-2022, ruby: mingw }
- { os: windows-2022, ruby: mswin } - { os: windows-2022, ruby: mswin }
- { os: windows-2022, ruby: ucrt } - { os: windows-2022, ruby: ucrt }
exclude: exclude:
- { os: windows-2019, ruby: 1.9 } - { os: windows-2019, ruby: '1.9' }
- { os: windows-2019, ruby: debug } - { os: windows-2019, ruby: debug }
- { os: windows-2019, ruby: truffleruby } - { os: windows-2019, ruby: truffleruby }
- { os: windows-2019, ruby: truffleruby-head } - { os: windows-2019, ruby: truffleruby-head }
- { os: windows-2019, ruby: truffleruby+graalvm } - { os: windows-2019, ruby: truffleruby+graalvm }
- { os: windows-2019, ruby: truffleruby+graalvm-head } - { os: windows-2019, ruby: truffleruby+graalvm-head }
- { os: windows-2022, ruby: 1.9 } - { os: windows-2022, ruby: '1.9' }
- { os: windows-2022, ruby: debug } - { os: windows-2022, ruby: debug }
- { os: windows-2022, ruby: truffleruby } - { os: windows-2022, ruby: truffleruby }
- { os: windows-2022, ruby: truffleruby-head } - { os: windows-2022, ruby: truffleruby-head }
@@ -67,6 +71,8 @@ jobs:
} else { } else {
echo 'ridk is unavailable' echo 'ridk is unavailable'
} }
} elseif ($plat.Contains('mswin')) {
&"$env:VCPKG_INSTALLATION_ROOT\vcpkg" list
} }
- name: RbConfig::CONFIG - name: RbConfig::CONFIG
run: ruby -rrbconfig -rpp -e 'pp RbConfig::CONFIG' run: ruby -rrbconfig -rpp -e 'pp RbConfig::CONFIG'
@@ -120,7 +126,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.6 ruby-version: '2.6'
rubygems: latest rubygems: latest
- run: ruby -e "exit(Gem.rubygems_version > Gem::Version.new('3.0.3'))" - run: ruby -e "exit(Gem.rubygems_version > Gem::Version.new('3.0.3'))"
@@ -131,7 +137,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.6 ruby-version: '2.6'
rubygems: 3.2.3 rubygems: 3.2.3
- run: gem --version | grep -F "3.2.3" - run: gem --version | grep -F "3.2.3"
@@ -142,7 +148,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 3.1.0 ruby-version: '3.1.0'
rubygems: 3.2.3 rubygems: 3.2.3
- run: gem --version | grep -F "3.3.3" - run: gem --version | grep -F "3.3.3"
@@ -153,7 +159,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.2 ruby-version: '2.2'
rubygems: 2.7.11 rubygems: 2.7.11
- run: gem --version | grep -F "2.7.11" - run: gem --version | grep -F "2.7.11"
- run: bundle --version | grep -F "1.16.6" - run: bundle --version | grep -F "1.16.6"
@@ -165,7 +171,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.2 ruby-version: '2.2'
bundler: 1.16.6 bundler: 1.16.6
- run: bundle --version | grep -F "1.16.6" # And not 1.17.x from ~> 1 - run: bundle --version | grep -F "1.16.6" # And not 1.17.x from ~> 1
@@ -176,7 +182,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.6 ruby-version: '2.6'
bundler: 2 bundler: 2
- run: bundle --version | grep -P "Bundler version 2\.\d+\.\d+" - run: bundle --version | grep -P "Bundler version 2\.\d+\.\d+"
@@ -187,7 +193,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.6 ruby-version: '2.6'
bundler: 2.2 bundler: 2.2
- run: bundle --version | grep -P "Bundler version 2\.2\.\d+" - run: bundle --version | grep -P "Bundler version 2\.2\.\d+"
@@ -198,7 +204,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.6 ruby-version: '2.6'
bundler: 2.2.3 bundler: 2.2.3
- run: bundle --version | grep -F "Bundler version 2.2.3" - run: bundle --version | grep -F "Bundler version 2.2.3"
@@ -211,7 +217,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.7 ruby-version: '2.7'
bundler: 1 bundler: 1
bundler-cache: true bundler-cache: true
- run: bundle --version | grep -F "Bundler version 1." - run: bundle --version | grep -F "Bundler version 1."
@@ -229,7 +235,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ./ - uses: ./
with: with:
ruby-version: 2.6 ruby-version: '2.6'
bundler-cache: true bundler-cache: true
- run: bundle exec rails --version - run: bundle exec rails --version
+1 -1
View File
@@ -1,2 +1,2 @@
nodejs 12.0.0 nodejs 16.0.0
ruby 2.7.0 ruby 2.7.0
+11 -9
View File
@@ -35,13 +35,15 @@ which means Ruby ≤ 2.4 is unmaintained and considered insecure.
### Supported Platforms ### Supported Platforms
The action works for all [GitHub-hosted runners](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners). 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.
| Operating System | Recommended | Other Supported Versions | | Operating System | Recommended | Other Supported Versions |
| ----------- | -------- | -------- | | ----------- | -------- | -------- |
| Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04` | | Ubuntu | `ubuntu-latest` (= `ubuntu-20.04`) | `ubuntu-18.04`, `ubuntu-22.04` (beta, only `ruby: 3.1 - head`) |
| macOS | `macos-latest` (= `macos-10.15`) | `macos-11.0` | | macOS | `macos-latest` (= `macos-11`) | `macos-10.15`, `macos-12` (beta) |
| Windows | `windows-latest` (= `windows-2019`) | `windows-2022` | | Windows | `windows-latest` (= `windows-2022`) | `windows-2019` |
On `ubuntu-22.04` (beta), only `ruby: 3.1 - head` are supported, due to Ubuntu 22.04 only supporting OpenSSL 3.
The prebuilt releases are generated by [ruby-builder](https://github.com/ruby/ruby-builder) The prebuilt releases are generated by [ruby-builder](https://github.com/ruby/ruby-builder)
and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2). and on Windows by [RubyInstaller2](https://github.com/oneclick/rubyinstaller2).
@@ -67,7 +69,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
ruby-version: 2.6 # Not needed with a .ruby-version file ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake - run: bundle exec rake
``` ```
@@ -86,7 +88,7 @@ jobs:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: [2.6, 2.7, '3.0', 3.1, head, jruby, jruby-head, truffleruby, truffleruby-head] ruby: ['2.7', '3.0', '3.1', head, jruby, jruby-head, truffleruby, truffleruby-head]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -115,7 +117,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
ruby-version: 2.6 ruby-version: '3.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake - run: bundle exec rake
``` ```
@@ -127,8 +129,8 @@ and the [condition and expression syntax](https://help.github.com/en/actions/ref
### Supported Version Syntax ### Supported Version Syntax
* engine-version like `ruby-2.6.5` and `truffleruby-19.3.0` * 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.5`) * 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 * 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 `truffleruby`, uses the latest stable release of that implementation
* `.ruby-version` reads from the project's `.ruby-version` file * `.ruby-version` reads from the project's `.ruby-version` file
* `.tool-versions` reads from the project's `.tool-versions` file * `.tool-versions` reads from the project's `.tool-versions` file
+1 -1
View File
@@ -32,5 +32,5 @@ outputs:
ruby-prefix: ruby-prefix:
description: 'The prefix of the installed ruby' description: 'The prefix of the installed ruby'
runs: runs:
using: 'node12' using: 'node16'
main: 'dist/index.js' main: 'dist/index.js'
+16 -1
View File
@@ -98,6 +98,17 @@ function getImageOS() {
return imageOS 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',
]
export function getVirtualEnvironmentName() { export function getVirtualEnvironmentName() {
const imageOS = getImageOS() const imageOS = getImageOS()
@@ -108,7 +119,11 @@ export function getVirtualEnvironmentName() {
match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos1015, macos11 match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos1015, macos11
if (match) { if (match) {
return `macos-${match[1]}.${match[2] || '0'}` if (match[2]) {
return `macos-${match[1]}.${match[2]}`
} else {
return `macos-${match[1]}`
}
} }
match = imageOS.match(/^win(\d+)/) // e.g. win19 match = imageOS.match(/^win(\d+)/) // e.g. win19
Generated Vendored
+6813 -1474
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -42,7 +42,7 @@ export async function setupRuby(options = {}) {
const [engine, parsedVersion] = parseRubyEngineAndVersion(inputs['ruby-version']) const [engine, parsedVersion] = parseRubyEngineAndVersion(inputs['ruby-version'])
let installer let installer
if (platform.startsWith('windows-') && engine !== 'jruby') { if (platform.startsWith('windows-') && engine === 'ruby') {
installer = require('./windows') installer = require('./windows')
} else { } else {
installer = require('./ruby-builder') installer = require('./ruby-builder')
@@ -151,7 +151,7 @@ function validateRubyEngineAndVersion(platform, engineVersions, engine, parsedVe
throw new Error(`Unknown version ${parsedVersion} for ${engine} on ${platform} 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 Make sure you use the latest version of the action with - uses: ruby/setup-ruby@v1
File an issue at https://github.com/ruby/setup-ruby/issues if would like support for a new version`) File an issue at https://github.com/ruby/setup-ruby/issues if you would like support for a new version`)
} }
} }
+4 -4
View File
@@ -22,14 +22,14 @@
}, },
"homepage": "https://github.com/ruby/setup-ruby", "homepage": "https://github.com/ruby/setup-ruby",
"dependencies": { "dependencies": {
"@actions/cache": "^1.0.11", "@actions/cache": "^2.0.2",
"@actions/core": "^1.6.0", "@actions/core": "^1.7.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/io": "^1.1.2", "@actions/io": "^1.1.2",
"@actions/tool-cache": "^1.7.2", "@actions/tool-cache": "^1.7.2",
"semver": "^6.3.0" "semver": "^7.3.7"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "^0.31.1" "@vercel/ncc": "^0.33.4"
} }
} }
+11
View File
@@ -13,6 +13,17 @@ const releasesURL = 'https://github.com/ruby/ruby-builder/releases'
const windows = common.windows const windows = common.windows
export function getAvailableVersions(platform, engine) { export function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
if (platform === 'ubuntu-22.04') {
const rubyVersions = rubyBuilderVersions['ruby']
return {
ruby: rubyVersions.slice(rubyVersions.indexOf('3.1.0')),
}[engine]
}
return rubyBuilderVersions[engine] return rubyBuilderVersions[engine]
} }
+46 -15
View File
@@ -1,5 +1,5 @@
// Most of this logic is from // 7z arguments
// https://github.com/MSP-Greg/actions-ruby/blob/master/lib/main.js // -aoa overwrite existing, -bd disable progress indicator
const fs = require('fs') const fs = require('fs')
const path = require('path') const path = require('path')
@@ -13,18 +13,25 @@ const rubyInstallerVersions = require('./windows-versions.json')
const drive = common.drive const drive = common.drive
const msys2BasePath = 'C:\\msys64' const msys2GCCReleaseURI = 'https://github.com/ruby/setup-msys2-gcc/releases/download'
// needed for 2.0-2.3, and mswin, cert file used by Git for Windows 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' const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
// location & path for old RubyInstaller DevKit (MSYS1), Ruby 2.0-2.3 // location & path for old RubyInstaller DevKit (MSYS1), used with Ruby 2.0-2.3
const msys1 = `${drive}:\\DevKit64` const msys1 = `${drive}:\\DevKit64`
const msysPathEntries = [`${msys1}\\mingw\\x86_64-w64-mingw32\\bin`, `${msys1}\\mingw\\bin`, `${msys1}\\bin`] const msysPathEntries = [`${msys1}\\mingw\\x86_64-w64-mingw32\\bin`, `${msys1}\\mingw\\bin`, `${msys1}\\bin`]
const virtualEnv = common.getVirtualEnvironmentName() const virtualEnv = common.getVirtualEnvironmentName()
export function getAvailableVersions(platform, engine) { export function getAvailableVersions(platform, engine) {
if (!common.supportedPlatforms.includes(platform)) {
throw new Error(`Unsupported platform ${platform}`)
}
if (engine === 'ruby') { if (engine === 'ruby') {
return Object.keys(rubyInstallerVersions) return Object.keys(rubyInstallerVersions)
} else { } else {
@@ -76,6 +83,10 @@ export async function install(platform, engine, version) {
await installGCCTools(msys2Type) await installGCCTools(msys2Type)
} }
if (version === 'mswin') {
await installVCPkg()
}
const ridk = `${rubyPrefix}\\bin\\ridk.cmd` const ridk = `${rubyPrefix}\\bin\\ridk.cmd`
if (fs.existsSync(ridk)) { if (fs.existsSync(ridk)) {
await common.measure('Adding ridk env variables', async () => addRidkEnv(ridk)) await common.measure('Adding ridk env variables', async () => addRidkEnv(ridk))
@@ -88,13 +99,12 @@ export async function install(platform, engine, version) {
// and also install ucrt tools on earlier versions, which have msys2 and mingw tools preinstalled. // and also install ucrt tools on earlier versions, which have msys2 and mingw tools preinstalled.
async function installGCCTools(type) { async function installGCCTools(type) {
const downloadPath = await common.measure(`Downloading ${type} build tools`, async () => { const downloadPath = await common.measure(`Downloading ${type} build tools`, async () => {
let url = `https://github.com/MSP-Greg/setup-msys2-gcc/releases/download/msys2-gcc-pkgs/${type}.7z` let url = `${msys2GCCReleaseURI}/msys2-gcc-pkgs/${type}.7z`
console.log(url) console.log(url)
return await tc.downloadTool(url) return await tc.downloadTool(url)
}) })
await common.measure(`Extracting ${type} build tools`, async () => await common.measure(`Extracting ${type} build tools`, async () =>
// -aoa overwrite existing, -bd disable progress indicator
exec.exec('7z', ['x', downloadPath, '-aoa', '-bd', `-o${msys2BasePath}`], { silent: true })) exec.exec('7z', ['x', downloadPath, '-aoa', '-bd', `-o${msys2BasePath}`], { silent: true }))
} }
@@ -102,17 +112,16 @@ async function installGCCTools(type) {
// A subset of the MSYS2 base-devel group // A subset of the MSYS2 base-devel group
async function installMSYS2Tools() { async function installMSYS2Tools() {
const downloadPath = await common.measure(`Downloading msys2 build tools`, async () => { const downloadPath = await common.measure(`Downloading msys2 build tools`, async () => {
let url = `https://github.com/MSP-Greg/setup-msys2-gcc/releases/download/msys2-gcc-pkgs/msys2.7z` let url = `${msys2GCCReleaseURI}/msys2-gcc-pkgs/msys2.7z`
console.log(url) console.log(url)
return await tc.downloadTool(url) return await tc.downloadTool(url)
}) })
// need to remove all directories, since they may indicate old packages are installed, // need to remove all directories, since they may indicate old packages are installed,
// otherwise, error of "error: duplicated database entry" // otherwise, error of "error: duplicated database entry"
fs.rmdirSync(`${msys2BasePath}\\var\\lib\\pacman\\local`, { recursive: true, force: true }) fs.rmSync(`${msys2BasePath}\\var\\lib\\pacman\\local`, { recursive: true, force: true })
await common.measure(`Extracting msys2 build tools`, async () => await common.measure(`Extracting msys2 build tools`, async () =>
// -aoa overwrite existing, -bd disable progress indicator
exec.exec('7z', ['x', downloadPath, '-aoa', '-bd', `-o${msys2BasePath}`], { silent: true })) exec.exec('7z', ['x', downloadPath, '-aoa', '-bd', `-o${msys2BasePath}`], { silent: true }))
} }
@@ -123,6 +132,18 @@ export async function installJRubyTools() {
await installGCCTools('mingw64') await installGCCTools('mingw64')
} }
// Install vcpkg files needed to build mswin Ruby
async function installVCPkg() {
const downloadPath = await common.measure(`Downloading mswin vcpkg packages`, async () => {
let url = `${msys2GCCReleaseURI}/msys2-gcc-pkgs/mswin.7z`
console.log(url)
return await tc.downloadTool(url)
})
await common.measure(`Extracting mswin vcpkg packages`, async () =>
exec.exec('7z', ['x', downloadPath, '-aoa', '-bd', `-o${vcPkgBasePath}`], { silent: true }))
}
async function downloadAndExtract(engine, version, url, base, rubyPrefix) { async function downloadAndExtract(engine, version, url, base, rubyPrefix) {
const parentDir = path.dirname(rubyPrefix) const parentDir = path.dirname(rubyPrefix)
@@ -132,7 +153,7 @@ async function downloadAndExtract(engine, version, url, base, rubyPrefix) {
}) })
await common.measure('Extracting Ruby', async () => await common.measure('Extracting Ruby', async () =>
// -bd disable progress indicator, -xr extract but exclude share\doc files // -xr extract but exclude share\doc files
exec.exec('7z', ['x', downloadPath, '-bd', `-xr!${base}\\share\\doc`, `-o${parentDir}`], { silent: true })) exec.exec('7z', ['x', downloadPath, '-bd', `-xr!${base}\\share\\doc`, `-o${parentDir}`], { silent: true }))
if (base !== path.basename(rubyPrefix)) { if (base !== path.basename(rubyPrefix)) {
@@ -179,18 +200,28 @@ async function installMSYS1(version) {
async function setupMSWin() { async function setupMSWin() {
core.exportVariable('MAKE', 'nmake.exe') core.exportVariable('MAKE', 'nmake.exe')
// All standard MSVC OpenSSL builds use C:\Program Files\Common Files\SSL // Pre-installed OpenSSL use C:\Program Files\Common Files\SSL
const certsDir = 'C:\\Program Files\\Common Files\\SSL\\certs' let certsDir = 'C:\\Program Files\\Common Files\\SSL\\certs'
if (!fs.existsSync(certsDir)) { if (!fs.existsSync(certsDir)) {
fs.mkdirSync(certsDir) fs.mkdirSync(certsDir, { recursive: true })
} }
// cert.pem location is hard-coded by OpenSSL msvc builds // cert.pem location is hard-coded by OpenSSL msvc builds
const cert = 'C:\\Program Files\\Common Files\\SSL\\cert.pem' let cert = 'C:\\Program Files\\Common Files\\SSL\\cert.pem'
if (!fs.existsSync(cert)) { if (!fs.existsSync(cert)) {
fs.copyFileSync(certFile, 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()) return await common.measure('Setting up MSVC environment', async () => addVCVARSEnv())
} }
Generated
+41 -22
View File
@@ -2,10 +2,10 @@
# yarn lockfile v1 # yarn lockfile v1
"@actions/cache@^1.0.11": "@actions/cache@^2.0.2":
version "1.0.11" version "2.0.2"
resolved "https://registry.yarnpkg.com/@actions/cache/-/cache-1.0.11.tgz#db7909ba7f7e7bc9bd1a761c172c48807586b996" resolved "https://registry.yarnpkg.com/@actions/cache/-/cache-2.0.2.tgz#e38167f5de20be8f61452ff1f0bb44b02558905e"
integrity sha512-L+VCF1JpFePAzxkYtpwYDWnd0WzSU1DoNPE2cuINKpEie27ONH0Cpqt40cG8NiJW4zbZLN+kNkEDo3F2MkUuRw== integrity sha512-K1DCaW/OtHj5mV7hI7HEXiceX3rM4Nc0iG2hfYsrkEy6GiOeqlCC/LyICrBZIRDM6+vSrS12tg1ORl4hghomBA==
dependencies: dependencies:
"@actions/core" "^1.2.6" "@actions/core" "^1.2.6"
"@actions/exec" "^1.0.1" "@actions/exec" "^1.0.1"
@@ -17,10 +17,10 @@
semver "^6.1.0" semver "^6.1.0"
uuid "^3.3.3" uuid "^3.3.3"
"@actions/core@^1.2.6", "@actions/core@^1.6.0": "@actions/core@^1.2.6", "@actions/core@^1.7.0":
version "1.6.0" version "1.7.0"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.6.0.tgz#0568e47039bfb6a9170393a73f3b7eb3b22462cb" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.7.0.tgz#f179a5a0bf5c1102d89b8cf1712825e763feaee4"
integrity sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw== integrity sha512-7fPSS7yKOhTpgLMbw7lBLc1QJWvJBBAgyTX2PEhagWcKK8t0H8AKCoPMfnrHqIm5cRYH4QFPqD1/ruhuUE7YcQ==
dependencies: dependencies:
"@actions/http-client" "^1.0.11" "@actions/http-client" "^1.0.11"
@@ -167,9 +167,9 @@
tslib "^2.2.0" tslib "^2.2.0"
"@opentelemetry/api@^1.0.1": "@opentelemetry/api@^1.0.1":
version "1.0.4" version "1.1.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.0.4.tgz#a167e46c10d05a07ab299fc518793b0cff8f6924" resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.1.0.tgz#563539048255bbe1a5f4f586a4a10a1bb737f44a"
integrity sha512-BuJuXRSJNQ3QoKA6GWWDyuLpOUck+9hAXNMCnrloc1aWVoy6Xq6t9PUV08aBZ4Lutqq2LEHM486bpZqoViScog== integrity sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ==
"@types/node-fetch@^2.5.0": "@types/node-fetch@^2.5.0":
version "2.6.1" version "2.6.1"
@@ -180,9 +180,9 @@
form-data "^3.0.0" form-data "^3.0.0"
"@types/node@*": "@types/node@*":
version "17.0.24" version "17.0.31"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.24.tgz#20ba1bf69c1b4ab405c7a01e950c4f446b05029f" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d"
integrity sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g== integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==
"@types/tunnel@^0.0.3": "@types/tunnel@^0.0.3":
version "0.0.3" version "0.0.3"
@@ -191,10 +191,10 @@
dependencies: dependencies:
"@types/node" "*" "@types/node" "*"
"@vercel/ncc@^0.31.1": "@vercel/ncc@^0.33.4":
version "0.31.1" version "0.33.4"
resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.31.1.tgz#9346c7e59326f5eeac75c0286e47df94c2d6d8f7" resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.33.4.tgz#e44a87511f583b7ba88e4b9ae90eeb7ba252b872"
integrity sha512-g0FAxwdViI6UzsiVz5HssIHqjcPa1EHL6h+2dcJD893SoCJaGdqqgUF09xnMW6goWnnhbLvgiKlgJWrJa+7qYA== integrity sha512-ln18hs7dMffelP47tpkaR+V5Tj6coykNyxJrlcmCormPqRQjB/Gv4cu2FfBG+PMzIfdZp2CLDsrrB1NPU22Qhg==
abort-controller@^3.0.0: abort-controller@^3.0.0:
version "3.0.0" version "3.0.0"
@@ -280,6 +280,13 @@ ip-regex@^2.1.0:
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=
lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
dependencies:
yallist "^4.0.0"
mime-db@1.52.0: mime-db@1.52.0:
version "1.52.0" version "1.52.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
@@ -326,11 +333,18 @@ sax@>=0.6.0:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
semver@^6.1.0, semver@^6.3.0: semver@^6.1.0:
version "6.3.0" version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.3.7:
version "7.3.7"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
dependencies:
lru-cache "^6.0.0"
tough-cookie@^3.0.1: tough-cookie@^3.0.1:
version "3.0.1" version "3.0.1"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2"
@@ -360,9 +374,9 @@ tslib@^1.10.0:
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.0.0, tslib@^2.2.0: tslib@^2.0.0, tslib@^2.2.0:
version "2.3.1" version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
tunnel@0.0.6, tunnel@^0.0.6: tunnel@0.0.6, tunnel@^0.0.6:
version "0.0.6" version "0.0.6"
@@ -409,3 +423,8 @@ xmlbuilder@~11.0.0:
version "11.0.1" version "11.0.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==