forked from Tencent/ncnn
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (57 loc) · 2.76 KB
/
windows-x64-cpu-vs2019.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: windows-x64-cpu-vs2019
on: [push, pull_request]
jobs:
windows-vs2019-sse2:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: cache-protobuf
id: cache-protobuf
uses: actions/cache@v1
with:
path: "protobuf-install"
key: protobuf-windows-install
- name: protobuf
if: steps.cache-protobuf.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/archive/v3.11.2.zip -OutFile protobuf-3.11.2.zip
7z x ./protobuf-3.11.2.zip
cd protobuf-3.11.2
mkdir build-vs2019; cd build-vs2019; cmake -DCMAKE_INSTALL_PREFIX="$env:GITHUB_WORKSPACE\protobuf-install" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -DNCNN_BUILD_TESTS=ON ../cmake
cmake --build . --config Release -j 2
cmake --build . --config Release --target install
- name: configure
run: |
mkdir build; cd build
cmake -DProtobuf_INCLUDE_DIR="$env:GITHUB_WORKSPACE\protobuf-install\include" -DProtobuf_LIBRARIES="$env:GITHUB_WORKSPACE\protobuf-install\lib\libprotobuf.lib" -DProtobuf_PROTOC_EXECUTABLE="$env:GITHUB_WORKSPACE\protobuf-install\bin\protoc.exe" -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=OFF -DNCNN_BUILD_TESTS=ON ..
- name: build
run: cmake --build build --config Release -j 2
- name: test
run: cd build; ctest -C Release --output-on-failure -j 2
windows-vs2019-avx2:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: cache-protobuf
id: cache-protobuf
uses: actions/cache@v1
with:
path: "protobuf-install"
key: protobuf-windows-install
- name: protobuf
if: steps.cache-protobuf.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/archive/v3.11.2.zip -OutFile protobuf-3.11.2.zip
7z x ./protobuf-3.11.2.zip
cd protobuf-3.11.2
mkdir build-vs2019; cd build-vs2019; cmake -DCMAKE_INSTALL_PREFIX="$env:GITHUB_WORKSPACE\protobuf-install" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -DNCNN_BUILD_TESTS=ON ../cmake
cmake --build . --config Release -j 2
cmake --build . --config Release --target install
- name: configure
run: |
mkdir build; cd build
cmake -DProtobuf_INCLUDE_DIR="$env:GITHUB_WORKSPACE\protobuf-install\include" -DProtobuf_LIBRARIES="$env:GITHUB_WORKSPACE\protobuf-install\lib\libprotobuf.lib" -DProtobuf_PROTOC_EXECUTABLE="$env:GITHUB_WORKSPACE\protobuf-install\bin\protoc.exe" -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_BUILD_TESTS=ON ..
- name: build
run: cmake --build build --config Release -j 2
- name: test
run: cd build; ctest -C Release --output-on-failure -j 2