Skip to content

Add missing .o files to libiotivity-lite-jni.so #3602

Add missing .o files to libiotivity-lite-jni.so

Add missing .o files to libiotivity-lite-jni.so #3602

Workflow file for this run

name: CMake Windows
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
# Controls when the action will run.
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
NINJA_VERSION: "1.11.1"
jobs:
cmake_windows:
name: ${{ matrix.name }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- name: "MSVC"
build_type: "Release"
cc: "cl"
cxx: "cl"
build_testing: "OFF"
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
- name: "MinGW-gcc"
build_type: "Release"
cc: "gcc"
cxx: "g++"
build_testing: "ON"
- name: "MinGW-gcc debug-discovery-resource-observable-rep-realloc-concurrent-requests-1"
build_type: "Debug"
cc: "gcc"
cxx: "g++"
build_testing: "ON"
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_DEVICE_MAX_NUM_CONCURRENT_REQUESTS=1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: Download Ninja
shell: cmake -P {0}
run: |
message(STATUS "Using host CMake version: ${CMAKE_VERSION}")
message(STATUS "Downloading Ninja (v$ENV{NINJA_VERSION}) build system")
set(ninja_url "https://github.com/ninja-build/ninja/releases/download/v$ENV{NINJA_VERSION}/ninja-win.zip")
file(DOWNLOAD "${ninja_url}" ./ninja.zip SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./ninja.zip COMMAND_ERROR_IS_FATAL ANY)
- name: Configure
shell: cmake -P {0}
run: |
if (NOT "${{ matrix.environment_script }}" STREQUAL "")
message(STATUS "Set Windows environment")
execute_process(
COMMAND "${{ matrix.environment_script }}" && set
OUTPUT_FILE environment_script_output.txt
COMMAND_ERROR_IS_FATAL ANY
)
file(STRINGS environment_script_output.txt output_lines)
foreach(line IN LISTS output_lines)
if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
endif()
endforeach()
endif()
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/ninja" ninja_program)
message(STATUS "Create Ninja build system")
execute_process(
COMMAND cmake
-S .
-B build
-G Ninja
-D CMAKE_C_COMPILER=${{ matrix.cc }}
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }}
-D CMAKE_MAKE_PROGRAM=${ninja_program}
-D CMAKE_VERBOSE_MAKEFILE=ON
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }}
-D BUILD_TESTING=${{ matrix.build_testing }}
-D OC_CLOUD_ENABLED=ON
-D OC_COLLECTIONS_IF_CREATE_ENABLED=ON
-D OC_PUSH_ENABLED=ON
-D OC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON
-D PLGD_DEV_TIME_ENABLED=ON
-D OC_ETAG_ENABLED=ON
-D OC_DEBUG_ENABLED=ON
${{ matrix.build_args }}
COMMAND_ERROR_IS_FATAL ANY
)
- name: Build
shell: cmake -P {0}
run: |
set(ENV{NINJA_STATUS} "[%f/%t %o/sec] ")
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.environment_script }}" STREQUAL "x")
file(STRINGS environment_script_output.txt output_lines)
foreach(line IN LISTS output_lines)
if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
endif()
endforeach()
endif()
execute_process(
COMMAND cmake --build build
COMMAND_ERROR_IS_FATAL ANY
)
- name: Test
if: ${{ matrix.build_testing == 'ON' }}
shell: cmake -P {0}
working-directory: build
run: |
set(ENV{NINJA_STATUS} "[%f/%t %o/sec] ")
if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.environment_script }}" STREQUAL "x")
file(STRINGS environment_script_output.txt output_lines)
foreach(line IN LISTS output_lines)
if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
endif()
endforeach()
endif()
execute_process(
COMMAND ctest --verbose --label-regex "oc-unittest"
COMMAND_ERROR_IS_FATAL ANY
)
cmake_windows_msys:
name: ${{ matrix.name }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- name: Clang64
msystem: CLANG64
build_type: Debug
build_args: "-DOC_ASAN_ENABLED=ON -DOC_UBSAN_ENABLED=ON"
cc: clang
cxx: clang++
build_testing: ON
steps:
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
mingw-w64-clang-x86_64-clang
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-ninja
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: Configure and build
shell: msys2 {0}
run: |
cmake -S . \
-B build \
-G Ninja \
-D CMAKE_C_COMPILER=${{ matrix.cc }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_VERBOSE_MAKEFILE=ON \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D BUILD_TESTING=${{ matrix.build_testing }} \
-D OC_CLOUD_ENABLED=ON \
-D OC_COLLECTIONS_IF_CREATE_ENABLED=ON \
-D OC_PUSH_ENABLED=ON \
-D OC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON \
-D PLGD_DEV_TIME_ENABLED=ON \
-D OC_ETAG_ENABLED=ON \
-D OC_DEBUG_ENABLED=ON \
${{ matrix.build_args }}
cmake --build build
- name: Test
if: ${{ matrix.build_testing == 'ON' }}
shell: msys2 {0}
working-directory: build
run: |
ctest --verbose --label-regex "oc-unittest"