Skip to content

🔧 Use conan_provider for running conan #1518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 0 additions & 27 deletions .github/actions/conan-install/action.yml

This file was deleted.

17 changes: 8 additions & 9 deletions .github/workflows/linux_server_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ jobs:
- name: Prepare Conan Build Environment
uses: ./.github/actions/setup-conan

- name: Install Conan dependencies
uses: ./.github/actions/conan-install
with:
qt_source: ${{matrix.qt_source}}
build_type: ${{env.BUILD_TYPE}}
cppstd: ${{env.CONAN_CPPSTD}}
- name: Configure CMake
shell: bash
run: |
cmake . -DCMAKE_BUILD_TYPE=Release -Bbuild \
-DCONAN_INSTALL_ARGS="-o='&:qt_source=${{matrix.qt_source}}';--build=missing" \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="cmake/conan_provider.cmake" $CMAKE_EXTRA

- name: Upload dependency source backups
shell: bash
Expand All @@ -288,10 +288,9 @@ jobs:
CONAN_BUILD_DEPENDENCIES_BACKUP_UPLOAD_TOKEN: ${{ secrets.CONAN_BUILD_DEPENDENCIES_BACKUP_UPLOAD_TOKEN }}
run: conan cache backup-upload || echo "Credentials cannot be accessed on remote Pull Request builds. Continuing…"

- name: Configure CMake
- name: Cleanup Conan dependencies
run: conan cache clean "*" -sbd
shell: bash
# This syntax requires CMake 3.23
run: cmake --preset conan-${BUILD_TYPE,,} $CMAKE_EXTRA

- name: Build Domain Server
working-directory: build
Expand Down
26 changes: 7 additions & 19 deletions .github/workflows/master_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ jobs:
- name: Prepare Conan Build Environment
uses: ./.github/actions/setup-conan

- name: Install Conan dependencies
uses: ./.github/actions/conan-install
with:
qt_source: ${{matrix.qt_source}}
build_type: ${{env.BUILD_TYPE}}
cppstd: ${{env.CONAN_CPPSTD}}
conan_profile: ${{env.CONAN_PROFILE}}
- name: Configure CMake
shell: bash
run: |
cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -Bbuild \
-DCONAN_INSTALL_ARGS="-o='&:qt_source=${{matrix.qt_source}}';--build=missing" \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="cmake/conan_provider.cmake" \
-DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA

- name: Upload dependency source backups
shell: bash
Expand All @@ -213,18 +213,6 @@ jobs:
run: conan cache clean "*" -sbd
shell: bash

- name: Configure CMake
if: startsWith(matrix.os, 'Windows') == false
shell: bash
# This syntax requires CMake 3.23
run: cmake --preset conan-${BUILD_TYPE,,} -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA

- name: Configure CMake (Windows)
if: startsWith(matrix.os, 'Windows')
shell: bash
# This syntax requires CMake 3.23
run: cmake --preset conan-default -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA

- name: Build application
shell: bash
run: cmake --build . --target $APP_TARGET_NAME $CMAKE_BUILD_EXTRA
Expand Down
33 changes: 7 additions & 26 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,13 @@ jobs:
- name: Prepare Conan Build Environment
uses: ./.github/actions/setup-conan

- name: Install Conan dependencies
uses: ./.github/actions/conan-install
with:
qt_source: ${{matrix.qt_source}}
build_type: ${{env.BUILD_TYPE}}
cppstd: ${{env.CONAN_CPPSTD}}
conan_profile: ${{env.CONAN_PROFILE}}

- name: Configure CMake
shell: bash
run: |
cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -Bbuild \
-DCONAN_INSTALL_ARGS="-o='&:qt_source=${{matrix.qt_source}}';--build=missing" \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="cmake/conan_provider.cmake" $CMAKE_EXTRA

- name: Upload dependency source backups
shell: bash
env:
Expand All @@ -248,24 +247,6 @@ jobs:
run: conan cache clean "*" -sbd
shell: bash

- name: Save Conan cache
if: always() && steps.conan-cache.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: conan-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles('conanfile.py') }}
path: ~/.conan2/

