Browse Source

some ci tweaks (#2375)

* some ci tweaks

* workaround windows-2016 cache
tags/20201208
nihui GitHub 5 years ago
parent
commit
82a64c7f16
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 14 deletions
  1. +4
    -4
      .github/workflows/windows-x64-cpu-vs2017.yml
  2. +5
    -5
      .github/workflows/windows-x64-gpu-vs2017.yml
  3. +0
    -5
      CMakeLists.txt
  4. +5
    -0
      src/CMakeLists.txt

+ 4
- 4
.github/workflows/windows-x64-cpu-vs2017.yml View File

@@ -7,10 +7,10 @@ jobs:
- uses: actions/checkout@v2
- name: cache-protobuf
id: cache-protobuf
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: "protobuf-install"
key: protobuf-vs2017-x64-install
key: protobuf-vs2017-x64-install3
- name: protobuf
if: steps.cache-protobuf.outputs.cache-hit != 'true'
run: |
@@ -35,10 +35,10 @@ jobs:
- uses: actions/checkout@v2
- name: cache-protobuf
id: cache-protobuf
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: "protobuf-install"
key: protobuf-vs2017-x64-install
key: protobuf-vs2017-x64-install3
- name: protobuf
if: steps.cache-protobuf.outputs.cache-hit != 'true'
run: |


+ 5
- 5
.github/workflows/windows-x64-gpu-vs2017.yml View File

@@ -9,10 +9,10 @@ jobs:
submodules: true
- name: cache-protobuf
id: cache-protobuf
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: "protobuf-install"
key: protobuf-vs2017-x64-install
key: protobuf-vs2017-x64-install3
- name: protobuf
if: steps.cache-protobuf.outputs.cache-hit != 'true'
run: |
@@ -24,7 +24,7 @@ jobs:
cmake --build . --config Release --target install
- name: cache-vulkansdk
id: cache-vulkansdk
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: "VulkanSDK"
key: VulkanSDK-1.1.114.0-Installer
@@ -36,10 +36,10 @@ jobs:
Remove-Item .\VulkanSDK\Demos, .\VulkanSDK\glslang, .\VulkanSDK\Samples, .\VulkanSDK\shaderc, .\VulkanSDK\spirv-tools, .\VulkanSDK\Third-Party, .\VulkanSDK\Tools, .\VulkanSDK\Tools32 -Recurse
- name: cache-swiftshader
id: cache-swiftshader
uses: actions/cache@v1
uses: actions/cache@v1.0.3
with:
path: swiftshader-install
key: swiftshader-vs2017-x64-install-20200508
key: swiftshader-vs2017-x64-install3-20200508
- name: checkout-swiftshader
if: steps.cache-swiftshader.outputs.cache-hit != 'true'
uses: actions/checkout@v2


+ 0
- 5
CMakeLists.txt View File

@@ -99,11 +99,6 @@ message(STATUS "Target arch: ${NCNN_TARGET_ARCH}")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "cmake")

if(NCNN_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -coverage -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -coverage -lgcov")
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=1024MB -s EXIT_RUNTIME=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s FORCE_FILESYSTEM=1 -s INITIAL_MEMORY=1024MB -s EXIT_RUNTIME=1")


+ 5
- 0
src/CMakeLists.txt View File

@@ -307,6 +307,11 @@ if(((IOS AND CMAKE_OSX_ARCHITECTURES MATCHES "arm64") OR (APPLE AND CMAKE_OSX_AR
endif()
endif()

if(NCNN_COVERAGE)
target_compile_options(ncnn PUBLIC -coverage -fprofile-arcs -ftest-coverage)
target_link_libraries(ncnn PUBLIC -coverage -lgcov)
endif()

if(ANDROID OR IOS)
# disable shared library on android and xcode ios
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)


Loading…
Cancel
Save