aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kruskal <mkruskal@google.com>2023-11-01 12:17:02 -0700
committerMike Kruskal <mkruskal@google.com>2023-11-01 15:27:07 -0700
commitce169aaa3fdf183e7e620fd6b80bf599ba8b4c53 (patch)
tree11d329014c812bef542378ef52ddcaffcfa2d977
parent59a66af1465c8abbc78c7506153ae7f711b991f2 (diff)
downloadprotobuf-ce169aaa3fdf183e7e620fd6b80bf599ba8b4c53.tar.gz
Migrate tests to windows 2022 by default.
For the windows 2019 test, we need to upgrade python for the latest gcloud to work. PiperOrigin-RevId: 578600130
-rw-r--r--.github/workflows/test_cpp.yml44
-rw-r--r--.github/workflows/test_upb.yml2
2 files changed, 27 insertions, 19 deletions
diff --git a/.github/workflows/test_cpp.yml b/.github/workflows/test_cpp.yml
index 511f9ec18..560411f13 100644
--- a/.github/workflows/test_cpp.yml
+++ b/.github/workflows/test_cpp.yml
@@ -324,8 +324,8 @@ jobs:
# for Apple Silicon to detect issues there.
bazel: build --cpu=darwin_arm64 //src/...
- name: Windows
- os: windows-2019
- cache_key: windows-2019
+ os: windows-2022
+ cache_key: windows-2022
bazel: test //src/... @com_google_protobuf_examples//... --test_tag_filters=-conformance --build_tag_filters=-conformance
name: ${{ matrix.name }} Bazel
runs-on: ${{ matrix.os }}
@@ -351,14 +351,6 @@ jobs:
flags: -DCMAKE_CXX_STANDARD=14
cache-prefix: macos-cmake
- name: Windows CMake
- os: windows-2019
- flags: >-
- -G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
- -Dprotobuf_BUILD_SHARED_LIBS=OFF
- -Dprotobuf_BUILD_EXAMPLES=ON
- vsversion: '2019'
- cache-prefix: windows-2019-cmake
- - name: Windows CMake 2022
os: windows-2022
flags: >-
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
@@ -366,29 +358,38 @@ jobs:
-Dprotobuf_BUILD_EXAMPLES=ON
vsversion: '2022'
cache-prefix: windows-2022-cmake
- - name: Windows CMake 32-bit
+ - name: Windows CMake 2019
os: windows-2019
flags: >-
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
+ -Dprotobuf_BUILD_SHARED_LIBS=OFF
+ -Dprotobuf_BUILD_EXAMPLES=ON
vsversion: '2019'
+ cache-prefix: windows-2019-cmake
+ python-version: '3.8'
+ - name: Windows CMake 32-bit
+ os: windows-2022
+ flags: >-
+ -G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
+ vsversion: '2022'
windows-arch: 'win32'
- cache-prefix: windows-2019-win32-cmake
+ cache-prefix: windows-2022-win32-cmake
- name: Windows CMake Shared
- os: windows-2019
+ os: windows-2022
flags: >-
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
-Dprotobuf_BUILD_SHARED_LIBS=ON
- vsversion: '2019'
- cache-prefix: windows-2019-cmake
+ vsversion: '2022'
+ cache-prefix: windows-2022-cmake
- name: Windows CMake Install
- os: windows-2019
+ os: windows-2022
install-flags: -G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_TESTS=OFF
flags: >-
-G Ninja -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF
-Dprotobuf_REMOVE_INSTALLED_HEADERS=ON
-Dprotobuf_BUILD_PROTOBUF_BINARIES=OFF
- vsversion: '2019'
- cache-prefix: windows-2019-cmake
+ vsversion: '2022'
+ cache-prefix: windows-2022-cmake
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
@@ -398,6 +399,13 @@ jobs:
ref: ${{ inputs.safe-checkout }}
submodules: recursive
+ - name: Install Python
+ if: ${{ matrix.python-version }}
+ uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: pip
+
- name: Setup MSVC
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
diff --git a/.github/workflows/test_upb.yml b/.github/workflows/test_upb.yml
index 21ec30887..3aed7a777 100644
--- a/.github/workflows/test_upb.yml
+++ b/.github/workflows/test_upb.yml
@@ -64,7 +64,7 @@ jobs:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
name: Windows
- runs-on: windows-2019
+ runs-on: windows-2022
steps:
- name: Checkout pending changes
uses: protocolbuffers/protobuf-ci/checkout@v2