diff --git a/.github/workflows/build-develop.yml b/.github/workflows/build-develop.yml index 67258aed7..423779d1b 100644 --- a/.github/workflows/build-develop.yml +++ b/.github/workflows/build-develop.yml @@ -52,7 +52,7 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}}/build - run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake + run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake -DCONAN_INSTALL_ARGS="--build=missing;-c=corrade/*:tools.build:cxxflags=['-include','vector']" - name: Build working-directory: ${{github.workspace}}/build @@ -108,7 +108,7 @@ jobs: run: sudo ctest --output-on-failure build-win64: - runs-on: windows-2019 + runs-on: windows-latest outputs: version_number: ${{ env.VERSION }} steps: diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index b6aefab12..44aa5e498 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -155,7 +155,7 @@ jobs: prerelease: false build-win64: - runs-on: windows-2019 + runs-on: windows-latest outputs: version_number: ${{ env.VERSION }} steps: diff --git a/.github/workflows/build_cross.yml b/.github/workflows/build_cross.yml index a841a39f1..b85c8619a 100644 --- a/.github/workflows/build_cross.yml +++ b/.github/workflows/build_cross.yml @@ -21,18 +21,18 @@ jobs: include: - arch: x86_64 conan_arch: x86_64 - toolchain: http://musl.cc/x86_64-linux-musl-cross.tgz + toolchain: https://github.com/netboxlabs/pktvisor/releases/download/toolchains/x86_64-linux-musl-cross.tgz cc: x86_64-linux-musl-gcc cxx: x86_64-linux-musl-g++ ldflags: "-static" # - arch: armv7lh # ARMv7 little-endian hard-float # conan_arch: armv7hf - # toolchain: http://musl.cc/armv7l-linux-musleabihf-cross.tgz + # toolchain: https://github.com/netboxlabs/pktvisor/releases/download/toolchains/armv7l-linux-musleabihf-cross.tgz # cc: armv7l-linux-musleabihf-gcc # cxx: armv7l-linux-musleabihf-g++ - arch: aarch64 conan_arch: armv8 - toolchain: http://musl.cc/aarch64-linux-musl-cross.tgz + toolchain: https://github.com/netboxlabs/pktvisor/releases/download/toolchains/aarch64-linux-musl-cross.tgz cc: aarch64-linux-musl-gcc cxx: aarch64-linux-musl-g++ ldflags: "-static" diff --git a/cmake/conan_provider.cmake b/cmake/conan_provider.cmake index 2a01f0408..5f71be451 100644 --- a/cmake/conan_provider.cmake +++ b/cmake/conan_provider.cmake @@ -50,6 +50,9 @@ function(detect_os os os_api_level os_sdk os_subsystem os_version) elseif(CMAKE_SYSTEM_NAME MATCHES "^MSYS") set(${os} Windows PARENT_SCOPE) set(${os_subsystem} msys2 PARENT_SCOPE) + elseif(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + # https://github.com/emscripten-core/emscripten/blob/4.0.6/cmake/Modules/Platform/Emscripten.cmake#L17C1-L17C34 + set(${os} Emscripten PARENT_SCOPE) else() set(${os} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE) endif() @@ -123,6 +126,10 @@ function(detect_arch arch) elseif(host_arch MATCHES "AMD64|amd64|x86_64|x64") set(_arch x86_64) endif() + if(EMSCRIPTEN) + # https://github.com/emscripten-core/emscripten/blob/4.0.6/cmake/Modules/Platform/Emscripten.cmake#L294C1-L294C80 + set(_arch wasm) + endif() message(STATUS "CMake-Conan: cmake_system_processor=${_arch}") set(${arch} ${_arch} PARENT_SCOPE) endfunction() @@ -268,15 +275,15 @@ function(detect_compiler compiler compiler_version compiler_runtime compiler_run elseif(_compiler MATCHES AppleClang) set(_compiler "apple-clang") - string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + string(REPLACE "." ";" VERSION_LIST ${_compiler_version}) list(GET VERSION_LIST 0 _compiler_version) elseif(_compiler MATCHES Clang) set(_compiler "clang") - string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + string(REPLACE "." ";" VERSION_LIST ${_compiler_version}) list(GET VERSION_LIST 0 _compiler_version) elseif(_compiler MATCHES GNU) set(_compiler "gcc") - string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + string(REPLACE "." ";" VERSION_LIST ${_compiler_version}) list(GET VERSION_LIST 0 _compiler_version) endif()