diff --git a/.github/actions/setup-conan/action.yml b/.github/actions/setup-conan/action.yml index ece10ad6..d61b8d55 100644 --- a/.github/actions/setup-conan/action.yml +++ b/.github/actions/setup-conan/action.yml @@ -54,7 +54,11 @@ runs: if [[ "${{ runner.os }}" != "Windows" ]]; then echo "tools.system.package_manager:mode = install" >> .conan2/global.conf + if command -v sudo >/dev/null 2>&1; then echo "tools.system.package_manager:sudo = True" >> .conan2/global.conf + else + echo "tools.system.package_manager:sudo = False" >> .conan2/global.conf + fi fi if [[ "${{ inputs.conan-compiler }}" == "clang" && "${{ runner.os }}" == "Linux" ]]; then diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 65948521..39e45c51 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -1,10 +1,16 @@ name: 'Setup Python' description: 'Sets up Python and installs requirements (including Conan)' +inputs: + install-python: + description: 'Whether to run actions/setup-python' + default: 'true' + runs: using: "composite" steps: - name: Set up Python + if: inputs.install-python == 'true' uses: actions/setup-python@v5.4.0 with: python-version: '3.13' diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 818bf11e..a17d60aa 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -29,6 +29,7 @@ jobs: build: name: ${{ matrix.settings.name }} ${{ matrix.configuration }} runs-on: ${{ matrix.settings.os }} + container: ${{ matrix.settings.bebe_image }} strategy: matrix: configuration: [ "Release", "Debug" ] @@ -36,30 +37,35 @@ jobs: - { name: "Ubuntu GCC-12", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.gcc12", compiler: { type: GCC, version: 12, conan: "gcc", cc: "gcc-12", cxx: "g++-12", std: 20 }, lib: "libstdc++11" } - { name: "Ubuntu GCC-13", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.gcc13", compiler: { type: GCC, version: 13, conan: "gcc", cc: "gcc-13", cxx: "g++-13", std: 23 }, lib: "libstdc++11" } - { name: "Ubuntu GCC-14", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.gcc14", compiler: { type: GCC, version: 14, conan: "gcc", cc: "gcc-14", cxx: "g++-14", std: 23 }, lib: "libstdc++11" } - { name: "Ubuntu GCC-15", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.gcc15", compiler: { type: GCC, version: 15, conan: "gcc", cc: "gcc-15", cxx: "g++-15", std: 23 }, lib: "libstdc++11" } - { name: "Ubuntu Clang-14 + libc++", - os: ubuntu-22.04, + os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.clang14", compiler: { type: CLANG, @@ -73,7 +79,8 @@ jobs: } - { name: "Ubuntu Clang-15 + libc++", - os: ubuntu-22.04, + os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.clang15", compiler: { type: CLANG, @@ -87,7 +94,8 @@ jobs: } - { name: "Ubuntu Clang-16 + libc++", - os: ubuntu-22.04, + os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.clang16", compiler: { type: CLANG, @@ -102,6 +110,7 @@ jobs: - { name: "Ubuntu Clang-17 + libc++", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.clang17", compiler: { type: CLANG, @@ -116,6 +125,7 @@ jobs: - { name: "Ubuntu Clang-18 + libc++", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.clang18", compiler: { type: CLANG, @@ -130,6 +140,7 @@ jobs: - { name: "Ubuntu Clang-19 + libc++", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.clang19", compiler: { type: CLANG, @@ -144,6 +155,7 @@ jobs: - { name: "Ubuntu Clang-20 + libc++", os: ubuntu-latest, + bebe_image: "ghcr.io/twon/bebe/bebe:ubuntu.clang20", compiler: { type: CLANG, @@ -207,6 +219,7 @@ jobs: - uses: actions/checkout@v6.0.2 - name: Install Compiler + if: ${{ !matrix.settings.bebe_image }} uses: ./.github/actions/setup-compiler with: compiler-type: ${{ matrix.settings.compiler.type }} @@ -216,6 +229,8 @@ jobs: - name: Setup Python uses: ./.github/actions/setup-python + with: + install-python: ${{ !matrix.settings.bebe_image }} - name: Cache Conan Restore uses: ./.github/actions/conan-cache-restore @@ -240,7 +255,7 @@ jobs: - name: Conan Install shell: bash run: | - conan install "${{ github.workspace }}" --build missing -pr:b default + conan install . --build missing -pr:b default - name: Configure CMake (Windows) if: runner.os == 'Windows' diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 2d58a781..99bd8bc5 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -27,34 +27,19 @@ on: env: BUILD_TYPE: Debug - COMPILER_VERSION: 12 + COMPILER_VERSION: 15 jobs: build: runs-on: ubuntu-latest + container: ghcr.io/twon/bebe/bebe:ubuntu.gcc15 steps: - uses: actions/checkout@v6.0.2 - - name: Install Latest GCC - shell: bash - run: | - sudo apt install -y g++-${{ env.COMPILER_VERSION }} - sudo rm -f /usr/bin/gcc /usr/bin/g++ /usr/bin/gcov - sudo ln -s /usr/bin/gcov-${{ env.COMPILER_VERSION }} /usr/bin/gcov - sudo ln -s /usr/bin/gcc-${{ env.COMPILER_VERSION }} /usr/bin/gcc - sudo ln -s /usr/bin/g++-${{ env.COMPILER_VERSION }} /usr/bin/g++ - - - name: Install Lcov - shell: bash - run: | - wget https://github.com/linux-test-project/lcov/archive/refs/tags/v2.0.tar.gz - tar -xvf v2.0.tar.gz - cd lcov-2.0 && sudo make install && cd .. - sudo perl -MCPAN -e 'install Capture::Tiny' - sudo apt-get install -y libdatetime-perl - - name: Setup Python uses: ./.github/actions/setup-python + with: + install-python: 'false' - name: Cache Conan Restore uses: ./.github/actions/conan-cache-restore @@ -78,7 +63,7 @@ jobs: - name: Conan Install shell: bash run: | - conan install "${{ github.workspace }}" --build missing + conan install . --build missing - name: Configure CMake shell: bash diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 98bc9ec2..b08137c5 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -27,24 +27,19 @@ on: env: BUILD_TYPE: Debug - COMPILER_VERSION: 13 + COMPILER_VERSION: 15 jobs: documentation: runs-on: ubuntu-latest + container: ghcr.io/twon/bebe/bebe:ubuntu.gcc15 steps: - uses: actions/checkout@v6.0.2 - - name: Install Compiler - uses: ./.github/actions/setup-compiler - with: - compiler-type: GCC - compiler-version: ${{ env.COMPILER_VERSION }} - stdlib: libstdc++11 - os: Linux - - name: Setup Python uses: ./.github/actions/setup-python + with: + install-python: 'false' - name: Cache Conan Restore uses: ./.github/actions/conan-cache-restore @@ -70,7 +65,7 @@ jobs: - name: Conan Install shell: bash run: | - conan install "${{ github.workspace }}" --build missing -o build_docs=True + conan install . --build missing -o build_docs=True - name: Configure CMake shell: bash diff --git a/conanfile.py b/conanfile.py index 465f4fab..2bbc138c 100644 --- a/conanfile.py +++ b/conanfile.py @@ -165,6 +165,9 @@ def build_requirements(self): self.test_requires("catch2/3.13.0") self.test_requires("gtest/1.17.0") + if self.settings.os == "Linux": + self.tool_requires("pkgconf/2.1.0") # Required for X11 support. + if get_cmake_version() < Version("4.3.0"): self.tool_requires("cmake/4.3.0")