Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ jobs:
test_task: check
- os: 2025-vs2026
test_task: test-bundled-gems
# TODO: Debug why Windows 11 ARM is failing to build on CI
# - os: 11-arm
# test_task: 'btest test-basic test-tool' # check and test-spec are broken yet.
# target: arm64
- os: 11-arm
test_task: 'btest test-basic test-tool' # check and test-spec are broken yet.
target: arm64
fail-fast: false

runs-on: windows-${{ matrix.os }}
Expand Down Expand Up @@ -81,10 +80,11 @@ jobs:

- name: Install tools with scoop
run: |
if ((vcpkg.exe help install) -match "manifest") { exit }
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb get.scoop.sh | iex
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
scoop install vcpkg uutils-coreutils
scoop install vcpkg
shell: pwsh

- name: Restore vcpkg artifact
Expand All @@ -96,7 +96,7 @@ jobs:

- name: Install libraries with vcpkg
run: |
vcpkg install --vcpkg-root=%USERPROFILE%\scoop\apps\vcpkg\current
vcpkg install
working-directory: src
if: ${{ ! steps.restore-vcpkg.outputs.cache-hit }}

Expand All @@ -112,11 +112,7 @@ jobs:
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
run: |
::- Using sort.exe located in the same directory as comm.exe
::- should probably work just fine.
for %%I in (comm.exe) do set "sort=%%~dp$PATH:I\sort.exe"

set | "%sort%" > old.env
set > old.env
call ..\src\win32\vssetup.cmd ^
-arch=${{ matrix.target || 'amd64' }} ^
${{ matrix.vcvars && '-vcvars_ver=' || '' }}${{ matrix.vcvars }}
Expand All @@ -126,9 +122,17 @@ jobs:
set MAKEFLAGS=l
set /a TEST_JOBS=(15 * %NUMBER_OF_PROCESSORS% / 10) > nul
set RUBY_OPT_DIR=%GITHUB_WORKSPACE:\=/%/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
set | "%sort%" > new.env
comm -13 old.env new.env >> %GITHUB_ENV%
set > new.env

- name: update env
shell: pwsh
run: |
$old = (Get-Content old.env); $new = (Get-Content new.env)
del *.env
Compare-Object $old $new |
Where-Object { $_.SideIndicator -eq '=>' } |
Select-Object -ExpandProperty InputObject |
Add-Content -Path $env:GITHUB_ENV

- name: baseruby version
run: ruby -v
Expand Down
14 changes: 9 additions & 5 deletions tool/format-release
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ eom
# SHA1: 21f62c369661a2ab1b521fd2fa8191a4273e12a1
# SHA256: 97cea8aa63dfa250ba6902b658a7aa066daf817b22f82b7ee28f44aec7c2e394
# SHA512: 1e2042324821bb4e110af7067f52891606dcfc71e640c194ab1c117f0b941550e0b3ac36ad3511214ac80c536b9e5cfaf8789eec74cf56971a832ea8fc4e6d94
def self.parse(wwwdir, version, rubydir)
def self.parse(wwwdir, version, rubydir, source_ref_or_sha = nil)
unless /\A(\d+)\.(\d+)\.(\d+)(?:-(?:preview|rc)\d+)?\z/ =~ version
raise "unexpected version string '#{version}'"
end
Expand All @@ -75,9 +75,12 @@ eom

if teeny == 0
# show diff shortstat
tag = RubyVersion.tag(version)
tag = source_ref_or_sha || RubyVersion.tag(version)
prev_tag = RubyVersion.tag(RubyVersion.previous(version))
stat = `git -C #{rubydir} diff -l0 --shortstat #{prev_tag}..#{tag}`
stat = IO.popen(["git", "-C", rubydir, "diff", "-l0", "--shortstat", "#{prev_tag}..#{tag}"], &:read)
unless $?.success?
raise "failed to diff #{prev_tag}..#{tag}"
end
files_changed, insertions, deletions = stat.scan(/\d+/)
end

Expand Down Expand Up @@ -235,11 +238,12 @@ def main
wwwdir = ARGV.shift
version = ARGV.shift
rubydir = ARGV.shift
source_ref_or_sha = ARGV.shift
unless rubydir
STDERR.puts "usage: format-release <dir-of-w.r-l.o> <version> <ruby-dir>"
STDERR.puts "usage: format-release <dir-of-w.r-l.o> <version> <ruby-dir> [source-ref-or-sha]"
exit
end
Tarball.parse(wwwdir, version, rubydir)
Tarball.parse(wwwdir, version, rubydir, source_ref_or_sha)
end

main