add mbedtls to CI

This commit is contained in:
okhowang(王沛文) 2020-05-27 15:29:42 +08:00 committed by Azat Khuzhin
parent 028385f685
commit dad699cc04
4 changed files with 27 additions and 16 deletions

View 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: |

View 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

View 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

View 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)
{