Skip to content

Commit

Permalink
Add v14.3.4 and update workflows
Browse files Browse the repository at this point in the history
    - Adds new version 14.3.4
    - Updates workflows to use debian/ubuntu images
  • Loading branch information
joakimono committed Feb 13, 2025
1 parent ef34e65 commit 3fc4dd6
Show file tree
Hide file tree
Showing 8 changed files with 587 additions and 51 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/ci-conan-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,52 @@ env:
CONAN_PASSWORD_SINTEF: ${{ secrets.CONAN_PASSWORD }}
CONAN_LOGIN_USERNAME_SINTEF: ${{ secrets.CONAN_USER }}
CONFIG_URL: https://github.com/sintef-ocean/conan-configs.git
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16

DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
jobs:
conan-with-clang:
name: Conan
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
cppstd: "17"
strategy:
fail-fast: false
matrix:
version: [14.1.1]
version: [14.1.1, 14.3.4]
build_type: [Debug, Release]
profile: [clang]
compiler_version: [11, 12, 13, 14]
compiler_version: [14]
channel: ["${{ (github.head_ref || github.ref_name) == 'master' && 'stable' || 'testing' }}"]
include:
- linux: debian:latest
-
linux: debian:bookworm
compiler_version: 14
container:
image: conanio/clang${{ matrix.compiler_version }}-ubuntu18.04
image: ${{ matrix.linux }}
options: -u 0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y jq
pip3 install --upgrade setuptools pip
pip3 install --upgrade conan~=2.0
- name: Configure Conan
run: conan remote add sintef ${{ env.CONAN_UPLOAD }}
- name: Get package name
run: echo "package_name=$(conan inspect -f json . | jq .name -r)" >> $GITHUB_ENV
- name: Conan create
apt-get update
apt-get install -y jq pipx build-essential cmake git clang pkg-config
pipx install conan
echo "/github/home/.local/bin" >> $GITHUB_PATH
- name: Conan configs
run: |
conan remote add sintef ${{ env.CONAN_UPLOAD }}
echo "package_name=$(conan inspect -f json . | jq .name -r)" >> $GITHUB_ENV
git config --global --add safe.directory '*'
conan config install ${{ env.CONFIG_URL }} --type git -sf conan2.0
conan config install ${{ env.CONFIG_URL }} --type git -sf profiles -tf profiles
- name: Conan create
run: |
conan create -s build_type=${{ matrix.build_type }} \
-s compiler.version=${{ matrix.compiler_version }} \
-s compiler.cppstd=${{ env.cppstd }} \
-pr:b=${{ matrix.profile }} -pr:h=${{ matrix.profile }} \
-b missing -b outdated -b ${{ env.package_name }}* \
-b missing -b outdated -b '${{ env.package_name }}*' \
--version ${{ matrix.version }} --user sintef --channel ${{ matrix.channel }} \
.
- name: Conan upload
run: conan upload --confirm -r sintef ${{ env.package_name }}* --force
run: conan upload --confirm -r sintef '${{ env.package_name }}*' --force
53 changes: 31 additions & 22 deletions .github/workflows/ci-conan-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,64 @@ env:
CONAN_PASSWORD_SINTEF: ${{ secrets.CONAN_PASSWORD }}
CONAN_LOGIN_USERNAME_SINTEF: ${{ secrets.CONAN_USER }}
CONFIG_URL: https://github.com/sintef-ocean/conan-configs.git
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16

DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
jobs:
conan-with-gcc:
name: Conan
runs-on: ubuntu-22.04
env:
cppstd: "17"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
version: [14.1.1]
version: [14.1.1, 14.3.4]
configs: ["default", "fhsim"]
build_type: [Debug, Release]
profile: [gcc]
compiler_version: [8, 9, 10, 11, 12]
compiler_version: [11, 12, 13, 14]
channel: ["${{ (github.head_ref || github.ref_name) == 'master' && 'stable' || 'testing' }}"]
include:
- linux: debian:latest
-
linux: debian:trixie
compiler_version: 14
-
linux: ubuntu:24.04
compiler_version: 13
-
linux: debian:bookworm
compiler_version: 12
-
linux: ubuntu:22.04
compiler_version: 11
container:
image: conanio/gcc${{ matrix.compiler_version }}-ubuntu18.04
image: ${{ matrix.linux }}
options: -u 0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y jq
pip3 install --upgrade setuptools pip
pip3 install --upgrade conan~=2.0
apt-get update
apt-get install -y jq build-essential pipx cmake git pkg-config
pipx install conan
echo "/github/home/.local/bin" >> $GITHUB_PATH
- name: Configure Conan
run: conan remote add sintef ${{ env.CONAN_UPLOAD }}
- name: Get package name
run: echo "pkg_name=$(conan inspect -f json . | jq .name -r)" >> $GITHUB_ENV
- name: Conan create
run: |
conan remote add sintef ${{ env.CONAN_UPLOAD }}
echo "pkg_name=$(conan inspect -f json . | jq .name -r)" >> $GITHUB_ENV
git config --global --add safe.directory '*'
conan config install ${{ env.CONFIG_URL }} --type git -sf conan2.0
conan config install ${{ env.CONFIG_URL }} --type git -sf profiles -tf profiles
- name: Conan create
run: |
conan create -s build_type=${{ matrix.build_type }} \
-s compiler.version=${{ matrix.compiler_version }} \
-s compiler.cppstd=${{ env.cppstd }} \
-pr:b=${{ matrix.profile }} -pr:h=${{ matrix.profile }} \
-o ${{ env.pkg_name }}/*:with_sdl=${{ matrix.configs == 'fhsim' && 'False' || 'True' }} \
-o ${{ env.pkg_name }}/*:plugin_glslang=${{ matrix.configs == 'fhsim' && 'False' || 'True' }} \
-o ${{ env.pkg_name }}/*:component_bullet=${{ matrix.configs == 'fhsim' && 'False' || 'True' }} \
-o ${{ env.pkg_name }}/*:with_freetype=${{ matrix.configs == 'fhsim' && 'True' || 'False' }} \
-b missing -b outdated -b ${{ env.pkg_name }}* \
-b missing -b outdated -b '${{ env.pkg_name }}*' \
--version ${{ matrix.version }} --user sintef --channel ${{ matrix.channel }} \
.
- name: Conan upload
run: conan upload --confirm -r sintef ${{ env.pkg_name }}* --force
run: conan upload --confirm -r sintef '${{ env.pkg_name }}*' --force
4 changes: 2 additions & 2 deletions .github/workflows/ci-conan-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ env:
jobs:
conan-with-msvc:
name: Conan
runs-on: windows-2022
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
version: [14.1.1]
version: [14.1.1, 14.3.4]
configs: ["default", "fhsim"]
build_type: [Debug, Release]
profile: [msvc17]
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@

[Conan.io](https://conan.io) recipe for [Ogre3D](https://www.ogre3d.org).

*Note* We are refactoring to support conan v2. The consequence of this is that the recipe
no longer supports old generators such as `cmake_paths` and `cmake_find_package`. Use
`CMakeToolchain` and `CMakeDeps` instead.


## How to use this package

1. Add remote to conan's package [remotes](https://docs.conan.io/2/reference/commands/remote.html)

```bash
$ conan remote add sintef https://artifactory.smd.sintef.no/artifactory/api/conan/conan-local
$ conan remote add sintef https://package.smd.sintef.no
```

2. Using [*conanfile.txt*](https://docs.conan.io/2/reference/conanfile_txt.html) and *cmake* in your project.
Expand Down
32 changes: 32 additions & 0 deletions conandata.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
---
sources:
14.3.4:
sha256: 0c74e6ca7bb920ff59c5da8a359e6d96215c7804261301feec4f2e54f206b27d
url:
- https://github.com/OGRECave/ogre/archive/refs/tags/v14.3.4.tar.gz
14.1.1:
sha256: 394353501a3b12dda71efb39ba55f1e5b941c41c308c805536f6e2b279069c56
url:
Expand All @@ -10,6 +14,30 @@ sources:
- https://github.com/OGRECave/ogre/archive/refs/tags/v13.6.5.tar.gz

dependencies:
14.3.4:
assimp: 5.4.3
bullet3: 3.25
egl: system
freeimage: 3.18.0
freetype: 2.13.3
glslang: 11.7.0
gtest: 1.11.0
cmake: "[>=3.16 <4]"
imgui: 1.91.5
openexr: 2.5.9
opengl: system
openssl: "[>=1.1 <4]"
pugixml: 1.14
qt5: "[>=5.15 <6]"
qt6: "[>=6.1]"
sdl: "[>=2.28.0 <2.31]"
swig: "[>=4 <5]"
vulkan-loader: 1.3.290.0
xkbcommon: 1.6.0
xorg: system
zlib: "[>=1.2.11 <2]"
libjpeg: 9e
libpng: 1.6.46
14.1.1:
assimp: 5.4.3
bullet3: 3.25
Expand Down Expand Up @@ -59,6 +87,10 @@ dependencies:
libpng: 1.6.46

patches:
14.3.4:
- patch_file: patches/14.3.4-0001-Set-rpath-with-origin-variants.patch
- patch_file: patches/14.3.4-0002-Remove-absolute-paths-from-ogre-config.patch
- patch_file: patches/14.3.4-0003-Do-conanization-fixes.patch
14.1.1:
- patch_file: patches/14.1.1-0001-Set-rpath-with-origin-variants.patch
- patch_file: patches/14.1.1-0002-Remove-absolute-paths-from-ogre-config.patch
Expand Down
27 changes: 27 additions & 0 deletions patches/14.3.4-0001-Set-rpath-with-origin-variants.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From e9c18904b7a252191ba2c48ae63b7e5eb4b7cd60 Mon Sep 17 00:00:00 2001
From: Joakim Haugen <[email protected]>
Date: Thu, 13 Feb 2025 17:25:31 +0100
Subject: [PATCH 1/4] Set rpath with origin variants

---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14c3ee7e3..858dd7caa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -420,8 +420,8 @@ mark_as_advanced(
###################################################################
include(ConfigureBuild)

-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}")
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};$ORIGIN;$ORIGIN/..;$ORIGIN/../lib;$ORIGIN/../lib/OGRE;$ORIGIN/../..")
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)

###################################################################
# disable way too common compiler warnings on project level
--
2.39.5

76 changes: 76 additions & 0 deletions patches/14.3.4-0002-Remove-absolute-paths-from-ogre-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
From c871aad7779816320bbafc6aa1747f24771db073 Mon Sep 17 00:00:00 2001
From: Joakim Haugen <[email protected]>
Date: Thu, 13 Feb 2025 17:30:27 +0100
Subject: [PATCH 2/4] Remove absolute paths from ogre config

---
CMake/InstallResources.cmake | 8 ++++----
CMake/Templates/OgreConfigPaths.h.in | 6 +++---
Components/Bites/src/OgreGLXConfigDialog.cpp | 3 +--
3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake
index e24d9fa1b..43e791509 100644
--- a/CMake/InstallResources.cmake
+++ b/CMake/InstallResources.cmake
@@ -33,10 +33,10 @@ endif()
if (NOT OGRE_PLUGINS_PATH)
if (WIN32)
set(OGRE_PLUGINS_PATH "${OGRE_BIN_DIRECTORY}")
- set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_BIN_DIRECTORY}")
+ set(OGRE_PLUGIN_DIR_REL "../${OGRE_BIN_DIRECTORY}")
else ()
set(OGRE_PLUGINS_PATH "${OGRE_LIB_DIRECTORY}/OGRE")
- set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
+ set(OGRE_PLUGIN_DIR_REL "../../${OGRE_LIB_DIRECTORY}/OGRE")
endif()
else ()
set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_PLUGINS_PATH}")
@@ -63,8 +63,8 @@ elseif (APPLE)
set(OGRE_SAMPLES_DIR_REL "Contents/Plugins/")
set(OGRE_CFG_INSTALL_PATH "bin")
elseif (UNIX)
- set(OGRE_TEST_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/Tests/Media")
- set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples")
+ set(OGRE_TEST_MEDIA_DIR_REL "../../Tests/Media")
+ set(OGRE_SAMPLES_DIR_REL "../${OGRE_LIB_DIRECTORY}/OGRE/Samples")
endif ()

# generate OgreConfigPaths.h
diff --git a/CMake/Templates/OgreConfigPaths.h.in b/CMake/Templates/OgreConfigPaths.h.in
index d51aab547..e139f5922 100644
--- a/CMake/Templates/OgreConfigPaths.h.in
+++ b/CMake/Templates/OgreConfigPaths.h.in
@@ -1,8 +1,8 @@
#ifndef OGRECONFIGPATHS_H_
#define OGRECONFIGPATHS_H_

-#define OGRE_CONFIG_DIR "@CMAKE_INSTALL_PREFIX@/@OGRE_CFG_INSTALL_PATH@"
-#define OGRE_MEDIA_DIR "@CMAKE_INSTALL_PREFIX@/@OGRE_MEDIA_PATH@"
-#define OGRE_PLUGIN_DIR "@OGRE_PLUGIN_DIR_REL@"
+#define OGRE_CONFIG_DIR "@OGRE_CFG_INSTALL_PATH@"
+#define OGRE_MEDIA_DIR "@OGRE_MEDIA_PATH_REL@"
+#define OGRE_PLUGIN_DIR "@OGRE_PLUGIN_DIR_REL@"

#endif /* OGRECONFIGPATHS_H_ */
diff --git a/Components/Bites/src/OgreGLXConfigDialog.cpp b/Components/Bites/src/OgreGLXConfigDialog.cpp
index 9ce1157e3..02ad00846 100644
--- a/Components/Bites/src/OgreGLXConfigDialog.cpp
+++ b/Components/Bites/src/OgreGLXConfigDialog.cpp
@@ -337,7 +337,7 @@ Pixmap GLXConfigurator::CreateBackdrop(Window rootWindow, int depth) {
Image img;

// Load backdrop image using OGRE
- String path = FileSystemLayer::resolveBundlePath(OGRE_MEDIA_DIR "/../GLX_backdrop.png");
+ String path = FileSystemLayer::resolveBundlePath("../" OGRE_MEDIA_DIR "/GLX_backdrop.png");
DataStreamPtr imgStreamPtr = Root::openFileStream(path);
img.load(imgStreamPtr, "png");

@@ -501,4 +501,3 @@ bool ConfigDialog::display()
return true;
}
}
-
--
2.39.5

Loading

0 comments on commit 3fc4dd6

Please sign in to comment.