]> granicus.if.org Git - libevent/commitdiff
add mbedtls to CI
authorokhowang(王沛文) <okhowang@tencent.com>
Wed, 27 May 2020 07:29:42 +0000 (15:29 +0800)
committerAzat Khuzhin <azat@libevent.org>
Wed, 22 Jul 2020 19:53:23 +0000 (22:53 +0300)
.github/workflows/linux.yml
.github/workflows/macos.yml
.github/workflows/mingw.yml
.github/workflows/windows.yml

index 703fb96203b81fb92129361d28df98b207e3965e..129eb8e9e0fb22f3af6c81dce683f1d1a46e0657 100644 (file)
@@ -53,6 +53,11 @@ jobs:
           path: dist
           key: ${{ matrix.os }}-cmake-dist-${{ matrix.EVENT_MATRIX }}-v2
 
+      - name: Install Depends
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y libmbedtls-dev
+
       - name: Build And Test
         shell: bash
         run: |
@@ -153,6 +158,11 @@ jobs:
           path: dist
           key: ${{ matrix.os }}-autotools-dist-${{ matrix.EVENT_MATRIX }}-v2
 
+      - name: Install Depends
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y libmbedtls-dev
+
       - name: Build And Test
         shell: bash
         run: |
index 910a627a581400b6befc904b03d23b47feded5d1..84b4c9ec006ea61ef3a313bd0c03c55fe793cab7 100644 (file)
@@ -45,6 +45,9 @@ jobs:
           path: build
           key: macos-10.15-cmake-${{ matrix.EVENT_MATRIX }}-v2
 
+      - name: Install Depends
+        run: brew install mbedtls
+
       - name: Build And Test
         shell: bash
         run: |
@@ -124,7 +127,7 @@ jobs:
           key: ${{ matrix.os }}-autotools-${{ matrix.EVENT_MATRIX }}-v2
 
       - name: Install Depends
-        run: brew install autoconf automake libtool pkg-config
+        run: brew install autoconf automake libtool pkg-config mbedtls
 
       - name: Build And Test
         shell: bash
index a297e8caa093cf81783acfb2afb26d59f5a1d622..d0f2af85385ef57c65be24250cd803fb7e10e6c9 100644 (file)
@@ -46,7 +46,7 @@ jobs:
         uses: actions/cache@v1.1.2
         with:
           path: build
-          key: mingw-autotools-${{ matrix.EVENT_MATRIX }}-v2
+          key: mingw-autotools-${{ matrix.EVENT_MATRIX }}-v3
 
       - uses: numworks/setup-msys2@v1
         if: steps.cache-mingw.outputs.cache-hit != 'true'
@@ -56,7 +56,7 @@ jobs:
       - name: Install Dependes
         if: steps.cache-mingw.outputs.cache-hit != 'true'
         run: |
-          msys2do pacman -S --noconfirm mingw-w64-x86_64-gcc autoconf automake libtool mingw-w64-x86_64-openssl
+          msys2do pacman -S --noconfirm mingw-w64-x86_64-gcc autoconf automake libtool mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls
 
       - name: Build And Test
         shell: powershell
@@ -115,7 +115,7 @@ jobs:
         uses: actions/cache@v1.1.2
         with:
           path: build
-          key: mingw-cmake-${{ matrix.EVENT_MATRIX }}-v2
+          key: mingw-cmake-${{ matrix.EVENT_MATRIX }}-v3
 
       - uses: numworks/setup-msys2@v1
         if: steps.cache-mingw-cmake.outputs.cache-hit != 'true'
@@ -125,7 +125,7 @@ jobs:
       - name: Install Dependes
         if: steps.cache-mingw-cmake.outputs.cache-hit != 'true'
         run: |
-          msys2do pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-openssl
+          msys2do pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-openssl mingw-w64-x86_64-mbedtls
 
       - name: Build And Test
         shell: powershell
index b30038a09d1ad08bdbad821894e53c17b269a1e1..82538156932b1fcaae85b5f7cd0d0f912da02a86 100644 (file)
@@ -36,7 +36,7 @@ jobs:
         uses: actions/cache@v1.0.3
         with:
           path: C:\vcpkg\installed
-          key: ${{ matrix.os }}-vcpkg
+          key: ${{ matrix.os }}-vcpkg-v2
 
       - name: Cache Build
         uses: actions/cache@v1.0.3
@@ -50,19 +50,18 @@ jobs:
         run: |
           vcpkg install openssl:x64-windows
           vcpkg install zlib:x64-windows
+          vcpkg install mbedtls:x64-windows
 
       - name: Build And Test
         shell: powershell
         run: |
-          $OPENSSL_ROOT_DIR="C:\vcpkg\installed\x64-windows"
           $EVENT_BUILD_PARALLEL=10
           $EVENT_TESTS_PARALLEL=1
-          $env:PATH="$OPENSSL_ROOT_DIR/bin;$env:PATH"
 
           mkdir build -ea 0
           cd build
 
-          $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' .."
+          $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake .."
           function cmake_configure($retry)
           {
             $errcode=0
@@ -142,7 +141,7 @@ jobs:
         uses: actions/cache@v1.1.0
         with:
           path: C:\vcpkg\installed
-          key: ${{ matrix.os }}-vcpkg
+          key: ${{ matrix.os }}-vcpkg-v2
 
       - name: Cache Build
         uses: actions/cache@v1.1.0
@@ -156,17 +155,16 @@ jobs:
         run: |
           vcpkg install openssl:x64-windows
           vcpkg install zlib:x64-windows
+          vcpkg install mbedtls:x64-windows
 
       - name: Build And Test
         shell: powershell
         run: |
-          $OPENSSL_ROOT_DIR="C:\vcpkg\installed\x64-windows"
           $EVENT_BUILD_PARALLEL=10
           $EVENT_TESTS_PARALLEL=1
-          $env:PATH="$OPENSSL_ROOT_DIR/bin;$env:PATH"
 
           if ( "${{ matrix.EVENT_MATRIX }}" -eq "LIBRARY_TYPE_STATIC" ) {
-            $EVENT_CMAKE_OPTIONS="-DEVENT__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"
@@ -187,7 +185,7 @@ jobs:
             $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__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
+            $EVENT_CMAKE_OPTIONS="-DEVENT__LIBRARY_TYPE=STATIC -DEVENT__MSVC_STATIC_RUNTIME=OFF -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_SAMPLES=ON"
           }
           else {
             $EVENT_CMAKE_OPTIONS=""
@@ -197,10 +195,10 @@ jobs:
           cd build
 
           if ("${{ matrix.os }}" -eq "windows-2016") {
-            $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' .."
+            $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake .."
           }
           else { # windows-2019
-            $CMAKE_CMD="cmake -G 'Visual Studio 16 2019' -A x64 .. $EVENT_CMAKE_OPTIONS"
+            $CMAKE_CMD="cmake -G 'Visual Studio 16 2019' -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake .. $EVENT_CMAKE_OPTIONS"
           }
           function cmake_configure($retry)
           {