-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to Conan 2 and use new cmake-conan dependency provider * Fix warning about defining the CMakeDeps generator being mandatory in the future * Generate and log conan lock file * Document the update to Conan 2 * Bump CMake to 3.28.3, apart from on ubuntu-14.04 * Fix conan.io recipe link
- Loading branch information
Showing
15 changed files
with
792 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,12 +121,16 @@ jobs: | |
- name: install conan | ||
if: matrix.use_conan == true | ||
run: | | ||
pip install conan~=1.47 | ||
conan config set general.revisions_enabled=1 | ||
pip install conan~=2.0.5 | ||
- name: install cmake | ||
- name: 'ubuntu-14.04: install cmake' | ||
if: matrix.os == 'ubuntu-14.04' | ||
uses: lukka/[email protected] | ||
|
||
- name: install cmake | ||
if: matrix.os != 'ubuntu-14.04' | ||
uses: lukka/[email protected] | ||
|
||
- name: setup bash path | ||
working-directory: ${{ env.GITHUB_WORKSPACE }} | ||
shell: bash | ||
|
@@ -139,7 +143,7 @@ jobs: | |
if: runner.os == 'Windows' | ||
run: | | ||
# set compiler to cl.exe to avoid building with gcc. | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV | ||
echo "CMAKE_COMPILER_ARGS=-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV | ||
# disable unused network interface | ||
netsh interface set interface name="vEthernet (nat)" admin=DISABLED | ||
# get host IP address | ||
|
@@ -269,13 +273,11 @@ jobs: | |
cmake .. -DCMAKE_BUILD_TYPE:STRING="Release" -DWERROR:BOOL="0" -DBUILD_SAMPLES:BOOL="0" -DBUILD_TESTS:BOOL="0" | ||
make -j 2 && sudo make install | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DWEBSOCKETPP_INCLUDE_DIR:PATH=\"${{ env.RUNNER_WORKSPACE }}/cpprestsdk/Release/libs/websocketpp\"" >> $GITHUB_ENV | ||
- name: disable conan | ||
if: matrix.use_conan == false | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_USE_CONAN:BOOL=\"0\"" >> $GITHUB_ENV | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }}" \ | ||
"-DWEBSOCKETPP_INCLUDE_DIR:PATH=\"${{ env.RUNNER_WORKSPACE }}/cpprestsdk/Release/libs/websocketpp\"" \ | ||
"-DNMOS_CPP_USE_SUPPLIED_JSON_SCHEMA_VALIDATOR:BOOL=\"1\"" \ | ||
"-DNMOS_CPP_USE_SUPPLIED_JWT_CPP:BOOL=\"1\"" \ | ||
>> $GITHUB_ENV | ||
- name: ubuntu avahi setup | ||
if: runner.os == 'Linux' && matrix.install_mdns == false | ||
|
@@ -292,10 +294,20 @@ jobs: | |
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_USE_AVAHI:BOOL=\"1\"" >> $GITHUB_ENV | ||
- name: force cpprest asio | ||
if: matrix.force_cpprest_asio == true | ||
if: matrix.force_cpprest_asio == true && matrix.use_conan == true | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_CONAN_OPTIONS:STRING=\"cpprestsdk:http_client_impl=asio;cpprestsdk:http_listener_impl=asio\"" >> $GITHUB_ENV | ||
echo "CONAN_INSTALL_EXTRA_ARGS=--options\;cpprestsdk/*:http_client_impl=asio\;--options\;cpprestsdk/*:http_listener_impl=asio" >> $GITHUB_ENV | ||
- name: enable conan | ||
if: matrix.use_conan == true | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }}" \ | ||
"-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES:STRING=\"third_party/cmake/conan_provider.cmake\"" \ | ||
"-DCONAN_INSTALL_ARGS:STRING=\"--build=missing\;${{ env.CONAN_INSTALL_EXTRA_ARGS }}\;--lockfile-out=conan.lock\"" \ | ||
>> $GITHUB_ENV | ||
cat $GITHUB_ENV | ||
- name: setup developer command prompt for Microsoft Visual C++ | ||
if: runner.os == 'Windows' | ||
|
@@ -307,7 +319,12 @@ jobs: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: '${{ env.GITHUB_WORKSPACE }}/Development/CMakeLists.txt' | ||
buildDirectory: '${{ env.RUNNER_WORKSPACE }}/build/' | ||
cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ env.RUNNER_WORKSPACE }}/install" ${{ env.CMAKE_EXTRA_ARGS }}' | ||
cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ env.RUNNER_WORKSPACE }}/install" ${{ env.CMAKE_COMPILER_ARGS }} ${{ env.CMAKE_EXTRA_ARGS }}' | ||
|
||
- name: dump conan lockfile | ||
if: matrix.use_conan == true | ||
run: | | ||
cat ${{ env.RUNNER_WORKSPACE }}/build/conan.lock | ||
- name: unit test | ||
run: | | ||
|
@@ -344,10 +361,10 @@ jobs: | |
cmakeAppendedArgs: '-GNinja | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG="1" | ||
-DCMAKE_MODULE_PATH="${{ env.CMAKE_WORKSPACE }}/build" | ||
-DCMAKE_MODULE_PATH="${{ env.CMAKE_WORKSPACE }}/build/conan" | ||
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_WORKSPACE }}/install" | ||
-DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_WORKSPACE }}/build" | ||
${{ env.CMAKE_EXTRA_ARGS }}' | ||
-DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_WORKSPACE }}/build/conan" | ||
${{ env.CMAKE_COMPILER_ARGS }}' | ||
|
||
- name: install test log | ||
run: | | ||
|
@@ -660,12 +677,16 @@ jobs: | |
- name: install conan | ||
if: matrix.use_conan == true | ||
run: | | ||
pip install conan~=1.47 | ||
conan config set general.revisions_enabled=1 | ||
pip install conan~=2.0.5 | ||
- name: install cmake | ||
- name: 'ubuntu-14.04: install cmake' | ||
if: matrix.os == 'ubuntu-14.04' | ||
uses: lukka/[email protected] | ||
|
||
- name: install cmake | ||
if: matrix.os != 'ubuntu-14.04' | ||
uses: lukka/[email protected] | ||
|
||
- name: setup bash path | ||
working-directory: ${{ env.GITHUB_WORKSPACE }} | ||
shell: bash | ||
|
@@ -678,7 +699,7 @@ jobs: | |
if: runner.os == 'Windows' | ||
run: | | ||
# set compiler to cl.exe to avoid building with gcc. | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV | ||
echo "CMAKE_COMPILER_ARGS=-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV | ||
# disable unused network interface | ||
netsh interface set interface name="vEthernet (nat)" admin=DISABLED | ||
# get host IP address | ||
|
@@ -808,13 +829,11 @@ jobs: | |
cmake .. -DCMAKE_BUILD_TYPE:STRING="Release" -DWERROR:BOOL="0" -DBUILD_SAMPLES:BOOL="0" -DBUILD_TESTS:BOOL="0" | ||
make -j 2 && sudo make install | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DWEBSOCKETPP_INCLUDE_DIR:PATH=\"${{ env.RUNNER_WORKSPACE }}/cpprestsdk/Release/libs/websocketpp\"" >> $GITHUB_ENV | ||
- name: disable conan | ||
if: matrix.use_conan == false | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_USE_CONAN:BOOL=\"0\"" >> $GITHUB_ENV | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }}" \ | ||
"-DWEBSOCKETPP_INCLUDE_DIR:PATH=\"${{ env.RUNNER_WORKSPACE }}/cpprestsdk/Release/libs/websocketpp\"" \ | ||
"-DNMOS_CPP_USE_SUPPLIED_JSON_SCHEMA_VALIDATOR:BOOL=\"1\"" \ | ||
"-DNMOS_CPP_USE_SUPPLIED_JWT_CPP:BOOL=\"1\"" \ | ||
>> $GITHUB_ENV | ||
- name: ubuntu avahi setup | ||
if: runner.os == 'Linux' && matrix.install_mdns == false | ||
|
@@ -831,10 +850,20 @@ jobs: | |
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_USE_AVAHI:BOOL=\"1\"" >> $GITHUB_ENV | ||
- name: force cpprest asio | ||
if: matrix.force_cpprest_asio == true | ||
if: matrix.force_cpprest_asio == true && matrix.use_conan == true | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_CONAN_OPTIONS:STRING=\"cpprestsdk:http_client_impl=asio;cpprestsdk:http_listener_impl=asio\"" >> $GITHUB_ENV | ||
echo "CONAN_INSTALL_EXTRA_ARGS=--options\;cpprestsdk/*:http_client_impl=asio\;--options\;cpprestsdk/*:http_listener_impl=asio" >> $GITHUB_ENV | ||
- name: enable conan | ||
if: matrix.use_conan == true | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }}" \ | ||
"-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES:STRING=\"third_party/cmake/conan_provider.cmake\"" \ | ||
"-DCONAN_INSTALL_ARGS:STRING=\"--build=missing\;${{ env.CONAN_INSTALL_EXTRA_ARGS }}\;--lockfile-out=conan.lock\"" \ | ||
>> $GITHUB_ENV | ||
cat $GITHUB_ENV | ||
- name: setup developer command prompt for Microsoft Visual C++ | ||
if: runner.os == 'Windows' | ||
|
@@ -846,7 +875,12 @@ jobs: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: '${{ env.GITHUB_WORKSPACE }}/Development/CMakeLists.txt' | ||
buildDirectory: '${{ env.RUNNER_WORKSPACE }}/build/' | ||
cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ env.RUNNER_WORKSPACE }}/install" ${{ env.CMAKE_EXTRA_ARGS }}' | ||
cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${{ env.RUNNER_WORKSPACE }}/install" ${{ env.CMAKE_COMPILER_ARGS }} ${{ env.CMAKE_EXTRA_ARGS }}' | ||
|
||
- name: dump conan lockfile | ||
if: matrix.use_conan == true | ||
run: | | ||
cat ${{ env.RUNNER_WORKSPACE }}/build/conan.lock | ||
- name: unit test | ||
run: | | ||
|
@@ -883,10 +917,10 @@ jobs: | |
cmakeAppendedArgs: '-GNinja | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG="1" | ||
-DCMAKE_MODULE_PATH="${{ env.CMAKE_WORKSPACE }}/build" | ||
-DCMAKE_MODULE_PATH="${{ env.CMAKE_WORKSPACE }}/build/conan" | ||
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_WORKSPACE }}/install" | ||
-DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_WORKSPACE }}/build" | ||
${{ env.CMAKE_EXTRA_ARGS }}' | ||
-DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_WORKSPACE }}/build/conan" | ||
${{ env.CMAKE_COMPILER_ARGS }}' | ||
|
||
- name: install test log | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
- name: install conan | ||
if: matrix.use_conan == true | ||
run: | | ||
pip install conan~=1.47 | ||
conan config set general.revisions_enabled=1 | ||
pip install conan~=2.0.5 | ||
- name: install cmake | ||
- name: 'ubuntu-14.04: install cmake' | ||
if: matrix.os == 'ubuntu-14.04' | ||
uses: lukka/[email protected] | ||
|
||
- name: install cmake | ||
if: matrix.os != 'ubuntu-14.04' | ||
uses: lukka/[email protected] | ||
|
||
- name: setup bash path | ||
working-directory: ${{ env.GITHUB_WORKSPACE }} | ||
shell: bash | ||
|
@@ -19,7 +23,7 @@ | |
if: runner.os == 'Windows' | ||
run: | | ||
# set compiler to cl.exe to avoid building with gcc. | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV | ||
echo "CMAKE_COMPILER_ARGS=-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV | ||
# disable unused network interface | ||
netsh interface set interface name="vEthernet (nat)" admin=DISABLED | ||
# get host IP address | ||
|
@@ -149,13 +153,11 @@ | |
cmake .. -DCMAKE_BUILD_TYPE:STRING="Release" -DWERROR:BOOL="0" -DBUILD_SAMPLES:BOOL="0" -DBUILD_TESTS:BOOL="0" | ||
make -j 2 && sudo make install | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DWEBSOCKETPP_INCLUDE_DIR:PATH=\"${{ env.RUNNER_WORKSPACE }}/cpprestsdk/Release/libs/websocketpp\"" >> $GITHUB_ENV | ||
- name: disable conan | ||
if: matrix.use_conan == false | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_USE_CONAN:BOOL=\"0\"" >> $GITHUB_ENV | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }}" \ | ||
"-DWEBSOCKETPP_INCLUDE_DIR:PATH=\"${{ env.RUNNER_WORKSPACE }}/cpprestsdk/Release/libs/websocketpp\"" \ | ||
"-DNMOS_CPP_USE_SUPPLIED_JSON_SCHEMA_VALIDATOR:BOOL=\"1\"" \ | ||
"-DNMOS_CPP_USE_SUPPLIED_JWT_CPP:BOOL=\"1\"" \ | ||
>> $GITHUB_ENV | ||
- name: ubuntu avahi setup | ||
if: runner.os == 'Linux' && matrix.install_mdns == false | ||
|
@@ -172,7 +174,17 @@ | |
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_USE_AVAHI:BOOL=\"1\"" >> $GITHUB_ENV | ||
- name: force cpprest asio | ||
if: matrix.force_cpprest_asio == true | ||
if: matrix.force_cpprest_asio == true && matrix.use_conan == true | ||
shell: bash | ||
run: | | ||
echo "CONAN_INSTALL_EXTRA_ARGS=--options\;cpprestsdk/*:http_client_impl=asio\;--options\;cpprestsdk/*:http_listener_impl=asio" >> $GITHUB_ENV | ||
- name: enable conan | ||
if: matrix.use_conan == true | ||
shell: bash | ||
run: | | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }} -DNMOS_CPP_CONAN_OPTIONS:STRING=\"cpprestsdk:http_client_impl=asio;cpprestsdk:http_listener_impl=asio\"" >> $GITHUB_ENV | ||
echo "CMAKE_EXTRA_ARGS=${{ env.CMAKE_EXTRA_ARGS }}" \ | ||
"-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES:STRING=\"third_party/cmake/conan_provider.cmake\"" \ | ||
"-DCONAN_INSTALL_ARGS:STRING=\"--build=missing\;${{ env.CONAN_INSTALL_EXTRA_ARGS }}\;--lockfile-out=conan.lock\"" \ | ||
>> $GITHUB_ENV | ||
cat $GITHUB_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.