]> granicus.if.org Git - libevent/commitdiff
ci: remove deprecated windows-2016 image
authorAzat Khuzhin <azat@libevent.org>
Tue, 30 Nov 2021 19:37:32 +0000 (22:37 +0300)
committerAzat Khuzhin <azat@libevent.org>
Tue, 30 Nov 2021 19:37:32 +0000 (22:37 +0300)
Refs: https://github.blog/changelog/2021-10-19-github-actions-the-windows-2016-runner-image-will-be-removed-from-github-hosted-runners-on-march-15-2022

.github/workflows/windows.yml

index 67169e585704ff73c07287ea088357eb8c87fd16..660ff53db367ee4aa6b16c4a3453f9851ea8e751 100644 (file)
@@ -19,98 +19,6 @@ on:
       - 'LICENSE'
 
 jobs:
-  vs2017:
-    runs-on: ${{ matrix.os }}
-    if: "!contains(github.event.head_commit.message, 'ci skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [windows-2016]
-        EVENT_MATRIX: [NONE]
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-
-      - name: Cache Build
-        uses: actions/cache@v2
-        with:
-          path: build
-          key: ${{ matrix.os }}-${{ matrix.EVENT_MATRIX }}-v4
-
-      - name: Prepare vcpkg
-        uses: lukka/run-vcpkg@v7
-        id: runvcpkg
-        with:
-          vcpkgArguments: zlib:x64-windows openssl:x64-windows mbedtls:x64-windows
-          vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
-          vcpkgTriplet: x64-windows
-          vcpkgGitCommitId: 7bc5b8cdfaf35329c1520b2af8d368e2b1cb78e6
-
-      - name: Build
-        shell: powershell
-        run: |
-          $EVENT_BUILD_PARALLEL=10
-
-          mkdir build -ea 0
-          cd build
-
-          $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake .."
-          function cmake_configure($retry)
-          {
-            $errcode=0
-            try {
-              if ($retry -eq 0) {
-                echo "[cmake configure retry] $CMAKE_CMD"
-              } else {
-                echo "[cmake configure] $CMAKE_CMD"
-              }
-              Invoke-Expression $CMAKE_CMD
-              $errcode=$LastExitCode
-            }
-            catch {
-              $errcode=1
-            }
-            finally {
-              if ($errcode -ne 0) {
-                if ($retry -eq 0) {
-                  $host.SetShouldExit($LastExitCode)
-                } else {
-                  echo "Remove all entries in build directory"
-                  rm -r -fo *
-                  cmake_configure 0
-                }
-              }
-            }
-          }
-          cmake_configure 1
-          cmake --build . -j $EVENT_BUILD_PARALLEL -- /nologo /verbosity:minimal
-
-      - name: Test
-        shell: powershell
-        run: |
-          $EVENT_TESTS_PARALLEL=1
-
-          cd build
-
-          try {
-            if ("${{ matrix.EVENT_MATRIX }}" -eq "TEST_EXPORT_STATIC") {
-              python ../test-export/test-export.py static
-            } elseif ("${{ matrix.EVENT_MATRIX }}" -eq "TEST_EXPORT_SHARED") {
-              python ../test-export/test-export.py shared
-            } else {
-              ctest --output-on-failure -j $EVENT_TESTS_PARALLEL
-              if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
-            }
-          } catch {
-            $host.SetShouldExit($LastExitCode)
-          }
-
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: ${{ matrix.os }}-${{ matrix.EVENT_MATRIX }}-build
-          path: build
-
   vs2019:
     runs-on: ${{ matrix.os }}
     if: "!contains(github.event.head_commit.message, 'ci skip')"
@@ -187,12 +95,7 @@ jobs:
           mkdir build -ea 0
           cd build
 
-          if ("${{ matrix.os }}" -eq "windows-2016") {
-            $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake .."
-          }
-          else { # windows-2019
-            $CMAKE_CMD="cmake -G 'Visual Studio 16 2019' -A x64 -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake .. $EVENT_CMAKE_OPTIONS"
-          }
+          $CMAKE_CMD="cmake -G 'Visual Studio 16 2019' -A x64 -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake .. $EVENT_CMAKE_OPTIONS"
           function cmake_configure($retry)
           {
             $errcode=0