Skip to content

Commit e5d8f74

Browse files
authored
Merge pull request #20169 from adfoster-r7/update-windows-2019-ci-usage
Update windows 2019 CI usage
2 parents 8cbfdec + 4ccf119 commit e5d8f74

File tree

4 files changed

+50
-21
lines changed

4 files changed

+50
-21
lines changed

.github/workflows/command_shell_acceptance.yml

+12-9
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,23 @@ jobs:
6363
fail-fast: false
6464
matrix:
6565
os:
66-
- windows-2019
66+
- windows-2022
6767
- ubuntu-latest
6868
ruby:
69-
- '3.2'
69+
- '3.4'
7070
include:
7171
# Powershell
72-
- { command_shell: { name: powershell }, os: windows-2019 }
73-
- { command_shell: { name: powershell }, os: windows-2022 }
72+
- { command_shell: { name: powershell }, ruby: '3.4', os: windows-2022 }
73+
- { command_shell: { name: powershell }, ruby: '3.4', os: windows-2025 }
7474

7575
# Linux
76-
- { command_shell: { name: linux }, os: ubuntu-latest }
76+
- { command_shell: { name: linux }, ruby: '3.4', os: ubuntu-latest }
7777

7878
# CMD
79-
- { command_shell: { name: cmd }, os: windows-2019 }
80-
- { command_shell: { name: cmd }, os: windows-2022 }
79+
- { command_shell: { name: cmd }, ruby: '3.4', os: windows-2022 }
80+
81+
# TODO: Tests currently fail:
82+
# - { command_shell: { name: cmd }, ruby: '3.4', os: windows-2025 }
8183

8284
runs-on: ${{ matrix.os }}
8385

@@ -131,7 +133,7 @@ jobs:
131133
if: runner.os == 'Windows'
132134
run: git config --system core.longpaths true
133135

134-
- name: Setup Ruby
136+
- name: Setup '${{ matrix.ruby }}' Ruby
135137
env:
136138
BUNDLE_FORCE_RUBY_PLATFORM: true
137139
uses: ruby/setup-ruby@v1
@@ -191,7 +193,8 @@ jobs:
191193
BUNDLE_FORCE_RUBY_PLATFORM: true
192194
uses: ruby/setup-ruby@v1
193195
with:
194-
ruby-version: '${{ matrix.ruby }}'
196+
# use the default version from the .ruby-version file
197+
ruby-version: '.ruby-version'
195198
bundler-cache: true
196199
cache-version: 4
197200

.github/workflows/shared_gem_verify.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929
- ubuntu-22.04
3030
- ubuntu-24.04
3131
- ubuntu-latest
32-
- windows-2019
32+
- windows-2022
33+
- windows-2025
3334
- macos-13
3435

3536
env:

.github/workflows/shared_meterpreter_acceptance.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ jobs:
6868
matrix:
6969
os:
7070
- macos-13
71-
- windows-2019
71+
- windows-2022
7272
- ubuntu-latest
7373
ruby:
74-
- '3.2'
74+
- '3.4'
7575
meterpreter:
7676
# Python
7777
- { name: python, runtime_version: 3.8 }
@@ -87,8 +87,9 @@ jobs:
8787
- { name: php, runtime_version: 8.3 }
8888
include:
8989
# Windows Meterpreter
90-
- { meterpreter: { name: windows_meterpreter }, os: windows-2019 }
91-
- { meterpreter: { name: windows_meterpreter }, os: windows-2022 }
90+
- { meterpreter: { name: windows_meterpreter }, ruby: '3.4', os: windows-2022 }
91+
# TODO: Screenshotting behavior fails:
92+
# - { meterpreter: { name: windows_meterpreter }, ruby: '3.4', os: windows-2025 }
9293

9394
# Mettle
9495
- { meterpreter: { name: mettle }, os: macos-13 }
@@ -274,6 +275,15 @@ jobs:
274275
make.bat
275276
working-directory: metasploit-payloads
276277

278+
- name: Build Windows payloads via Visual Studio 2025 Build (Windows)
279+
shell: cmd
280+
if: ${{ matrix.meterpreter.name == 'windows_meterpreter' && matrix.os == 'windows-2025' && inputs.build_metasploit_payloads }}
281+
run: |
282+
cd c/meterpreter
283+
git submodule init && git submodule update
284+
make.bat
285+
working-directory: metasploit-payloads
286+
277287
- name: Get metasploit-payloads version
278288
if: ${{ inputs.build_metasploit_payloads && matrix.meterpreter.name != 'mettle' }}
279289
shell: bash

