Skip to content

Update to windows-2025 runner on ci #5571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
18 changes: 4 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ env:
test_yield_from
# Python version targeted by the CI.
PYTHON_VERSION: "3.13.1"
X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD
X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR: C:\Program Files\OpenSSL\include

jobs:
rust_tests:
Expand All @@ -119,7 +121,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest, windows-2025]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -128,12 +130,6 @@ jobs:
components: clippy
- uses: Swatinem/rust-cache@v2

- name: Set up the Windows environment
shell: bash
run: |
cargo install --target-dir=target -v cargo-vcpkg
cargo vcpkg -v build
if: runner.os == 'Windows'
- name: Set up the Mac environment
run: brew install autoconf automake libtool
if: runner.os == 'macOS'
Expand Down Expand Up @@ -242,7 +238,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest, windows-2025]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -251,12 +247,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up the Windows environment
shell: bash
run: |
cargo install cargo-vcpkg
cargo vcpkg build
if: runner.os == 'Windows'
- name: Set up the Mac environment
run: brew install autoconf automake libtool openssl@3
if: runner.os == 'macOS'
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ permissions:

env:
CARGO_ARGS: --no-default-features --features stdlib,importlib,encodings,sqlite,ssl
X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD
X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR: C:\Program Files\OpenSSL\include

jobs:
build:
Expand All @@ -40,11 +42,11 @@ jobs:
target: aarch64-apple-darwin
# - runner: macos-latest
# target: x86_64-apple-darwin
- runner: windows-latest
- runner: windows-2025
target: x86_64-pc-windows-msvc
# - runner: windows-latest
# - runner: windows-2025
# target: i686-pc-windows-msvc
# - runner: windows-latest
# - runner: windows-2025
# target: aarch64-pc-windows-msvc
fail-fast: false
steps:
Expand All @@ -54,12 +56,6 @@ jobs:
- name: Set up Environment
shell: bash
run: rustup target add ${{ matrix.platform.target }}
- name: Set up Windows Environment
shell: bash
run: |
cargo install --target-dir=target -v cargo-vcpkg
cargo vcpkg -v build
if: runner.os == 'Windows'
- name: Set up MacOS Environment
run: brew install autoconf automake libtool
if: runner.os == 'macOS'
Expand Down Expand Up @@ -142,4 +138,4 @@ jobs:
--target="$tag" \
--generate-notes \
$PRERELEASE_ARG \
bin/rustpython-release-*
bin/rustpython-release-*
10 changes: 0 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ lto = "thin"
# REDOX START, Uncomment when you want to compile/check with redoxer
# REDOX END

