fix CI: Install vcpkg through the source code to temporarily solve the windows CI problem

This commit is contained in:
yuangongji 2020-08-05 10:14:53 +08:00
parent eb7bed03c4
commit 92b9109ef8

View File

@ -31,26 +31,20 @@ jobs:
steps: steps:
- uses: actions/checkout@v2.0.0 - uses: actions/checkout@v2.0.0
- name: Cache Depends
id: cache-depends
uses: actions/cache@v1.0.3
with:
path: C:\vcpkg\installed
key: ${{ matrix.os }}-vcpkg-v2
- name: Cache Build - name: Cache Build
uses: actions/cache@v1.0.3 uses: actions/cache@v2
with: with:
path: build path: build
key: ${{ matrix.os }}-${{ matrix.EVENT_MATRIX }}-v3 key: ${{ matrix.os }}-${{ matrix.EVENT_MATRIX }}-v4
- name: Install Depends - name: Prepare vcpkg
if: steps.cache-depends.outputs.cache-hit != 'true' uses: lukka/run-vcpkg@v2
shell: powershell id: runvcpkg
run: | with:
vcpkg install openssl:x64-windows vcpkgArguments: zlib:x64-windows openssl:x64-windows mbedtls:x64-windows
vcpkg install zlib:x64-windows vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkg install mbedtls:x64-windows vcpkgGitCommitId: 8e76503a769e153dad8f4e7b2c95a152bb35edaa
vcpkgTriplet: x64-windows
- name: Build And Test - name: Build And Test
shell: powershell shell: powershell
@ -61,7 +55,7 @@ jobs:
mkdir build -ea 0 mkdir build -ea 0
cd build cd build
$CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake .." $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake .."
function cmake_configure($retry) function cmake_configure($retry)
{ {
$errcode=0 $errcode=0
@ -136,26 +130,20 @@ jobs:
steps: steps:
- uses: actions/checkout@v2.0.0 - uses: actions/checkout@v2.0.0
- name: Cache Depends
id: cache-depends
uses: actions/cache@v1.1.0
with:
path: C:\vcpkg\installed
key: ${{ matrix.os }}-vcpkg-v2
- name: Cache Build - name: Cache Build
uses: actions/cache@v1.1.0 uses: actions/cache@v2
with: with:
path: build path: build
key: ${{ matrix.os }}-${{ matrix.EVENT_MATRIX }}-v3 key: ${{ matrix.os }}-${{ matrix.EVENT_MATRIX }}-v4
- name: Install Depends - name: Prepare vcpkg
if: steps.cache-depends.outputs.cache-hit != 'true' uses: lukka/run-vcpkg@v2
shell: powershell id: runvcpkg
run: | with:
vcpkg install openssl:x64-windows vcpkgArguments: zlib:x64-windows openssl:x64-windows mbedtls:x64-windows
vcpkg install zlib:x64-windows vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkg install mbedtls:x64-windows vcpkgGitCommitId: 8e76503a769e153dad8f4e7b2c95a152bb35edaa
vcpkgTriplet: x64-windows
- name: Build And Test - name: Build And Test
shell: powershell shell: powershell
@ -195,10 +183,10 @@ jobs:
cd build cd build
if ("${{ matrix.os }}" -eq "windows-2016") { if ("${{ matrix.os }}" -eq "windows-2016") {
$CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake .." $CMAKE_CMD="cmake -G 'Visual Studio 15 2017 Win64' -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake .."
} }
else { # windows-2019 else { # windows-2019
$CMAKE_CMD="cmake -G 'Visual Studio 16 2019' -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/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) function cmake_configure($retry)
{ {