]> granicus.if.org Git - libevent/commitdiff
Rework CI to keep everything in one workflow (by using reusable workflow)
authorAzat Khuzhin <azat@libevent.org>
Sun, 10 Jul 2022 13:49:53 +0000 (16:49 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Mon, 11 Jul 2022 00:42:50 +0000 (03:42 +0300)
Right now because we have separate workflows there is no one page with
all the jobs, instead we have separate page for each workflow (linux,
windows, ...)

This is pretty inconvenient, so let's make it cleaner, and now we will
have only two:

- for pull requests
- for upstream/master

.github/workflows/abi.yml [deleted file]
.github/workflows/build.yml [new file with mode: 0644]
.github/workflows/coverage.yml [deleted file]
.github/workflows/doxygen.yml [deleted file]
.github/workflows/linux.yml [deleted file]
.github/workflows/macos.yml [deleted file]
.github/workflows/master.yml [new file with mode: 0644]
.github/workflows/mingw.yml [deleted file]
.github/workflows/windows.yml [deleted file]

diff --git a/.github/workflows/abi.yml b/.github/workflows/abi.yml
deleted file mode 100644 (file)
index d278e0d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
----
-name: abi
-
-on:
-  push:
-    branches:
-      - master
-    ## TODO: use source tag name in the destination repo
-    #tags:
-    #  - release-*
-
-jobs:
-  abi:
-    runs-on: ubuntu-18.04
-    ## TODO: use docker image, but for now this is not possible without hacks
-    ## due to even public registry require some authentication:
-    ## - https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782/page/5
-    #container: docker.pkg.github.com/azat/docker-images/lvc-debian
-    strategy:
-      fail-fast: false
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-
-      - name: Install Dependencies
-        run:
-          sudo apt install
-            abi-tracker
-            abi-monitor
-            abi-dumper
-            abi-compliance-checker
-            pkgdiff
-            vtable-dumper
-
-      - name: Generate
-        shell: bash
-        run: |
-          ./extra/abi-check/abi_check.sh
-        env:
-          ABI_CHECK_ROOT: /tmp/le-abi-root
-
-      - name: Deploy
-        env:
-          LIBEVENT_DEPLOY_ABI_PRI: ${{ secrets.LIBEVENT_DEPLOY_ABI_PRI }}
-          COMMIT_ID: ${{ github.sha }}
-        run: |
-          [[ -n $LIBEVENT_DEPLOY_ABI_PRI ]] || exit 0
-
-          mkdir -p ~/.ssh
-          echo "$LIBEVENT_DEPLOY_ABI_PRI" > ~/.ssh/id_rsa
-          chmod 600 ~/.ssh/id_rsa
-          ssh-keyscan github.com >> ~/.ssh/known_hosts
-
-          short_commit_id="${COMMIT_ID:0:7}"
-          owner_name="${{ github.event.repository.owner.name }}"
-
-          cd /tmp/le-abi-root/work/abi-check
-          git init
-          git config --local user.name "Libevent Github Robot"
-          git config --local user.email "robot@libevent.org"
-          git add -f .
-          git commit -m "Update ABI/API backward compatibility report (libevent/libevent@$short_commit_id)"
-          git push -f git@github.com:$owner_name/abi master
-
-      # XXX: requires container-id for docker
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: build
-          path: /tmp/le-abi-root
-      - uses: actions/upload-artifact@v1
-        with:
-          name: build
-          path: /tmp/le-abi-root/work/abi-check
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644 (file)
index 0000000..0218b6e
--- /dev/null
@@ -0,0 +1,707 @@
+---
+name: build
+
+on:
+  pull_request:
+    types:
+      - synchronize
+      - reopened
+      - opened
+    branches:
+      - master
+    push:
+      paths-ignore:
+        - '**.md'
+        - '.mailmap'
+        - 'ChangeLog*'
+        - 'whatsnew*'
+        - 'LICENSE'
+  push:
+    branches:
+      - master
+    push:
+      paths-ignore:
+        - '**.md'
+        - '.mailmap'
+        - 'ChangeLog*'
+        - 'whatsnew*'
+        - 'LICENSE'
+
+jobs:
+  linux-cmake-job:
+    runs-on: ${{ matrix.os }}
+    if: "!contains(github.event.head_commit.message, 'ci/linux skip') && !contains(github.event.head_commit.message, 'ci/linux/cmake skip')"
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-18.04]
+        EVENT_MATRIX:
+          - DIST
+          - NONE
+          - NO_SSL
+          - DISABLE_OPENSSL
+          - DISABLE_THREAD_SUPPORT
+          - DISABLE_DEBUG_MODE
+          - DISABLE_MM_REPLACEMENT
+          - COMPILER_CLANG
+          - TEST_EXPORT_STATIC
+          - TEST_EXPORT_SHARED
+          - ASAN
+          - TSAN
+          - UBSAN
+        include:
+          - os: ubuntu-22.04
+            EVENT_MATRIX: OPENSSL_3
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+      - name: Cache Build
+        uses: actions/cache@v2
+        with:
+          path: build
+          key: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-v3
+      - name: Cache Dist Build
+        uses: actions/cache@v2
+        with:
+          path: dist
+          key: ${{ matrix.os }}-cmake-dist-${{ matrix.EVENT_MATRIX }}-v3
+
+      - name: Install Depends
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y libmbedtls-dev
+
+      - name: Build
+        shell: bash
+        run: |
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
+            ./autogen.sh
+            mkdir -p dist
+            cd dist
+            ../configure
+            rm -fr *.tar.gz
+            make dist
+            archive=$(echo *.tar.gz)
+            tar -vxf $archive
+            cd $(basename $archive .tar.gz)
+          fi
+
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "COMPILER_CLANG" ]; then
+            EVENT_CMAKE_OPTIONS=""
+            export CC=clang
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=SHARED -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "ASAN" ]; then
+            EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=debug"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "TSAN" ]; then
+            EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS=-fsanitize=thread -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=debug"
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "UBSAN" ]; then
+            EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS=-fsanitize=undefined -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=debug"
+          else
+            EVENT_CMAKE_OPTIONS=""
+          fi
+
+          mkdir -p build
+          cd build
+          echo [cmake]: cmake .. -DEVENT__ENABLE_GCC_WARNINGS=ON $EVENT_CMAKE_OPTIONS
+          cmake .. -DEVENT__ENABLE_GCC_WARNINGS=ON $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
+          cmake --build .
+
+      - name: Test
+        shell: bash
+        run: |
+          JOBS=20
+          export CTEST_PARALLEL_LEVEL=$JOBS
+          export CTEST_OUTPUT_ON_FAILURE=1
+
+          export TSAN_OPTIONS=suppressions=$PWD/extra/tsan.supp
+          export LSAN_OPTIONS=suppressions=$PWD/extra/lsan.supp
+
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
+            cd dist
+            archive=$(echo *.tar.gz)
+            cd $(basename $archive .tar.gz)
+          fi
+          cd build
+
+          if [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
+            sudo python3 ../test-export/test-export.py static
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
+            sudo python3 ../test-export/test-export.py shared
+          else
+            cmake --build . --target verify
+          fi
+
+      - uses: actions/upload-artifact@v1
+        if: failure() && matrix.EVENT_MATRIX != 'DIST'
+        with:
+          name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-build
+          path: build
+      - uses: actions/upload-artifact@v1
+        if: failure() && matrix.EVENT_MATRIX == 'DIST'
+        with:
+          name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-dist
+          path: dist
+
+  linux-autotools-job:
+    runs-on: ${{ matrix.os }}
+    if: "!contains(github.event.head_commit.message, 'ci/linux skip') && !contains(github.event.head_commit.message, 'ci/linux/autotools skip')"
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-18.04]
+        EVENT_MATRIX:
+          - DIST
+          - NONE
+          - NO_SSL
+          - DISABLE_OPENSSL
+          - DISABLE_THREAD_SUPPORT
+          - DISABLE_DEBUG_MODE
+          - DISABLE_MM_REPLACEMENT
+          - COMPILER_CLANG
+        include:
+          - os: ubuntu-22.04
+            EVENT_MATRIX: OPENSSL_3
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+      - name: Cache Build
+        uses: actions/cache@v2
+        with:
+          path: build
+          key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v3
+      - name: Cache Dist Build
+        uses: actions/cache@v2
+        with:
+          path: dist
+          key: ${{ matrix.os }}-autotools-dist-${{ matrix.EVENT_MATRIX }}-v3
+
+      - name: Install Depends
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y libmbedtls-dev
+
+      - name: Build
+        shell: bash
+        run: |
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-openssl"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "COMPILER_CLANG" ]; then
+            EVENT_CONFIGURE_OPTIONS=""
+            export CC=clang
+
+          else
+            EVENT_CONFIGURE_OPTIONS=""
+          fi
+
+          ./autogen.sh
+
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
+            mkdir -p dist
+            cd dist
+            rm -fr *.tar.gz
+            ../configure $EVENT_CONFIGURE_OPTIONS
+            make dist
+            archive=$(echo *.tar.gz)
+            tar -vxf $archive
+            cd $(basename $archive .tar.gz)
+          fi
+
+          mkdir -p build
+          cd build
+          echo [configure]: ../configure --enable-gcc-warnings $EVENT_CONFIGURE_OPTIONS
+          ../configure --enable-gcc-warnings $EVENT_CONFIGURE_OPTIONS
+          make
+      - name: Test
+        shell: bash
+        run: |
+          JOBS=20
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
+            cd dist
+            archive=$(echo *.tar.gz)
+            cd $(basename $archive .tar.gz)
+          fi
+          cd build
+          make -j $JOBS verify
+
+      - uses: actions/upload-artifact@v1
+        if: failure() && matrix.EVENT_MATRIX != 'DIST'
+        with:
+          name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-build
+          path: build
+      - uses: actions/upload-artifact@v1
+        if: failure() && matrix.EVENT_MATRIX == 'DIST'
+        with:
+          name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-dist
+          path: dist
+
+  windows-vs2019-job:
+    runs-on: ${{ matrix.os }}
+    if: "!contains(github.event.head_commit.message, 'ci/windows skip')"
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [windows-2019]
+        EVENT_MATRIX:
+          - NONE
+          - NO_SSL
+          - LIBRARY_TYPE_STATIC
+          - DISABLE_OPENSSL
+          - DISABLE_THREAD_SUPPORT
+          - DISABLE_DEBUG_MODE
+          - DISABLE_MM_REPLACEMENT
+          - DUNICODE
+          - TEST_EXPORT_SHARED
+          - TEST_EXPORT_STATIC
+
+    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: af2287382b1991dbdcb7e5112d236f3323b9dd7a
+
+      - name: Build
+        shell: powershell
+        run: |
+          $EVENT_BUILD_PARALLEL=10
+
+          if ( "${{ matrix.EVENT_MATRIX }}" -eq "LIBRARY_TYPE_STATIC" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__MSVC_STATIC_RUNTIME=OFF"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_OPENSSL" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_THREAD_SUPPORT" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_DEBUG_MODE" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_MM_REPLACEMENT" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "UNICODE" ) {
+            $EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS='-DUNICODE -D_UNICODE'"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "TEST_EXPORT_SHARED" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "TEST_EXPORT_STATIC" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__MSVC_STATIC_RUNTIME=OFF -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "NO_SSL" ) {
+            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
+          }
+          else {
+            $EVENT_CMAKE_OPTIONS=""
+          }
+
+          mkdir build -ea 0
+          cd build
+
+          $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
+            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
+
+  mingw-autotools-job:
+    runs-on: windows-2019
+    if: "!contains(github.event.head_commit.message, 'ci/mingw skip') && !contains(github.event.head_commit.message, 'ci/mingw/autotools skip')"
+    strategy:
+      fail-fast: false
+      matrix:
+        EVENT_MATRIX:
+          - none
+          - no-ssl
+          - disable-openssl
+          - disable-thread-support
+          - disable-debug-mode
+          - disable-malloc-replacement
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+      - name: Cache Build
+        uses: actions/cache@v2
+        with:
+          path: build
+          key: mingw-autotools-${{ matrix.EVENT_MATRIX }}-v5
+      - name: Setup MSYS2
+        uses: msys2/setup-msys2@v2
+        with:
+          msystem: MINGW64
+          update: true
+          install: mingw-w64-x86_64-gcc autoconf automake libtool mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls pkg-config
+
+      - name: Build
+        shell: powershell
+        run: |
+          $env:EVENT_CONFIGURE_OPTIONS=""
+          if ( "${{ matrix.EVENT_MATRIX }}" -eq "no-ssl" ) {
+            $env:EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -ne "none" ) {
+            $env:EVENT_CONFIGURE_OPTIONS="--${{ matrix.EVENT_MATRIX }}"
+          }
+          $env:EVENT_BUILD_PARALLEL=10
+
+          $script='
+          export PATH="/mingw64/bin:/usr/bin:/bin:/usr/local/bin:/opt/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:$PATH"
+          ./autogen.sh 2>&1 3>&1
+          [[ $? -ne 0 ]] && exit 1
+          mkdir -p build
+          cd build
+          [[ $? -ne 0 ]] && exit 1
+          LDFLAGS="-L/mingw64/lib" CFLAGS="-I/mingw64/include" ../configure $EVENT_CONFIGURE_OPTIONS 2>&1
+          [[ $? -ne 0 ]] && exit 1
+          make -j $EVENT_BUILD_PARALLEL 2>&1
+          [[ $? -ne 0 ]] && exit 1
+          exit 0
+          '
+          D:\a\_temp\msys64\usr\bin\bash.exe -c $script
+
+      - name: Test
+        shell: powershell
+        run: |
+          $env:EVENT_TESTS_PARALLEL=1
+
+          $script='
+          export PATH="/mingw64/bin:/usr/bin:/bin:/usr/local/bin:/opt/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:$PATH"
+          cd build
+          make verify -j $EVENT_TESTS_PARALLEL 2>&1 '
+          D:\a\_temp\msys64\usr\bin\bash.exe -c $script
+
+      - uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: mingw-${{ matrix.EVENT_MATRIX }}-build
+          path: build
+
+  mingw-cmake-job:
+    runs-on: windows-2019
+    if: "!contains(github.event.head_commit.message, 'ci/mingw skip') && !contains(github.event.head_commit.message, 'ci/mingw/cmake skip')"
+    strategy:
+      fail-fast: false
+      matrix:
+        EVENT_MATRIX:
+          - NONE
+          - NO_SSL
+          - DISABLE_OPENSSL
+          - DISABLE_THREAD_SUPPORT
+          - DISABLE_DEBUG_MODE
+          - DISABLE_MM_REPLACEMENT
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+      - name: Cache Build
+        uses: actions/cache@v2
+        with:
+          path: build
+          key: mingw-cmake-${{ matrix.EVENT_MATRIX }}-v4
+
+      - name: Setup MSYS2
+        uses: msys2/setup-msys2@v2
+        with:
+          msystem: MINGW64
+          update: true
+          install: mingw-w64-x86_64-gcc mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls  
+
+      - name: Build
+        shell: powershell
+        run: |
+          $EVENT_CONFIGURE_OPTIONS=""
+          if ( "${{ matrix.EVENT_MATRIX }}" -ne "NO_SSL" ) {
+            $EVENT_CONFIGURE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
+          }
+          elseif ( "${{ matrix.EVENT_MATRIX }}" -ne "NONE" ) {
+            $EVENT_CONFIGURE_OPTIONS="-DEVENT__${{ matrix.EVENT_MATRIX }}=ON"
+          }
+          $env:PATH="D:\a\_temp\msys64\mingw64\bin;D:\a\_temp\msys64\usr\bin;$env:PATH"
+          mkdir build -ea 0
+          cd build
+          function cmake_configure($retry)
+          {
+            $errcode=0
+            try {
+              cmake .. -G "MSYS Makefiles" $EVENT_CONFIGURE_OPTIONS -DCMAKE_C_FLAGS=-w
+              $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 .
+
+      - name: Test
+        shell: powershell
+        run: |
+          cd build
+          ctest --output-on-failure
+
+      - uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: mingw-${{ matrix.EVENT_MATRIX }}-build
+          path: build
+
+  macos-cmake-job:
+    runs-on: ${{ matrix.os }}
+    if: "!contains(github.event.head_commit.message, 'ci/macos skip') && !contains(github.event.head_commit.message, 'ci/macos/cmake skip')"
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-latest]
+        EVENT_MATRIX:
+          - NONE
+          - NO_SSL
+          - DISABLE_OPENSSL
+          - DISABLE_THREAD_SUPPORT
+          - DISABLE_DEBUG_MODE
+          - DISABLE_MM_REPLACEMENT
+          - TEST_EXPORT_STATIC
+          - TEST_EXPORT_SHARED
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+
+      - name: Cache Build
+        uses: actions/cache@v2
+        with:
+          path: build
+          key: macos-10.15-cmake-${{ matrix.EVENT_MATRIX }}-v3
+
+      - name: Install Depends
+        run: brew install mbedtls@2
+
+      - name: Build
+        shell: bash
+        run: |
+          # NOTE: cmake does not support autodetection of OPENSSL_ROOT_DIR via brew
+          export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
+
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
+            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=SHARED -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
+
+          else
+            EVENT_CMAKE_OPTIONS=""
+          fi
+          EVENT_CMAKE_OPTIONS="$EVENT_CMAKE_OPTIONS -DMBEDTLS_ROOT_DIR=/usr/local/opt/mbedtls@2"
+
+          mkdir -p build
+          cd build
+          echo [cmake]: cmake .. $EVENT_CMAKE_OPTIONS
+          cmake .. $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
+          cmake --build .
+
+      - name: Test
+        shell: bash
+        run: |
+          JOBS=1
+          export CTEST_PARALLEL_LEVEL=$JOBS
+          export CTEST_OUTPUT_ON_FAILURE=1
+
+          cd build
+
+          if [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
+            sudo python3 ../test-export/test-export.py static
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
+            sudo python3 ../test-export/test-export.py shared
+          else
+            cmake --build . --target verify
+          fi
+
+      - uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-build
+          path: build
+
+  macos-autotools-job:
+    runs-on: ${{ matrix.os }}
+    if: "!contains(github.event.head_commit.message, 'ci/macos skip') && !contains(github.event.head_commit.message, 'ci/macos/autotools skip')"
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-latest]
+        EVENT_MATRIX:
+          - NONE
+          - NO_SSL
+          - DISABLE_OPENSSL
+          - DISABLE_THREAD_SUPPORT
+          - DISABLE_DEBUG_MODE
+          - DISABLE_MM_REPLACEMENT
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+
+      - name: Cache Build
+        uses: actions/cache@v2
+        with:
+          path: build
+          key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v3
+
+      - name: Install Depends
+        run: brew install autoconf automake libtool pkg-config mbedtls@2
+
+      - name: Build
+        shell: bash
+        run: |
+          export CPPFLAGS="-I/usr/local/opt/mbedtls@2/include"
+          export  LDFLAGS="-L/usr/local/opt/mbedtls@2/lib"
+
+          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-openssl"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
+
+          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
+            EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
+
+          else
+            EVENT_CONFIGURE_OPTIONS=""
+          fi
+
+          ./autogen.sh
+          mkdir -p build
+          cd build
+          echo [configure]: ../configure $EVENT_CONFIGURE_OPTIONS
+          ../configure $EVENT_CONFIGURE_OPTIONS
+          make
+
+      - name: Test
+        shell: bash
+        run: |
+          JOBS=1
+          cd build
+          make -j $JOBS verify
+
+      - uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-build
+          path: build
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
deleted file mode 100644 (file)
index e4e0afe..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
----
-name: coverage
-
-on:
-  push:
-    branches:
-      - master
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-
-jobs:
-  linux:
-    runs-on: ubuntu-18.04
-    steps:
-      - uses: actions/checkout@v2.0.0
-      - name: Cache
-        uses: actions/cache@v1.0.3
-        with:
-          path: build
-          key: ${{ matrix.os }}-coverage-v2
-
-      - name: Install Depends
-        run: sudo apt install zlib1g-dev libssl-dev build-essential lcov libmbedtls-dev
-
-      - name: Build
-        shell: bash
-        run: |
-            export JOBS=20
-            mkdir -p build
-            cd build
-            cmake .. -DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
-            make -j $JOBS
-
-      - name: Test
-        shell: bash
-        run: |
-            export CTEST_PARALLEL_LEVEL=$JOBS
-            export CTEST_OUTPUT_ON_FAILURE=1
-            cd build
-            make verify_coverage
-
-      - name: Coveralls GitHub Action
-        uses: coverallsapp/github-action@v1.0.1
-        with:
-          github-token: ${{ secrets.GITHUB_TOKEN }}
-          path-to-lcov: ./build/coverage.info.cleaned
-
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: coverage-build
-          path: build
diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml
deleted file mode 100644 (file)
index dfffd85..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
----
-name: doxygen
-
-on:
-  push:
-    branches:
-      - master
-
-jobs:
-  Doxygen:
-    runs-on: ubuntu-18.04
-    strategy:
-      fail-fast: false
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-      - name: Install Depends
-        run: |
-          sudo apt install doxygen libmbedtls-dev
-
-      - name: Generate Doxygen
-        shell: bash
-        run: |
-          mkdir build
-          cd build
-          cmake -DEVENT__DOXYGEN=ON ..
-          make doxygen
-
-      - name: Deploy Documentation
-        env:
-          LIBEVENT_DEPLOY_PRI: ${{ secrets.LIBEVENT_DEPLOY_PRI }}
-          COMMIT_ID: ${{ github.sha }}
-        run: |
-          [[ -n $LIBEVENT_DEPLOY_PRI ]] || exit 0
-
-          mkdir -p ~/.ssh
-          echo "$LIBEVENT_DEPLOY_PRI" > ~/.ssh/id_rsa
-          chmod 600 ~/.ssh/id_rsa
-          ssh-keyscan github.com >> ~/.ssh/known_hosts
-
-          short_commit_id="${COMMIT_ID:0:7}"
-          owner_name="${{ github.event.repository.owner.name }}"
-
-          cd ./build/doxygen/html
-          git init
-          git config --local user.name "Libevent Github Robot"
-          git config --local user.email "robot@libevent.org"
-          git add -f .
-          git commit -m "Update documentation (libevent/libevent@$short_commit_id)"
-          git push -f git@github.com:$owner_name/doc master
-
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: doxygen-build
-          path: build
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
deleted file mode 100644 (file)
index 7012cf8..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
----
-name: linux
-
-on:
-  pull_request:
-    types: [opened, synchronize]
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-  push:
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-
-jobs:
-  cmake:
-    runs-on: ${{ matrix.os }}
-    if: "!contains(github.event.head_commit.message, 'ci/linux skip') && !contains(github.event.head_commit.message, 'ci/linux/cmake skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-18.04]
-        EVENT_MATRIX:
-          - DIST
-          - NONE
-          - NO_SSL
-          - DISABLE_OPENSSL
-          - DISABLE_THREAD_SUPPORT
-          - DISABLE_DEBUG_MODE
-          - DISABLE_MM_REPLACEMENT
-          - COMPILER_CLANG
-          - TEST_EXPORT_STATIC
-          - TEST_EXPORT_SHARED
-          - ASAN
-          - TSAN
-          - UBSAN
-        include:
-          - os: ubuntu-22.04
-            EVENT_MATRIX: OPENSSL_3
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-      - name: Cache Build
-        uses: actions/cache@v2
-        with:
-          path: build
-          key: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-v3
-      - name: Cache Dist Build
-        uses: actions/cache@v2
-        with:
-          path: dist
-          key: ${{ matrix.os }}-cmake-dist-${{ matrix.EVENT_MATRIX }}-v3
-
-      - name: Install Depends
-        run: |
-          sudo apt-get update
-          sudo apt-get install -y libmbedtls-dev
-
-      - name: Build
-        shell: bash
-        run: |
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
-            ./autogen.sh
-            mkdir -p dist
-            cd dist
-            ../configure
-            rm -fr *.tar.gz
-            make dist
-            archive=$(echo *.tar.gz)
-            tar -vxf $archive
-            cd $(basename $archive .tar.gz)
-          fi
-
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "COMPILER_CLANG" ]; then
-            EVENT_CMAKE_OPTIONS=""
-            export CC=clang
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=SHARED -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "ASAN" ]; then
-            EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=debug"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "TSAN" ]; then
-            EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS=-fsanitize=thread -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=debug"
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "UBSAN" ]; then
-            EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS=-fsanitize=undefined -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=debug"
-          else
-            EVENT_CMAKE_OPTIONS=""
-          fi
-
-          mkdir -p build
-          cd build
-          echo [cmake]: cmake .. -DEVENT__ENABLE_GCC_WARNINGS=ON $EVENT_CMAKE_OPTIONS
-          cmake .. -DEVENT__ENABLE_GCC_WARNINGS=ON $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
-          cmake --build .
-
-      - name: Test
-        shell: bash
-        run: |
-          JOBS=20
-          export CTEST_PARALLEL_LEVEL=$JOBS
-          export CTEST_OUTPUT_ON_FAILURE=1
-
-          export TSAN_OPTIONS=suppressions=$PWD/extra/tsan.supp
-          export LSAN_OPTIONS=suppressions=$PWD/extra/lsan.supp
-
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
-            cd dist
-            archive=$(echo *.tar.gz)
-            cd $(basename $archive .tar.gz)
-          fi
-          cd build
-
-          if [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
-            sudo python3 ../test-export/test-export.py static
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
-            sudo python3 ../test-export/test-export.py shared
-          else
-            cmake --build . --target verify
-          fi
-
-      - uses: actions/upload-artifact@v1
-        if: failure() && matrix.EVENT_MATRIX != 'DIST'
-        with:
-          name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-build
-          path: build
-      - uses: actions/upload-artifact@v1
-        if: failure() && matrix.EVENT_MATRIX == 'DIST'
-        with:
-          name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-dist
-          path: dist
-
-  autotools:
-    runs-on: ${{ matrix.os }}
-    if: "!contains(github.event.head_commit.message, 'ci/linux skip') && !contains(github.event.head_commit.message, 'ci/linux/autotools skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-18.04]
-        EVENT_MATRIX:
-          - DIST
-          - NONE
-          - NO_SSL
-          - DISABLE_OPENSSL
-          - DISABLE_THREAD_SUPPORT
-          - DISABLE_DEBUG_MODE
-          - DISABLE_MM_REPLACEMENT
-          - COMPILER_CLANG
-        include:
-          - os: ubuntu-22.04
-            EVENT_MATRIX: OPENSSL_3
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-      - name: Cache Build
-        uses: actions/cache@v2
-        with:
-          path: build
-          key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v3
-      - name: Cache Dist Build
-        uses: actions/cache@v2
-        with:
-          path: dist
-          key: ${{ matrix.os }}-autotools-dist-${{ matrix.EVENT_MATRIX }}-v3
-
-      - name: Install Depends
-        run: |
-          sudo apt-get update
-          sudo apt-get install -y libmbedtls-dev
-
-      - name: Build
-        shell: bash
-        run: |
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-openssl"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "COMPILER_CLANG" ]; then
-            EVENT_CONFIGURE_OPTIONS=""
-            export CC=clang
-
-          else
-            EVENT_CONFIGURE_OPTIONS=""
-          fi
-
-          ./autogen.sh
-
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
-            mkdir -p dist
-            cd dist
-            rm -fr *.tar.gz
-            ../configure $EVENT_CONFIGURE_OPTIONS
-            make dist
-            archive=$(echo *.tar.gz)
-            tar -vxf $archive
-            cd $(basename $archive .tar.gz)
-          fi
-
-          mkdir -p build
-          cd build
-          echo [configure]: ../configure --enable-gcc-warnings $EVENT_CONFIGURE_OPTIONS
-          ../configure --enable-gcc-warnings $EVENT_CONFIGURE_OPTIONS
-          make
-      - name: Test
-        shell: bash
-        run: |
-          JOBS=20
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DIST" ]; then
-            cd dist
-            archive=$(echo *.tar.gz)
-            cd $(basename $archive .tar.gz)
-          fi
-          cd build
-          make -j $JOBS verify
-
-      - uses: actions/upload-artifact@v1
-        if: failure() && matrix.EVENT_MATRIX != 'DIST'
-        with:
-          name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-build
-          path: build
-      - uses: actions/upload-artifact@v1
-        if: failure() && matrix.EVENT_MATRIX == 'DIST'
-        with:
-          name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-dist
-          path: dist
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
deleted file mode 100644 (file)
index 8f298f7..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
----
-name: macos
-
-on:
-  pull_request:
-    types: [opened, synchronize]
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-  push:
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-
-jobs:
-  cmake:
-    runs-on: ${{ matrix.os }}
-    if: "!contains(github.event.head_commit.message, 'ci/macos skip') && !contains(github.event.head_commit.message, 'ci/macos/cmake skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [macos-latest]
-        EVENT_MATRIX:
-          - NONE
-          - NO_SSL
-          - DISABLE_OPENSSL
-          - DISABLE_THREAD_SUPPORT
-          - DISABLE_DEBUG_MODE
-          - DISABLE_MM_REPLACEMENT
-          - TEST_EXPORT_STATIC
-          - TEST_EXPORT_SHARED
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-
-      - name: Cache Build
-        uses: actions/cache@v2
-        with:
-          path: build
-          key: macos-10.15-cmake-${{ matrix.EVENT_MATRIX }}-v3
-
-      - name: Install Depends
-        run: brew install mbedtls@2
-
-      - name: Build
-        shell: bash
-        run: |
-          # NOTE: cmake does not support autodetection of OPENSSL_ROOT_DIR via brew
-          export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
-
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
-            EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=SHARED -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
-
-          else
-            EVENT_CMAKE_OPTIONS=""
-          fi
-          EVENT_CMAKE_OPTIONS="$EVENT_CMAKE_OPTIONS -DMBEDTLS_ROOT_DIR=/usr/local/opt/mbedtls@2"
-
-          mkdir -p build
-          cd build
-          echo [cmake]: cmake .. $EVENT_CMAKE_OPTIONS
-          cmake .. $EVENT_CMAKE_OPTIONS || (rm -rf * && cmake .. $EVENT_CMAKE_OPTIONS)
-          cmake --build .
-
-      - name: Test
-        shell: bash
-        run: |
-          JOBS=1
-          export CTEST_PARALLEL_LEVEL=$JOBS
-          export CTEST_OUTPUT_ON_FAILURE=1
-
-          cd build
-
-          if [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_STATIC" ]; then
-            sudo python3 ../test-export/test-export.py static
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "TEST_EXPORT_SHARED" ]; then
-            sudo python3 ../test-export/test-export.py shared
-          else
-            cmake --build . --target verify
-          fi
-
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-build
-          path: build
-
-  autotools:
-    runs-on: ${{ matrix.os }}
-    if: "!contains(github.event.head_commit.message, 'ci/macos skip') && !contains(github.event.head_commit.message, 'ci/macos/autotools skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [macos-latest]
-        EVENT_MATRIX:
-          - NONE
-          - NO_SSL
-          - DISABLE_OPENSSL
-          - DISABLE_THREAD_SUPPORT
-          - DISABLE_DEBUG_MODE
-          - DISABLE_MM_REPLACEMENT
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-
-      - name: Cache Build
-        uses: actions/cache@v2
-        with:
-          path: build
-          key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v3
-
-      - name: Install Depends
-        run: brew install autoconf automake libtool pkg-config mbedtls@2
-
-      - name: Build
-        shell: bash
-        run: |
-          export CPPFLAGS="-I/usr/local/opt/mbedtls@2/include"
-          export  LDFLAGS="-L/usr/local/opt/mbedtls@2/lib"
-
-          if [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_OPENSSL" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-openssl"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "NO_SSL" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_THREAD_SUPPORT" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-thread-support"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_DEBUG_MODE" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-debug-mode"
-
-          elif [ "${{ matrix.EVENT_MATRIX }}" == "DISABLE_MM_REPLACEMENT" ]; then
-            EVENT_CONFIGURE_OPTIONS="--disable-malloc-replacement"
-
-          else
-            EVENT_CONFIGURE_OPTIONS=""
-          fi
-
-          ./autogen.sh
-          mkdir -p build
-          cd build
-          echo [configure]: ../configure $EVENT_CONFIGURE_OPTIONS
-          ../configure $EVENT_CONFIGURE_OPTIONS
-          make
-
-      - name: Test
-        shell: bash
-        run: |
-          JOBS=1
-          cd build
-          make -j $JOBS verify
-
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-build
-          path: build
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
new file mode 100644 (file)
index 0000000..333627a
--- /dev/null
@@ -0,0 +1,159 @@
+---
+name: upstream
+
+on:
+  push:
+    branches:
+      - master
+
+jobs:
+  coverage-job:
+    runs-on: ubuntu-18.04
+    steps:
+      - uses: actions/checkout@v2.0.0
+      - name: Cache
+        uses: actions/cache@v1.0.3
+        with:
+          path: build
+          key: ${{ matrix.os }}-coverage-v2
+
+      - name: Install Depends
+        run: sudo apt install zlib1g-dev libssl-dev build-essential lcov libmbedtls-dev
+
+      - name: Build
+        shell: bash
+        run: |
+            export JOBS=20
+            mkdir -p build
+            cd build
+            cmake .. -DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
+            make -j $JOBS
+
+      - name: Test
+        shell: bash
+        run: |
+            export CTEST_PARALLEL_LEVEL=$JOBS
+            export CTEST_OUTPUT_ON_FAILURE=1
+            cd build
+            make verify_coverage
+
+      - name: Coveralls GitHub Action
+        uses: coverallsapp/github-action@v1.0.1
+        with:
+          github-token: ${{ secrets.GITHUB_TOKEN }}
+          path-to-lcov: ./build/coverage.info.cleaned
+
+      - uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: coverage-build
+          path: build
+  abi-job:
+    runs-on: ubuntu-18.04
+    ## TODO: use docker image, but for now this is not possible without hacks
+    ## due to even public registry require some authentication:
+    ## - https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782/page/5
+    #container: docker.pkg.github.com/azat/docker-images/lvc-debian
+    strategy:
+      fail-fast: false
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+
+      - name: Install Dependencies
+        run:
+          sudo apt install
+            abi-tracker
+            abi-monitor
+            abi-dumper
+            abi-compliance-checker
+            pkgdiff
+            vtable-dumper
+
+      - name: Generate
+        shell: bash
+        run: |
+          ./extra/abi-check/abi_check.sh
+        env:
+          ABI_CHECK_ROOT: /tmp/le-abi-root
+
+      - name: Deploy
+        env:
+          LIBEVENT_DEPLOY_ABI_PRI: ${{ secrets.LIBEVENT_DEPLOY_ABI_PRI }}
+          COMMIT_ID: ${{ github.sha }}
+        run: |
+          [[ -n $LIBEVENT_DEPLOY_ABI_PRI ]] || exit 0
+
+          mkdir -p ~/.ssh
+          echo "$LIBEVENT_DEPLOY_ABI_PRI" > ~/.ssh/id_rsa
+          chmod 600 ~/.ssh/id_rsa
+          ssh-keyscan github.com >> ~/.ssh/known_hosts
+
+          short_commit_id="${COMMIT_ID:0:7}"
+          owner_name="${{ github.event.repository.owner.name }}"
+
+          cd /tmp/le-abi-root/work/abi-check
+          git init
+          git config --local user.name "Libevent Github Robot"
+          git config --local user.email "robot@libevent.org"
+          git add -f .
+          git commit -m "Update ABI/API backward compatibility report (libevent/libevent@$short_commit_id)"
+          git push -f git@github.com:$owner_name/abi master
+
+      # XXX: requires container-id for docker
+      - uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: build
+          path: /tmp/le-abi-root
+      - uses: actions/upload-artifact@v1
+        with:
+          name: build
+
+  doxygen-job:
+    runs-on: ubuntu-18.04
+    strategy:
+      fail-fast: false
+
+    steps:
+      - uses: actions/checkout@v2.0.0
+      - name: Install Depends
+        run: |
+          sudo apt install doxygen libmbedtls-dev
+
+      - name: Generate Doxygen
+        shell: bash
+        run: |
+          mkdir build
+          cd build
+          cmake -DEVENT__DOXYGEN=ON ..
+          make doxygen
+
+      - name: Deploy Documentation
+        env:
+          LIBEVENT_DEPLOY_PRI: ${{ secrets.LIBEVENT_DEPLOY_PRI }}
+          COMMIT_ID: ${{ github.sha }}
+        run: |
+          [[ -n $LIBEVENT_DEPLOY_PRI ]] || exit 0
+
+          mkdir -p ~/.ssh
+          echo "$LIBEVENT_DEPLOY_PRI" > ~/.ssh/id_rsa
+          chmod 600 ~/.ssh/id_rsa
+          ssh-keyscan github.com >> ~/.ssh/known_hosts
+
+          short_commit_id="${COMMIT_ID:0:7}"
+          owner_name="${{ github.event.repository.owner.name }}"
+
+          cd ./build/doxygen/html
+          git init
+          git config --local user.name "Libevent Github Robot"
+          git config --local user.email "robot@libevent.org"
+          git add -f .
+          git commit -m "Update documentation (libevent/libevent@$short_commit_id)"
+          git push -f git@github.com:$owner_name/doc master
+
+      - uses: actions/upload-artifact@v1
+        if: failure()
+        with:
+          name: doxygen-build
+          path: build     path: /tmp/le-abi-root/work/abi-check
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
deleted file mode 100644 (file)
index 75eec37..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
----
-name: mingw
-
-on:
-  pull_request:
-    types: [opened, synchronize]
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-  push:
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-
-jobs:
-  autotools:
-    runs-on: windows-2019
-    if: "!contains(github.event.head_commit.message, 'ci/mingw skip') && !contains(github.event.head_commit.message, 'ci/mingw/autotools skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        EVENT_MATRIX:
-          - none
-          - no-ssl
-          - disable-openssl
-          - disable-thread-support
-          - disable-debug-mode
-          - disable-malloc-replacement
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-      - name: Cache Build
-        uses: actions/cache@v2
-        with:
-          path: build
-          key: mingw-autotools-${{ matrix.EVENT_MATRIX }}-v5
-      - name: Setup MSYS2
-        uses: msys2/setup-msys2@v2
-        with:
-          msystem: MINGW64
-          update: true
-          install: mingw-w64-x86_64-gcc autoconf automake libtool mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls pkg-config
-
-      - name: Build
-        shell: powershell
-        run: |
-          $env:EVENT_CONFIGURE_OPTIONS=""
-          if ( "${{ matrix.EVENT_MATRIX }}" -eq "no-ssl" ) {
-            $env:EVENT_CONFIGURE_OPTIONS="--disable-openssl --disable-mbedtls"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -ne "none" ) {
-            $env:EVENT_CONFIGURE_OPTIONS="--${{ matrix.EVENT_MATRIX }}"
-          }
-          $env:EVENT_BUILD_PARALLEL=10
-
-          $script='
-          export PATH="/mingw64/bin:/usr/bin:/bin:/usr/local/bin:/opt/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:$PATH"
-          ./autogen.sh 2>&1 3>&1
-          [[ $? -ne 0 ]] && exit 1
-          mkdir -p build
-          cd build
-          [[ $? -ne 0 ]] && exit 1
-          LDFLAGS="-L/mingw64/lib" CFLAGS="-I/mingw64/include" ../configure $EVENT_CONFIGURE_OPTIONS 2>&1
-          [[ $? -ne 0 ]] && exit 1
-          make -j $EVENT_BUILD_PARALLEL 2>&1
-          [[ $? -ne 0 ]] && exit 1
-          exit 0
-          '
-          D:\a\_temp\msys64\usr\bin\bash.exe -c $script
-
-      - name: Test
-        shell: powershell
-        run: |
-          $env:EVENT_TESTS_PARALLEL=1
-
-          $script='
-          export PATH="/mingw64/bin:/usr/bin:/bin:/usr/local/bin:/opt/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:$PATH"
-          cd build
-          make verify -j $EVENT_TESTS_PARALLEL 2>&1 '
-          D:\a\_temp\msys64\usr\bin\bash.exe -c $script
-
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: mingw-${{ matrix.EVENT_MATRIX }}-build
-          path: build
-
-  cmake:
-    runs-on: windows-2019
-    if: "!contains(github.event.head_commit.message, 'ci/mingw skip') && !contains(github.event.head_commit.message, 'ci/mingw/cmake skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        EVENT_MATRIX:
-          - NONE
-          - NO_SSL
-          - DISABLE_OPENSSL
-          - DISABLE_THREAD_SUPPORT
-          - DISABLE_DEBUG_MODE
-          - DISABLE_MM_REPLACEMENT
-
-    steps:
-      - uses: actions/checkout@v2.0.0
-      - name: Cache Build
-        uses: actions/cache@v2
-        with:
-          path: build
-          key: mingw-cmake-${{ matrix.EVENT_MATRIX }}-v4
-
-      - name: Setup MSYS2
-        uses: msys2/setup-msys2@v2
-        with:
-          msystem: MINGW64
-          update: true
-          install: mingw-w64-x86_64-gcc mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls  
-
-      - name: Build
-        shell: powershell
-        run: |
-          $EVENT_CONFIGURE_OPTIONS=""
-          if ( "${{ matrix.EVENT_MATRIX }}" -ne "NO_SSL" ) {
-            $EVENT_CONFIGURE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -ne "NONE" ) {
-            $EVENT_CONFIGURE_OPTIONS="-DEVENT__${{ matrix.EVENT_MATRIX }}=ON"
-          }
-          $env:PATH="D:\a\_temp\msys64\mingw64\bin;D:\a\_temp\msys64\usr\bin;$env:PATH"
-          mkdir build -ea 0
-          cd build
-          function cmake_configure($retry)
-          {
-            $errcode=0
-            try {
-              cmake .. -G "MSYS Makefiles" $EVENT_CONFIGURE_OPTIONS -DCMAKE_C_FLAGS=-w
-              $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 .
-
-      - name: Test
-        shell: powershell
-        run: |
-          cd build
-          ctest --output-on-failure
-
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: mingw-${{ matrix.EVENT_MATRIX }}-build
-          path: build
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
deleted file mode 100644 (file)
index 920d933..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
----
-name: windows
-
-on:
-  pull_request:
-    types: [opened, synchronize]
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-  push:
-    paths-ignore:
-      - '**.md'
-      - '.mailmap'
-      - 'ChangeLog*'
-      - 'whatsnew*'
-      - 'LICENSE'
-
-jobs:
-  vs2019:
-    runs-on: ${{ matrix.os }}
-    if: "!contains(github.event.head_commit.message, 'ci/windows skip')"
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [windows-2019]
-        EVENT_MATRIX:
-          - NONE
-          - NO_SSL
-          - LIBRARY_TYPE_STATIC
-          - DISABLE_OPENSSL
-          - DISABLE_THREAD_SUPPORT
-          - DISABLE_DEBUG_MODE
-          - DISABLE_MM_REPLACEMENT
-          - DUNICODE
-          - TEST_EXPORT_SHARED
-          - TEST_EXPORT_STATIC
-
-    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: af2287382b1991dbdcb7e5112d236f3323b9dd7a
-
-      - name: Build
-        shell: powershell
-        run: |
-          $EVENT_BUILD_PARALLEL=10
-
-          if ( "${{ matrix.EVENT_MATRIX }}" -eq "LIBRARY_TYPE_STATIC" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__MSVC_STATIC_RUNTIME=OFF"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_OPENSSL" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_THREAD_SUPPORT" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_THREAD_SUPPORT=ON"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_DEBUG_MODE" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_DEBUG_MODE=ON"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "DISABLE_MM_REPLACEMENT" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_MM_REPLACEMENT=ON"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "UNICODE" ) {
-            $EVENT_CMAKE_OPTIONS="-DCMAKE_C_FLAGS='-DUNICODE -D_UNICODE'"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "TEST_EXPORT_SHARED" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "TEST_EXPORT_STATIC" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__MSVC_STATIC_RUNTIME=OFF -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
-          }
-          elseif ( "${{ matrix.EVENT_MATRIX }}" -eq "NO_SSL" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__DISABLE_OPENSSL=ON -DEVENT__DISABLE_MBEDTLS=ON"
-          }
-          else {
-            $EVENT_CMAKE_OPTIONS=""
-          }
-
-          mkdir build -ea 0
-          cd build
-
-          $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
-            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