# Used only on Windows to build the vcpkg dependencies
[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
# The revision of the vcpkg repository to use
# https://github.com/microsoft/vcpkg/tags
rev = "2024.02.14"

[package.metadata.vcpkg.target]
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md", dev-dependencies = ["openssl" ] }

[workspace]
resolver = "2"
members = [
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_ntpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,6 @@ def test_realpath_relative(self):
os.symlink(ABSTFN, ntpath.relpath(ABSTFN + "1"))
self.assertPathEqual(ntpath.realpath(ABSTFN + "1"), ABSTFN)

# TODO: RUSTPYTHON
@unittest.expectedFailure
@os_helper.skip_unless_symlink
@unittest.skipUnless(HAVE_GETFINALPATHNAME, 'need _getfinalpathname')
def test_realpath_broken_symlinks(self):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_py_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def test_absolute_path(self):
self.assertTrue(os.path.exists(self.pyc_path))
self.assertFalse(os.path.exists(self.cache_path))

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_do_not_overwrite_symlinks(self):
# In the face of a cfile argument being a symlink, bail out.
# Issue #17222
Expand Down
8 changes: 0 additions & 8 deletions Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def test_rmtree_works_on_bytes(self):
self.assertIsInstance(victim, bytes)
shutil.rmtree(victim)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_rmtree_fails_on_symlink_onerror(self):
tmp = self.mkdtemp()
Expand All @@ -216,7 +215,6 @@ def onerror(*args):
self.assertEqual(errors[0][1], link)
self.assertIsInstance(errors[0][2][1], OSError)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_rmtree_fails_on_symlink_onexc(self):
tmp = self.mkdtemp()
Expand Down Expand Up @@ -1055,7 +1053,6 @@ class TestCopy(BaseTest, unittest.TestCase):

### shutil.copymode

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_copymode_follow_symlinks(self):
tmp_dir = self.mkdtemp()
Expand Down Expand Up @@ -1087,7 +1084,6 @@ def test_copymode_follow_symlinks(self):
shutil.copymode(src_link, dst_link)
self.assertEqual(os.stat(src).st_mode, os.stat(dst).st_mode)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@unittest.skipUnless(hasattr(os, 'lchmod') or os.name == 'nt', 'requires os.lchmod')
@os_helper.skip_unless_symlink
def test_copymode_symlink_to_symlink(self):
Expand Down Expand Up @@ -1317,7 +1313,6 @@ def test_copy(self):
self.assertTrue(os.path.exists(file2))
self.assertEqual(os.stat(file1).st_mode, os.stat(file2).st_mode)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_copy_symlinks(self):
tmp_dir = self.mkdtemp()
Expand Down Expand Up @@ -1360,7 +1355,6 @@ def test_copy2(self):
self.assertEqual(getattr(file1_stat, 'st_flags'),
getattr(file2_stat, 'st_flags'))

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_copy2_symlinks(self):
tmp_dir = self.mkdtemp()
Expand Down Expand Up @@ -1445,7 +1439,6 @@ def _test_copy_dir(self, copy_func):

### shutil.copyfile

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_copyfile_symlinks(self):
tmp_dir = self.mkdtemp()
Expand Down Expand Up @@ -2609,7 +2602,6 @@ def test_move_file_symlink_to_dir(self):
self.assertTrue(os.path.islink(final_link))
self.assertTrue(os.path.samefile(self.src_file, final_link))

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
@mock_rename
def test_move_dangling_symlink(self):
Expand Down
6 changes: 0 additions & 6 deletions Lib/test/test_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,6 @@ def test_socket(self):
class TestFilemodePyStat(TestFilemode, unittest.TestCase):
statmod = py_stat

# TODO: RUSTPYTHON
if sys.platform == "win32":
@unittest.expectedFailure
def test_link(self):
super().test_link()


if __name__ == '__main__':
unittest.main()
3 changes: 0 additions & 3 deletions Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,6 @@ def test_gettarinfo_pathlike_name(self):
self.assertEqual(tarinfo.name, tarinfo2.name)
self.assertEqual(tarinfo.size, 3)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@unittest.skipUnless(hasattr(os, "link"),
"Missing hardlink implementation")
def test_link_size(self):
Expand All @@ -1299,7 +1298,6 @@ def test_link_size(self):
os_helper.unlink(target)
os_helper.unlink(link)

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
@os_helper.skip_unless_symlink
def test_symlink_size(self):
path = os.path.join(TEMPDIR, "symlink")
Expand Down Expand Up @@ -1847,7 +1845,6 @@ def test_add_twice(self):
self.assertEqual(tarinfo.type, tarfile.REGTYPE,
"add file as regular failed")

@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON")
def test_add_hardlink(self):
tarinfo = self.tar.gettarinfo(self.bar)
self.assertEqual(tarinfo.type, tarfile.LNKTYPE,
Expand Down
3 changes: 2 additions & 1 deletion common/src/fileutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ pub mod windows {

let GetFileInformationByName = GET_FILE_INFORMATION_BY_NAME
.get_or_init(|| {
let library_name = OsString::from("api-ms-win-core-file-l2-1-4").to_wide_with_nul();
let library_name =
OsString::from("api-ms-win-core-file-l2-1-4.dll").to_wide_with_nul();
let module = unsafe { LoadLibraryW(library_name.as_ptr()) };
if module == 0 {
return None;
Expand Down
Loading