spec/support/acceptance/session/python.rb

+22-7
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,21 @@ module Acceptance::Session
5353
"[-] [should stop W32Time] FAILED: should stop W32Time",
5454
"[-] [should stop W32Time] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.",
5555
"[-] [should list services] FAILED: should list services",
56-
"[-] [should list services] Exception: NoMethodError: undefined method `service' for nil:NilClass",
56+
# Ruby 3.2
57+
["[-] [should list services] Exception: NoMethodError: undefined method `service' for nil:NilClass", { flaky: true }],
58+
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
59+
["[-] [should list services] Exception: NoMethodError: undefined method 'service' for nil", { flaky: true }],
5760
"[-] [should return info on a given service winmgmt] FAILED: should return info on a given service winmgmt",
58-
"[-] [should return info on a given service winmgmt] Exception: NoMethodError: undefined method `service' for nil:NilClass",
61+
# Ruby 3.2
62+
["[-] [should return info on a given service winmgmt] Exception: NoMethodError: undefined method `service' for nil:NilClass", { flaky: true }],
63+
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
64+
["[-] [should return info on a given service winmgmt] Exception: NoMethodError: undefined method 'service' for nil", { flaky: true }],
5965
"[-] FAILED: should create a service testes",
6066
"[-] [should return info on the newly-created service testes] FAILED: should return info on the newly-created service testes",
61-
"[-] [should return info on the newly-created service testes] Exception: NoMethodError: undefined method `service' for nil:NilClass",
67+
# Ruby 3.2
68+
["[-] [should return info on the newly-created service testes] Exception: NoMethodError: undefined method `service' for nil:NilClass", { flaky: true }],
69+
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
70+
["[-] [should return info on the newly-created service testes] Exception: NoMethodError: undefined method 'service' for nil", { flaky: true }],
6271
"[-] [should delete the new service testes] FAILED: should delete the new service testes",
6372
"[-] [should delete the new service testes] Exception: RuntimeError: Could not open service. OpenServiceA error: FormatMessage failed to retrieve the error for value 0x6.",
6473
"[-] [should return status on a given service winmgmt] FAILED: should return status on a given service winmgmt",
@@ -101,10 +110,16 @@ module Acceptance::Session
101110
},
102111
windows: {
103112
known_failures: [
104-
"[-] [should return clipboard jpg dimensions] FAILED: should return clipboard jpg dimensions",
105-
"[-] [should return clipboard jpg dimensions] Exception: NoMethodError: undefined method `clipboard' for nil:NilClass",
106-
"[-] [should download clipboard jpg data] FAILED: should download clipboard jpg data",
107-
"[-] [should download clipboard jpg data] Exception: NoMethodError: undefined method `clipboard' for nil:NilClass"
113+
# Ruby 3.2
114+
["[-] [should return clipboard jpg dimensions] FAILED: should return clipboard jpg dimensions", { flaky: true }],
115+
["[-] [should return clipboard jpg dimensions] Exception: NoMethodError: undefined method `clipboard' for nil:NilClass", { flaky: true }],
116+
["[-] [should download clipboard jpg data] FAILED: should download clipboard jpg data", { flaky: true }],
117+
["[-] [should download clipboard jpg data] Exception: NoMethodError: undefined method `clipboard' for nil:NilClass", { flaky: true }],
118+
# Ruby 3.4 - https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/#Compatibility%20issues
119+
["[-] [should return clipboard jpg dimensions] FAILED: should return clipboard jpg dimensions", { flaky: true }],
120+
["[-] [should return clipboard jpg dimensions] Exception: NoMethodError: undefined method 'clipboard' for nil", { flaky: true }],
121+
["[-] [should download clipboard jpg data] FAILED: should download clipboard jpg data", { flaky: true }],
122+
["[-] [should download clipboard jpg data] Exception: NoMethodError: undefined method 'clipboard' for nil", { flaky: true }],
108123
]
109124
}
110125
}

0 commit comments

Comments
 (0)