Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4302b2a
Bump boost from 1.73.0 to 1.78.0 for MSVC 2022 support
jmarrec Jan 6, 2022
6432e60
has_self_intersections overload we're was finally removed in 1.76. im…
jmarrec Oct 27, 2021
9d13622
Fix a couple of includes
jmarrec Jan 6, 2022
4babc20
cmake format ConanInstall.cmake
jmarrec Jan 25, 2022
7ac3c75
Write a dependabot-like utility to lookup conan package updates
jmarrec Mar 25, 2022
f4331ee
Try a github actions to run the dependabot
jmarrec Mar 25, 2022
6181a44
Add the nrel remote
jmarrec Mar 25, 2022
da93dcf
Pass the remote, and use the default remote name
jmarrec Mar 25, 2022
7f88729
Enable revisions
jmarrec Mar 25, 2022
d3c14fb
replace distutil.version with packaging.version as it will be removed…
jmarrec Mar 25, 2022
10b05fc
Name the branch and commiter for pr
jmarrec Mar 25, 2022
5236b03
Need to add packaging in requirements.txt
jmarrec Mar 25, 2022
3cb31c8
use PIN_OPENSSL_VERSION
jmarrec Mar 25, 2022
69d598e
Improve dependabot_conan by supporting conanfile etc and use a OOP (I…
jmarrec Mar 25, 2022
c57231e
Automated checkin - update conan recipes
Mar 25, 2022
5f65193
Bump conan openstudio ruby to https://github.com/NREL/conan-openstudi…
jmarrec Apr 1, 2022
e339548
Automated checkin - update conan recipes
Apr 1, 2022
b2b13d2
Update conan.cmake to 0.18.0
jmarrec Apr 4, 2022
cd3f45e
Fix precommit and update deps again
jmarrec Apr 4, 2022
4c25161
conan.cmake sha is wrong on conan-cmake github
jmarrec Apr 4, 2022
6420ca3
Fix an include for MSVC
jmarrec Apr 4, 2022
a529149
Compiler Driven Development: Fix problems in gtests when EXPECT_EQ is…
jmarrec Apr 4, 2022
0214fb6
Fix a build error in MSVC 2022 in Zip benchmark (conversion warning t…
jmarrec Apr 4, 2022
a1c6d63
WIP: more test fixes
jmarrec Apr 4, 2022
cd1201a
Fix the remaining, it builds
jmarrec Apr 4, 2022
1308a7d
Automated checkin - update conan recipes
Apr 4, 2022
bde5db8
Test error
jmarrec Apr 4, 2022
8f219a4
fix a -Wunused-but-set-variable on apple clang 13.1 + dry up code
jmarrec Apr 4, 2022
2efc0db
More fix a -Wunused-but-set-variable on apple clang 13.1.6
jmarrec Apr 4, 2022
c0248cf
Boost filesystem in 1.78 is now V4, and it follows the C++17 STL std:…
jmarrec Apr 4, 2022
1c32aec
Merge branch 'develop' into bump_deps
jmarrec May 23, 2022
972afc8
Bump all deps again
jmarrec May 23, 2022
2b89d6d
bump again openstudio ruby
jmarrec May 23, 2022
e7ad50e
Fix new failures when using EXPECT_EQ with a boost:optional
jmarrec May 23, 2022
81f50cd
bump again
jmarrec May 23, 2022
7096a7f
Bump minimum conan version to 1.48 (I know that at least 1.45 is needed)
jmarrec May 23, 2022
85b77b3
Merge remote-tracking branch 'origin/develop' into bump_deps
jmarrec Jun 13, 2022
541d8dc
Use nrel/testing now that https://github.com/NREL/conan-openstudio-ru…
jmarrec Jun 13, 2022
c52eb84
Automated checkin - update conan recipes
Jun 13, 2022
e25147a
Commit a notebook I used to vendor the conan dependencies to the NREL…
jmarrec Jun 13, 2022
c73a089
Update notebook to also skip gcc 5, and shared=True packages [skip ci]
jmarrec Jun 14, 2022
23390ea
Modernize usage of conan.cmake (conan_cmake_run is deprecated and wil…
jmarrec Jun 14, 2022
ebff05e
Dry up the code by sharing path being multi/non mult generators. Dele…
jmarrec Jun 14, 2022
cdb0f3b
Update notebook
jmarrec Jun 14, 2022
55d855c
Fix a refactor error in a test
jmarrec Jun 15, 2022
7931f2a
Add script in notebook to deal with windows specific stuff (MSVC 17, …
jmarrec Jun 16, 2022
3a01863
Move the notebook into the `conan` subfolder, makes more sense
jmarrec Jun 16, 2022
40216bc
Try to work around the build error due to boost_log_abi
jmarrec Jun 17, 2022
1d2bf4d
Try with win7
jmarrec Jun 17, 2022
5fb7c4b
Try to define use BOOST_WINAPI_DEFINE_VERSION_MACROS (and WIN32_LEAN_…
jmarrec Jun 20, 2022
7dab55c
Merge remote-tracking branch 'origin/develop' into bump_deps
jmarrec Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/dependabot_conan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Conan Dependabot"
on:
# schedule:
# # Every week on Thursdays
# - cron: '23 10 * * 4'
push:
branches: [ bump_deps, dependabot_conan ]

jobs:
Comment on lines +1 to +9
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a dependabot for conan...

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
shell: bash
working-directory: ./developer/conan
run: |
pip install -r requirements.txt

- name: Find outdated conan packages
shell: bash
working-directory: ./developer/conan
run: |
conan remote add nrel https://conan.openstudio.net/artifactory/api/conan/openstudio
conan config set general.revisions_enabled=True
# This returns 1 if update was needed
python dependabot_conan.py

- name: Commit results
if: failure()
shell: bash
run: |
set -x
git config user.name 'Conan Dependabot'
git config user.email 'conan-dependabot@users.noreply.github.com'
git commit -am "Automated checkin - update conan recipes"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
if: failure()
with:
branch: dependabot/conan
committer: 'Conan Dependabot <conan-dependabot@users.noreply.github.com>'
delete-branch: true
title: "[bot] New upstream conan recipes"
body: |
Automatic run of `[dependabot_conan.py](developer/conan/dependabot_conan.py)`
which is done periodically to be made aware of upstream recipe updates
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ developer/msvc/Visualizers/all_concat.natvis
.clangd/
cppcheck.txt*
clang_format.patch

__pycache__/
*.pyc
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ endif()

if(WIN32)
add_definitions(-DNOMINMAX)
# Set the BOOST_USE_WINAPI_VERSION to Windows10
add_compile_definitions(BOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7)
# This will also align _WIN32_WINNT and WINVER
# add_compile_definitions(BOOST_USE_WINDOWS_H) # Getting a confict with `typedef GUID UUID` from windows.h
add_compile_definitions(BOOST_WINAPI_DEFINE_VERSION_MACROS)
add_compile_definitions(WIN32_LEAN_AND_MEAN) # That excludes stuff that's not used too often, including the GUID stuff
endif()

if(MSVC AND NOT NINJA)
Expand Down
123 changes: 90 additions & 33 deletions ConanInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# TODO: DO NOT DO `set(CONAN_OPTIONS "")` since some higher level stuff is added via OpenStudioApplication
# CONAN_QT is added by OpenStudioApplication


if(NOT CONAN_OPENSTUDIO_ALREADY_RUN)

set(CMAKE_CONAN_EXPECTED_HASH
Expand Down Expand Up @@ -37,11 +36,13 @@ if(NOT CONAN_OPENSTUDIO_ALREADY_RUN)

# Add NREL remote and place it first in line, since we vendored dependencies to NREL's repo, they will be picked first
# TJC 2021-04-27 bintray.com is decommissioned as of 2021-05-01. See commercialbuildings as replacement below.
conan_add_remote(NAME nrel INDEX 0
URL https://conan.openstudio.net/artifactory/api/conan/openstudio)
conan_add_remote(
NAME nrel INDEX 0 URL
https://conan.openstudio.net/artifactory/api/conan/openstudio)

conan_add_remote(NAME bincrafters
URL https://bincrafters.jfrog.io/artifactory/api/conan/public-conan)
conan_add_remote(
NAME bincrafters URL
https://bincrafters.jfrog.io/artifactory/api/conan/public-conan)

#conan_add_remote(NAME jmarrec
# URL https://api.bintray.com/conan/jmarrec/testing)
Expand All @@ -53,10 +54,15 @@ if(NOT CONAN_OPENSTUDIO_ALREADY_RUN)
ERROR_VARIABLE CONAN_REV_STATUS
OUTPUT_STRIP_TRAILING_WHITESPACE)

message(STATUS "Conan: config get general.revisions_enabled=${CONAN_REV_STATUS}")
if (NOT "${CONAN_REV_STATUS}" STREQUAL "True")
message(AUTHOR_WARNING "Conan: Force enabling revisions (conan config set general.revisions_enabled=True)")
execute_process(COMMAND ${CONAN_CMD} config set general.revisions_enabled=True)
message(
STATUS "Conan: config get general.revisions_enabled=${CONAN_REV_STATUS}")
if(NOT "${CONAN_REV_STATUS}" STREQUAL "True")
message(
AUTHOR_WARNING
"Conan: Force enabling revisions (conan config set general.revisions_enabled=True)"
)
execute_process(COMMAND ${CONAN_CMD} config set
general.revisions_enabled=True)
endif()

# TODO: list(APPEND CONAN_OPTIONS "fmt:header_only=True")
Expand All @@ -67,53 +73,104 @@ if(NOT CONAN_OPENSTUDIO_ALREADY_RUN)
# list(APPEND CONAN_BUILD "outdated")
list(APPEND CONAN_BUILD "missing")

if (BUILD_TESTING)
set(CONAN_GTEST "gtest/1.10.0#2210002307b82e555f7bec6c9ec6c839")
if(BUILD_TESTING)
set(CONAN_GTEST "gtest/1.11.0#8aca975046f1b60c660ee9d066764d69")
else()
set(CONAN_GTEST "")
endif()

if(BUILD_RUBY_BINDINGS OR BUILD_CLI)
# Track NREL/stable in general, on a feature branch this could be temporarily switched to NREL/testing
set(CONAN_RUBY "openstudio_ruby/2.7.2@nrel/testing#dcea3703b5dfaecfa5f0056d952ea5bd")
set(CONAN_RUBY "openstudio_ruby/2.7.2@nrel/testing#98444b7bc8d391ea1521d7f79d4d4926")
endif()

if(BUILD_BENCHMARK)
set (CONAN_BENCHMARK "benchmark/1.5.2")
set(CONAN_BENCHMARK "benchmark/1.6.1#94c40ebf065e3b20cab6a4f1b03a65fe")
endif()

# msys2/cci.latest is not supported on win32. We don't expect to run it on something else than an x86_64 anyways
if(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bit
set(CONAN_FORCE_SETTINGS_BUILD SETTINGS_BUILD arch=x86_64)
message(AUTHOR_WARNING "Forcing --settings:build arch=x86_64")
if(NOT WIN32)
message(AUTHOR_WARNING "You are trying to build on x86 on a non-windows, this is completely untested and unsupported")
endif()
endif()

set(CONAN_UPDATE "UPDATE")

if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CONAN_CMAKE_MULTI ON)
if (NOT CONAN_CONFIGURATION_TYPES)
# Cache it, and let user change it (if they want to pull RelWithDebInfo for eg)
set(CONAN_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "List of configurations for which you want to fetch conan packages")
mark_as_advanced(CONAN_CONFIGURATION_TYPES)
endif()
message(STATUS "Conan: Using cmake_multi generator")
set(CONAN_GENERATOR "cmake_multi")
else()
message(STATUS "Conan: Using cmake generator")
set(CONAN_CMAKE_MULTI OFF)
set(CONAN_GENERATOR "cmake")
set(CONAN_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
endif()

# This will create the conanbuildinfo.cmake in the current binary dir, not the cmake_binary_dir
conan_cmake_run(REQUIRES

message(STATUS "Conan: conan_cmake_configure")
# This will create the conanfile.txt
conan_cmake_configure(
REQUIRES
${CONAN_READLINE}
${CONAN_QT}
${CONAN_RUBY}
"openssl/1.1.0l#7f3fa5cfcfba31fffa344c71a9795176" # ruby 2.5.5 won't work with 1.1.1x, so use 1.1.0l here to try to force every package to align on the same as ruby
"boost/1.73.0#4129a76c9b83c300fc103e36d1908792"
"pugixml/1.10#64b3ebc897bb9d9854c8a2443bf112a8"
"jsoncpp/1.9.3#073a6d3cb40911d7c8027bddb6ae7dbf"
"minizip/1.2.12#0b5296887a2558500d0323c6c94c8d02" # This depends on zlib/1.2.12, and basically patches it
"openssl/1.1.1o#213dbdeb846a4b40b4dec36cf2e673d7" # force every package to align on the same as our conan-openstudio-ruby
"boost/1.79.0#f664bfe40e2245fa9baf1c742591d582"
"pugixml/1.12.1#5a39f82651eba3e7d6197903a3202e21"
"jsoncpp/1.9.5#536d080aa154e5853332339bf576747c"
"minizip/1.2.12#0b5296887a2558500d0323c6c94c8d02" # This depends on zlib, and basically patches it
"zlib/1.2.12#3b9e037ae1c615d045a06c67d88491ae" # Also needed, so we can find zlib.h and co (+ pinning exactly is good)
"fmt/7.0.1#0580b1492b1dddb43b1768e68f25c43c"
"sqlite3/3.32.3#914492672c458f8be511e3800c14c717"
"cpprestsdk/2.10.16#d097ff9a8719d9d0ed34293c2ebd90ed"
"websocketpp/0.8.2#6d77b9b8a2368fa5fd5377af0c0ca211"
"geographiclib/1.50.1#b1a7966385dead17ec170b25a99cf71b"
"swig/4.0.2#bfafb16cd2bea6af3b8003163abcbd09"
"fmt/8.1.1#b3e969f8561a85087bd0365c09bbf4fb"
"sqlite3/3.38.5#010911927ce1889b5cf824f45e7cd3d2"
"cpprestsdk/2.10.18#df2f6ac88e47cadd9c9e8e0971e00d89"
"websocketpp/0.8.2#3fd704c4c5388d9c08b11af86f79f616"
"geographiclib/1.52#76536a9315a003ef3511919310b2fe37"
"swig/4.0.2#9fcccb1e39eed9acd53a4363d8129be5"
"tinygltf/2.5.0#c8b2aca9505e86312bb42aa0e1c639ec"
${CONAN_GTEST}
${CONAN_BENCHMARK}
# Override to avoid dependency mismatches
#"bzip2/1.0.8#d4a5c7144832d75fc3f349c5346160b0"
#"libyaml/0.2.5#9e234874df88c3ba7249f6d1368fceaf"
BASIC_SETUP CMAKE_TARGETS NO_OUTPUT_DIRS
OPTIONS ${CONAN_OPTIONS}
BUILD ${CONAN_BUILD}
# Passes `-u, --update` to conan install: Check updates exist from upstream remotes
# That and build=outdated should ensure we track the right
# Now that we pin dependencies, there is no point looking upstream really, so we'll save valuable configuration time by not doing it
UPDATE
GENERATORS ${CONAN_GENERATOR}
)

foreach(build_type ${CONAN_CONFIGURATION_TYPES})
conan_cmake_autodetect(settings BUILD_TYPE ${build_type})
message(STATUS "Conan: Autodetected settings for build type ${build_type}: ${settings}")

# Avoid polluting with cppstd which prevents downloading some existing binary packages (like boost)
# Former deprecated conan_cmake_run was NOT adding compiler.cppstd
foreach(ARG ${settings})
if(${ARG} MATCHES "compiler.cppstd=(.*)")
message("Removing ${ARG}")
list(REMOVE_ITEM settings ${ARG})
endif()
endforeach()

conan_cmake_install(PATH_OR_REFERENCE .
BUILD ${CONAN_BUILD}
OPTIONS ${CONAN_OPTIONS}
SETTINGS ${settings}
${CONAN_FORCE_SETTINGS_BUILD}
${CONAN_UPDATE}
)
endforeach()

# Loads the conanbuildinfo.cmake / conanbuildinfo_multi.cmake
conan_load_buildinfo()
# conan_basic_setup in the conanbuildinfo.cmake. TARGETS => set cmake targets, NO_OUTPUT_DIRS => Don't modify the BIN / LIB folders etc
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)

set(CONAN_OPENSTUDIO_ALREADY_RUN TRUE)

#message("CONAN_TARGETS = ${CONAN_TARGETS}")
Expand Down
4 changes: 2 additions & 2 deletions ci/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ old_stash=$(git rev-parse -q --verify refs/stash)
git stash push --quiet --keep-index --include-untracked --message "os_pre_commit"
new_stash=$(git rev-parse -q --verify refs/stash)

# Run clang format
./ci/clang-format.sh HEAD develop
# Run clang format on changed files, comparing to origin/develop
./ci/clang-format.sh HEAD origin/develop
RESULT=$?
[ -f clang_format.patch ] && rm -f clang_format.patch

Expand Down
Loading