Skip to content

Commit

Permalink
RCPP-41 Add Conan GHA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
leemaguire committed Mar 7, 2024
1 parent 9753740 commit 0f18cea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
conan profile detect
- name: Update Conan profile
if: matrix.os.name == 'windows-latest'
if: matrix.os == 'windows-latest'
run: |
$profilePath = "$env:USERPROFILE\.conan\profiles\default"
$content = Get-Content -Path $profilePath
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Conan create
working-directory: .
run: |
conan create . -tf="tests"
conan create . -tf="tests" -s build_type=${{ matrix.build_type }} -o use_libuv=True
- name: Open a tmate debug session
if: ${{ failure() }}
Expand Down
6 changes: 4 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class cpprealmRecipe(ConanFile):

# Binary configuration
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
options = {"shared": [True, False], "use_libuv": [True, False]}
default_options = {"shared": False, "use_libuv": True}

def is_darwin(self):
return self.settings.os == "Macos" or self.settings.os == "iOS" or self.settings.os == "watchOS"
Expand All @@ -32,6 +32,8 @@ def requirements(self):
if self.settings.os == "Linux":
self.requires("libcurl/8.4.0")

if not self.is_darwin() and self.settings.use_libuv:
self.requires("libuv/1.43.0")
def source(self):
git = Git(self)
git.clone(url="https://github.com/realm/realm-cpp", target=".")
Expand Down

0 comments on commit 0f18cea

Please sign in to comment.