- name: Configure CMake
shell: bash
run: |
if [[ "${{ matrix.os }}" =~ "Windows" ]]; then
# This syntax requires CMake 3.23
cmake --preset conan-default $CMAKE_EXTRA # Why does Conan not provide the preset we tell it to on Windows?
else
# This syntax requires CMake 3.23
cmake --preset conan-${BUILD_TYPE,,} $CMAKE_EXTRA
fi

- name: Build Application
if: matrix.build_type == 'full' || matrix.build_type == 'client'
shell: bash
Expand Down
33 changes: 10 additions & 23 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,31 +109,18 @@ jobs:
- name: Prepare Conan Build Environment
uses: ./.github/actions/setup-conan

- name: Install Conan dependencies
uses: ./.github/actions/conan-install
with:
qt_source: ${{matrix.qt_source}}
build_type: ${{env.BUILD_TYPE}}
cppstd: ${{env.CONAN_CPPSTD}}
conan_profile: ${{env.CONAN_PROFILE}}

- name: Upload Conan dependencies
# Conan isn't glibc aware, so we need to be really careful what we upload to the binary cache on Linux.
# See the upstream discussion: https://github.com/conan-io/conan/issues/7121
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS')
continue-on-error: true
shell: bash
env:
CONAN_LOGIN_USERNAME_OVERTE: ${{ secrets.conan_login_username_overte }}
CONAN_PASSWORD_OVERTE: ${{ secrets.conan_password_overte }}
run: |
conan list --graph=build.json --graph-binaries=build --format=json > pkglist.json
conan upload --list=pkglist.json -r=overte -c

- name: Configure CMake
shell: bash
# This syntax requires CMake 3.23
run: cmake --preset conan-${BUILD_TYPE,,} -DJSDOC_ENABLED:BOOL=TRUE -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA
run: |
cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -Bbuild \
-DCONAN_INSTALL_ARGS="-o='&:qt_source=${{matrix.qt_source}}';--build=missing" \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="cmake/conan_provider.cmake" \
-DJSDOC_ENABLED:BOOL=TRUE -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY \
-DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA

- name: Cleanup Conan dependencies
run: conan cache clean "*" -sbd
shell: bash

- name: Build application
shell: bash
Expand Down
15 changes: 2 additions & 13 deletions BUILD_LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,7 @@ Setting `OVERTE_CPU_ARCHITECTURE` to an empty string will use the default compil

The next step is setting up conan

First, create a conan profile
```bash
conan profile detect --force
```

Next, add the overte remote to conan
First, add the overte remote to conan
```bash
conan remote add overte https://artifactory.overte.org/artifactory/api/conan/overte -f
```
Expand All @@ -169,15 +164,9 @@ echo "tools.system.package_manager:sudo = True" >> ~/.conan2/global.conf

### Compiling

Install the dependencies with conan
```bash
cd overte
conan install . -s build_type=Release -b missing -pr:b=default -of build
```

Prepare makefiles:
```bash
cmake --preset conan-release
cmake . -DCMAKE_BUILD_TYPE=Release -Bbuild -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="cmake/conan_provider.cmake"
```

#### Server
Expand Down
4 changes: 1 addition & 3 deletions BUILD_WIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ Run the Command Prompt from Start and run the following commands:

```bash
cd "%OVERTE_DIR%"
conan install . -b missing -pr=tools/conan-profiles/vs-19-release -of build
conan install . -b missing -pr=tools/conan-profiles/vs-19-debug -of build
cmake --preset conan-default
cmake . -G"Visual Studio 16 2019" -Bbuild -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="cmake/conan_provider.cmake"
```

Where `%OVERTE_DIR%` is the directory for the Overte repository.
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarc
set(GLES_OPTION ON)
endif()

if (WIN32)
# Building with webrtc-audio-processing on Windows fails on cppstd 14.
set(CMAKE_CXX_STANDARD 17)
else ()
set(CMAKE_CXX_STANDARD 14)
endif ()
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# set our OS X deployment target
# (needs to be set before first project() call and before prebuild.py)
if (APPLE)
Expand Down
7 changes: 0 additions & 7 deletions cmake/compiler.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
if (WIN32)
# Building with webrtc-audio-processing on Windows fails on cppstd 14.
set(CMAKE_CXX_STANDARD 17)
else ()
set(CMAKE_CXX_STANDARD 14)
endif ()
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if (NOT "${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
message( FATAL_ERROR "Only 64 bit builds supported." )
Expand Down
Loading
Loading