From cf88f0d0e217e373014ce9c689b02ef80c618f89 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 24 Sep 2024 16:28:43 +0200 Subject: [PATCH 001/126] Initial OSX draft for CI Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 83 +++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/osx-tests.yml diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml new file mode 100644 index 00000000000..4837974dc5f --- /dev/null +++ b/.github/workflows/osx-tests.yml @@ -0,0 +1,83 @@ +name: OSX Tests + +on: + workflow_dispatch: + push: + pull_request: + +jobs: + testing: + strategy: + fail-fast: false + matrix: + os: [macos-latest] + setup: [unittests, functional, integration, performance] + + runs-on: ${{ matrix.os }} + + name: OS ${{ matrix.os }} - ${{ matrix.setup }} tests + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + cache: 'pip' + + - name: Install Python requirements + run: | + pip install -r conans/requirements.txt + pip install -r conans/requirements_server.txt + pip install -r conans/requirements_dev.txt + + - name: Install Rosetta 2 + run: | + /usr/sbin/softwareupdate --install-rosetta --agree-to-license + + - name: Install CMake versions + working-directory: /tmp + run: | + for version in 3.15.7 3.16.9 3.17.5; do + wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-Darwin-x86_64.tar.gz + tar -xzf cmake-${version}-Darwin-x86_64.tar.gz \ + --exclude=CMake.app/Contents/bin/cmake-gui \ + --exclude=CMake.app/Contents/doc/cmake \ + --exclude=CMake.app/Contents/share/cmake-{version%.*}/Help \ + --exclude=CMake.app/Contents/share/vim + mkdir -p ${HOME}/Applications/CMake/${version} + cp -fR cmake-${version}-Darwin-x86_64/CMake.app/Contents/* ${HOME}/Applications/CMake/${version} + /Users/runner/Applications/CMake/${version}/bin/cmake --version + rm -rf cmake-${version}-Darwin-x86_64 + rm cmake-${version}-Darwin-x86_64.tar.gz + done + for version in 3.19.7 3.23.1; do + wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz + tar -xzf cmake-${version}-macos-universal.tar.gz \ + --exclude=CMake.app/Contents/bin/cmake-gui \ + --exclude=CMake.app/Contents/doc/cmake \ + --exclude=CMake.app/Contents/share/cmake-{version%.*}/Help \ + --exclude=CMake.app/Contents/share/vim + mkdir -p ${HOME}/Applications/CMake/${version} + cp -fR cmake-${version}-macos-universal/CMake.app/Contents/* ${HOME}/Applications/CMake/${version} + /Users/runner/Applications/CMake/${version}/bin/cmake --version + rm -rf cmake-${version}-macos-universal + rm cmake-${version}-macos-universal.tar.gz + done + + - name: Install Ninja + run: | + pip install ninja==1.10.2 + + - name: Install xcodegen + run: | + brew install xcodegen + + - name: Run Test - ${{ matrix.setup }} + run: | + python -m pytest -x -v --color=auto test/${{ matrix.setup }} From ffe856ca49e948e96e2fafd5657411a279858143 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 24 Sep 2024 16:44:52 +0200 Subject: [PATCH 002/126] Update tools paths for osx Signed-off-by: Uilian Ries --- test/conftest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/conftest.py b/test/conftest.py index b9bc9ff5887..64d730fcf22 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -68,27 +68,27 @@ "default": "3.15", "3.15": { "path": {'Windows': 'C:/cmake/cmake-3.15.7-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.15.7/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.15.7/bin', 'Linux': '/usr/share/cmake-3.15.7/bin'} }, "3.16": { "path": {'Windows': 'C:/cmake/cmake-3.16.9-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.16.9/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.16.9/bin', 'Linux': '/usr/share/cmake-3.16.9/bin'} }, "3.17": { "path": {'Windows': 'C:/cmake/cmake-3.17.5-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.17.5/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.17.5/bin', 'Linux': '/usr/share/cmake-3.17.5/bin'} }, "3.19": { "path": {'Windows': 'C:/cmake/cmake-3.19.7-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.19.7/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.19.7/bin', 'Linux': '/usr/share/cmake-3.19.7/bin'} }, "3.23": { "path": {'Windows': 'C:/cmake/cmake-3.23.1-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.23.1/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.23.1/bin', 'Linux': "/usr/share/cmake-3.23.5/bin"} }, "3.28": { From 99a470ae6c433f6f330154f2fc5024d2ef966e58 Mon Sep 17 00:00:00 2001 From: PerseoGI Date: Thu, 26 Sep 2024 11:30:54 +0200 Subject: [PATCH 003/126] Remove performance tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Abril Rincón Blanco --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 4837974dc5f..ce5eb72271b 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: os: [macos-latest] - setup: [unittests, functional, integration, performance] + setup: [unittests, functional, integration] runs-on: ${{ matrix.os }} From 5e67b706a5d940ba6202ed6179baeeb98c772fb4 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 14:39:29 +0200 Subject: [PATCH 004/126] Install bazel Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 9 +++++++++ test/conftest.py | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index ce5eb72271b..1a307f397dc 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -41,6 +41,7 @@ jobs: /usr/sbin/softwareupdate --install-rosetta --agree-to-license - name: Install CMake versions + # Install CMake x86_64 and use Rosetta to run. CMake Universal is supported since 3.18 only. working-directory: /tmp run: | for version in 3.15.7 3.16.9 3.17.5; do @@ -70,6 +71,14 @@ jobs: rm cmake-${version}-macos-universal.tar.gz done + - name: Install Bazel + run: | + for version in 6.3.2 7.1.2; do + mkdir -p ${HOME}/Applications/bazel/${version} + wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 + chmod +x ${HOME}/Applications/bazel/${version}/bazel + done + - name: Install Ninja run: | pip install ninja==1.10.2 diff --git a/test/conftest.py b/test/conftest.py index 64d730fcf22..6f5fdd6e0e2 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -158,10 +158,10 @@ "default": "6.3.2", "6.3.2": {"path": {'Linux': '/usr/share/bazel-6.3.2/bin', 'Windows': 'C:/bazel-6.3.2/bin', - 'Darwin': '/Users/jenkins/bazel-6.3.2/bin'}}, + 'Darwin': '/Users/runner/Applications/bazel/6.3.2/bin'}}, "7.1.2": {"path": {'Linux': '/usr/share/bazel-7.1.2/bin', 'Windows': 'C:/bazel-7.1.2/bin', - 'Darwin': '/Users/jenkins/bazel-7.1.2/bin'}}, + 'Darwin': '/Users/runner/Applications/bazel/7.1.2/bin'}}, }, 'premake': { "exe": "premake5", @@ -178,7 +178,7 @@ "exe": "ndk-build", "default": "system", "system": { - "path": {'Darwin': f'{homebrew_root}/share/android-ndk'} + "path": {'Darwin': 'Users/runner/Library/Android/sdk'} } }, "qbs": {"disabled": True}, From 0c2bdf658c4299da7df1ad133ada2a4817308e09 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 15:27:10 +0200 Subject: [PATCH 005/126] Install make and libtool Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 1a307f397dc..31c62294daa 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -83,9 +83,11 @@ jobs: run: | pip install ninja==1.10.2 - - name: Install xcodegen + - name: Install homebrew dependencies run: | brew install xcodegen + brew install make + brew libtool - name: Run Test - ${{ matrix.setup }} run: | From 8c3fa75c5053c22548869587c7a613361daf743c Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 15:38:35 +0200 Subject: [PATCH 006/126] Install extra packages using homebrew Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 31c62294daa..b6ac36c71f6 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -79,15 +79,9 @@ jobs: chmod +x ${HOME}/Applications/bazel/${version}/bazel done - - name: Install Ninja - run: | - pip install ninja==1.10.2 - - name: Install homebrew dependencies run: | - brew install xcodegen - brew install make - brew libtool + brew install xcodegen make libtool xz zlib autoconf automake ninja - name: Run Test - ${{ matrix.setup }} run: | From 22f43289936506240899d2b800ef1817bd6f6000 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 15:47:07 +0200 Subject: [PATCH 007/126] Fix Android SDK path Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 6 ++++++ test/conftest.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index b6ac36c71f6..d935c769ff4 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -83,6 +83,12 @@ jobs: run: | brew install xcodegen make libtool xz zlib autoconf automake ninja + - name: Install default Xcode + run: | + sudo xcode-select -s /Applications/conan/xcode/{{ xcode_default_version }}/Xcode.app + sudo xcode-select --install || true + sudo xcodebuild -license accept + - name: Run Test - ${{ matrix.setup }} run: | python -m pytest -x -v --color=auto test/${{ matrix.setup }} diff --git a/test/conftest.py b/test/conftest.py index 6f5fdd6e0e2..650c5b11649 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -178,7 +178,7 @@ "exe": "ndk-build", "default": "system", "system": { - "path": {'Darwin': 'Users/runner/Library/Android/sdk'} + "path": {'Darwin': '/Users/runner/Library/Android/sdk'} } }, "qbs": {"disabled": True}, From 9ffc3b3684822553e394cdcd53911014ea2ad5cc Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 15:52:57 +0200 Subject: [PATCH 008/126] Try to configure xcode Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index d935c769ff4..faf2af5742c 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -85,7 +85,7 @@ jobs: - name: Install default Xcode run: | - sudo xcode-select -s /Applications/conan/xcode/{{ xcode_default_version }}/Xcode.app + sudo xcode-select -s /Applications/Xcode_15.0.1.app sudo xcode-select --install || true sudo xcodebuild -license accept From 634e8594cc10921d4944e2510ed791e1acea4b57 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 16:14:25 +0200 Subject: [PATCH 009/126] debug: show xcrun compiler Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index faf2af5742c..a1f61c90322 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -8,7 +8,7 @@ on: jobs: testing: strategy: - fail-fast: false + fail-fast: true matrix: os: [macos-latest] setup: [unittests, functional, integration] @@ -20,10 +20,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - name: Set up Python uses: actions/setup-python@v5 with: @@ -89,6 +85,12 @@ jobs: sudo xcode-select --install || true sudo xcodebuild -license accept + - name: Check for xcode compiler version + run: | + xcodebuild -version + xcrun --show-sdk-path + xcrun --find clang++ + - name: Run Test - ${{ matrix.setup }} run: | python -m pytest -x -v --color=auto test/${{ matrix.setup }} From 2067aac91203483f10875746b15168d2d8510345 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 16:20:17 +0200 Subject: [PATCH 010/126] Use brute force to configure clang Signed-off-by: Uilian Ries --- .github/workflows/osx-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index a1f61c90322..7220f9dfc4e 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -92,5 +92,8 @@ jobs: xcrun --find clang++ - name: Run Test - ${{ matrix.setup }} + env: + CXX: /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ + CC: /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang run: | python -m pytest -x -v --color=auto test/${{ matrix.setup }} From 5179087ac4df82a63b8d8947376308586adae82e Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 8 Oct 2024 16:45:21 +0200 Subject: [PATCH 011/126] Skip test_editable_cmake_osx for now Signed-off-by: Uilian Ries --- test/functional/layout/test_editable_cmake.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/layout/test_editable_cmake.py b/test/functional/layout/test_editable_cmake.py index 02da2d79672..54029ddc15c 100644 --- a/test/functional/layout/test_editable_cmake.py +++ b/test/functional/layout/test_editable_cmake.py @@ -92,6 +92,7 @@ def test_editable_cmake_linux(generator): @pytest.mark.skipif(platform.system() != "Darwin", reason="Requires Macos") @pytest.mark.parametrize("generator", [None, "Ninja", "Xcode"]) @pytest.mark.tool("cmake", "3.19") +@pytest.mark.skip("FIXME: Could not find C++ compiler on Github Action") def test_editable_cmake_osx(generator): editable_cmake(generator) From 155574160a42bcff9dc654169d731cbdcd4e507a Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 17:28:58 +0200 Subject: [PATCH 012/126] rosetta already installed --- .github/workflows/osx-tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 7220f9dfc4e..8700a96b033 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -32,10 +32,6 @@ jobs: pip install -r conans/requirements_server.txt pip install -r conans/requirements_dev.txt - - name: Install Rosetta 2 - run: | - /usr/sbin/softwareupdate --install-rosetta --agree-to-license - - name: Install CMake versions # Install CMake x86_64 and use Rosetta to run. CMake Universal is supported since 3.18 only. working-directory: /tmp From 8b696d0e0c84c3c0e217f05f27455bb5fd50f9f2 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 17:43:35 +0200 Subject: [PATCH 013/126] adjustments --- .github/workflows/osx-tests.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 8700a96b033..5b2db01895e 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -1,30 +1,43 @@ name: OSX Tests on: - workflow_dispatch: push: + branches: + - develop2 + - release/* pull_request: + branches: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: testing: strategy: fail-fast: true matrix: - os: [macos-latest] - setup: [unittests, functional, integration] +# setup: [unittests, functional, integration] + test-type: [functional] + python-version: ['3.9'] + + runs-on: macos-12 - runs-on: ${{ matrix.os }} + name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) - name: OS ${{ matrix.os }} - ${{ matrix.setup }} tests steps: + - name: Checks + run: | + sudo xcode-select -p + - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: - python-version: '3.9' - cache: 'pip' + python-version: ${{ matrix.python-version }} - name: Install Python requirements run: | From 58bacb090825224c3be1a6068c94261499fce39e Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 17:49:40 +0200 Subject: [PATCH 014/126] wip --- .github/workflows/osx-tests.yml | 49 ++++++++++++--------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 5b2db01895e..2fd176de991 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -18,19 +18,13 @@ jobs: strategy: fail-fast: true matrix: -# setup: [unittests, functional, integration] test-type: [functional] - python-version: ['3.9'] - + python-version: ['3.9', '3.10', '3.11'] runs-on: macos-12 name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) steps: - - name: Checks - run: | - sudo xcode-select -p - - name: Checkout code uses: actions/checkout@v4 @@ -46,19 +40,18 @@ jobs: pip install -r conans/requirements_dev.txt - name: Install CMake versions - # Install CMake x86_64 and use Rosetta to run. CMake Universal is supported since 3.18 only. - working-directory: /tmp run: | + set -e for version in 3.15.7 3.16.9 3.17.5; do wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-Darwin-x86_64.tar.gz tar -xzf cmake-${version}-Darwin-x86_64.tar.gz \ --exclude=CMake.app/Contents/bin/cmake-gui \ --exclude=CMake.app/Contents/doc/cmake \ - --exclude=CMake.app/Contents/share/cmake-{version%.*}/Help \ + --exclude=CMake.app/Contents/share/cmake-${version%.*}/Help \ --exclude=CMake.app/Contents/share/vim mkdir -p ${HOME}/Applications/CMake/${version} cp -fR cmake-${version}-Darwin-x86_64/CMake.app/Contents/* ${HOME}/Applications/CMake/${version} - /Users/runner/Applications/CMake/${version}/bin/cmake --version + ${HOME}/Applications/CMake/${version}/bin/cmake --version rm -rf cmake-${version}-Darwin-x86_64 rm cmake-${version}-Darwin-x86_64.tar.gz done @@ -67,42 +60,34 @@ jobs: tar -xzf cmake-${version}-macos-universal.tar.gz \ --exclude=CMake.app/Contents/bin/cmake-gui \ --exclude=CMake.app/Contents/doc/cmake \ - --exclude=CMake.app/Contents/share/cmake-{version%.*}/Help \ + --exclude=CMake.app/Contents/share/cmake-${version%.*}/Help \ --exclude=CMake.app/Contents/share/vim mkdir -p ${HOME}/Applications/CMake/${version} cp -fR cmake-${version}-macos-universal/CMake.app/Contents/* ${HOME}/Applications/CMake/${version} - /Users/runner/Applications/CMake/${version}/bin/cmake --version + ${HOME}/Applications/CMake/${version}/bin/cmake --version rm -rf cmake-${version}-macos-universal rm cmake-${version}-macos-universal.tar.gz done - - name: Install Bazel + - name: Install Bazel versions run: | - for version in 6.3.2 7.1.2; do - mkdir -p ${HOME}/Applications/bazel/${version} - wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 - chmod +x ${HOME}/Applications/bazel/${version}/bazel - done + set -e + for version in 6.3.2 7.1.2; do + mkdir -p ${HOME}/Applications/bazel/${version} + wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-x86_64 + chmod +x ${HOME}/Applications/bazel/${version}/bazel + done - name: Install homebrew dependencies run: | - brew install xcodegen make libtool xz zlib autoconf automake ninja - - - name: Install default Xcode - run: | - sudo xcode-select -s /Applications/Xcode_15.0.1.app - sudo xcode-select --install || true - sudo xcodebuild -license accept + brew install xcodegen - - name: Check for xcode compiler version + - name: Check for Xcode compiler version run: | xcodebuild -version xcrun --show-sdk-path xcrun --find clang++ - - name: Run Test - ${{ matrix.setup }} - env: - CXX: /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - CC: /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang + - name: Run Test - ${{ matrix.test-type }} run: | - python -m pytest -x -v --color=auto test/${{ matrix.setup }} + python -m pytest -x -v --color=auto test/${{ matrix.test-type }} From 2bdc5d859e4276b4d5643ba5ddcb97d793b0128e Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 17:50:21 +0200 Subject: [PATCH 015/126] wip --- .github/workflows/osx-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 2fd176de991..172a9addad9 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -5,6 +5,7 @@ on: branches: - develop2 - release/* + - ci/gh-action-osx pull_request: branches: - '*' From dae1ca4cb2693c0785e1ec865c126c5319fffc67 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 17:50:51 +0200 Subject: [PATCH 016/126] one python --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 172a9addad9..d4f6b3df076 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -20,7 +20,7 @@ jobs: fail-fast: true matrix: test-type: [functional] - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.9'] runs-on: macos-12 name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) From aa711dcb0cf7680f73c8f98848ff2bfd6a1b5df6 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 18:02:23 +0200 Subject: [PATCH 017/126] use macos-14 --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index d4f6b3df076..e9e9a123daf 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -21,7 +21,7 @@ jobs: matrix: test-type: [functional] python-version: ['3.9'] - runs-on: macos-12 + runs-on: macos-14 name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) From a2a7bd6434fc75ef551f77d86bd979e70fae088b Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 18:04:35 +0200 Subject: [PATCH 018/126] wip --- .github/workflows/osx-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index e9e9a123daf..3e9b0c527bd 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -26,6 +26,11 @@ jobs: name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) steps: + - name: Install Python requirements + run: | + clang --version + gcc --version + - name: Checkout code uses: actions/checkout@v4 From 699472edb421659243e4275f360c895a46f18710 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 18:12:39 +0200 Subject: [PATCH 019/126] wip --- .github/workflows/osx-tests.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 3e9b0c527bd..3d806bbeddc 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -26,7 +26,7 @@ jobs: name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) steps: - - name: Install Python requirements + - name: Checks run: | clang --version gcc --version @@ -95,5 +95,12 @@ jobs: xcrun --find clang++ - name: Run Test - ${{ matrix.test-type }} + shell: bash run: | - python -m pytest -x -v --color=auto test/${{ matrix.test-type }} + if [ "${{ matrix.test-type }}" == "unittests" ]; then + pytest test/unittests --durations=20 -n 4 + elif [ "${{ matrix.test-type }}" == "integration" ]; then + pytest test/integration --durations=20 -n 4 + elif [ "${{ matrix.test-type }}" == "functional" ]; then + pytest test/functional --durations=20 -n 4 + fi From a1a8d71e5293bb3d24f2ced11c75ba0de06f5c7f Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 18:15:21 +0200 Subject: [PATCH 020/126] update default profile --- conan/test/utils/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan/test/utils/tools.py b/conan/test/utils/tools.py index a1f98a39a90..f475f60ffec 100644 --- a/conan/test/utils/tools.py +++ b/conan/test/utils/tools.py @@ -76,7 +76,7 @@ os=Macos arch={arch_setting} compiler=apple-clang - compiler.version=13 + compiler.version=15 compiler.libcxx=libc++ build_type=Release """) From 90cb422b56287047dc2cd7d8ea099bea2746c9c4 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 18:19:00 +0200 Subject: [PATCH 021/126] cache installations --- .github/workflows/osx-tests.yml | 42 +++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 3d806bbeddc..bba01013b87 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -26,11 +26,6 @@ jobs: name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) steps: - - name: Checks - run: | - clang --version - gcc --version - - name: Checkout code uses: actions/checkout@v4 @@ -38,14 +33,34 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/conans/requirements*.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Install Python requirements run: | + pip install --upgrade pip pip install -r conans/requirements.txt pip install -r conans/requirements_server.txt pip install -r conans/requirements_dev.txt + - name: Cache CMake installations + uses: actions/cache@v3 + with: + path: ${HOME}/Applications/CMake + key: ${{ runner.os }}-cmake-${{ matrix.test-type }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }} + restore-keys: | + ${{ runner.os }}-cmake- + - name: Install CMake versions + if: steps.cache-cmake.outputs.cache-hit != 'true' run: | set -e for version in 3.15.7 3.16.9 3.17.5; do @@ -75,7 +90,16 @@ jobs: rm cmake-${version}-macos-universal.tar.gz done + - name: Cache Bazel installations + uses: actions/cache@v3 + with: + path: ${HOME}/Applications/bazel + key: ${{ runner.os }}-bazel-${{ matrix.test-type }}-${{ matrix.python-version }}-${{ hashFiles('**/WORKSPACE') }} + restore-keys: | + ${{ runner.os }}-bazel- + - name: Install Bazel versions + if: steps.cache-bazel.outputs.cache-hit != 'true' run: | set -e for version in 6.3.2 7.1.2; do @@ -84,6 +108,14 @@ jobs: chmod +x ${HOME}/Applications/bazel/${version}/bazel done + - name: Cache Homebrew dependencies + uses: actions/cache@v3 + with: + path: /opt/homebrew + key: ${{ runner.os }}-homebrew-${{ hashFiles('**/Brewfile') }} + restore-keys: | + ${{ runner.os }}-homebrew- + - name: Install homebrew dependencies run: | brew install xcodegen From 7f8f46cfee99f274d70c15b096b7151a898cf4f7 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 18:50:28 +0200 Subject: [PATCH 022/126] dont run in parallel --- .github/workflows/osx-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index bba01013b87..69d37ca50a7 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -130,9 +130,9 @@ jobs: shell: bash run: | if [ "${{ matrix.test-type }}" == "unittests" ]; then - pytest test/unittests --durations=20 -n 4 + pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then - pytest test/integration --durations=20 -n 4 + pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional --durations=20 -n 4 + pytest test/functional --durations=20 fi From ce66ecd6edace596364ce6587cb59f90c51b2f72 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 19:20:53 +0200 Subject: [PATCH 023/126] wip --- conan/test/utils/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan/test/utils/tools.py b/conan/test/utils/tools.py index f475f60ffec..a1f98a39a90 100644 --- a/conan/test/utils/tools.py +++ b/conan/test/utils/tools.py @@ -76,7 +76,7 @@ os=Macos arch={arch_setting} compiler=apple-clang - compiler.version=15 + compiler.version=13 compiler.libcxx=libc++ build_type=Release """) From 63674382a717673d1ab7ffd3ec60cd5b9afb9f7c Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 9 Oct 2024 21:06:51 +0200 Subject: [PATCH 024/126] remove cache --- .github/workflows/osx-tests.yml | 28 ------------------- test/functional/layout/test_editable_cmake.py | 1 - 2 files changed, 29 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 69d37ca50a7..8091f0650db 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -33,16 +33,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: 'pip' - - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/conans/requirements*.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - name: Install Python requirements run: | @@ -51,16 +41,7 @@ jobs: pip install -r conans/requirements_server.txt pip install -r conans/requirements_dev.txt - - name: Cache CMake installations - uses: actions/cache@v3 - with: - path: ${HOME}/Applications/CMake - key: ${{ runner.os }}-cmake-${{ matrix.test-type }}-${{ matrix.python-version }}-${{ hashFiles('**/CMakeLists.txt') }} - restore-keys: | - ${{ runner.os }}-cmake- - - name: Install CMake versions - if: steps.cache-cmake.outputs.cache-hit != 'true' run: | set -e for version in 3.15.7 3.16.9 3.17.5; do @@ -90,16 +71,7 @@ jobs: rm cmake-${version}-macos-universal.tar.gz done - - name: Cache Bazel installations - uses: actions/cache@v3 - with: - path: ${HOME}/Applications/bazel - key: ${{ runner.os }}-bazel-${{ matrix.test-type }}-${{ matrix.python-version }}-${{ hashFiles('**/WORKSPACE') }} - restore-keys: | - ${{ runner.os }}-bazel- - - name: Install Bazel versions - if: steps.cache-bazel.outputs.cache-hit != 'true' run: | set -e for version in 6.3.2 7.1.2; do diff --git a/test/functional/layout/test_editable_cmake.py b/test/functional/layout/test_editable_cmake.py index 54029ddc15c..02da2d79672 100644 --- a/test/functional/layout/test_editable_cmake.py +++ b/test/functional/layout/test_editable_cmake.py @@ -92,7 +92,6 @@ def test_editable_cmake_linux(generator): @pytest.mark.skipif(platform.system() != "Darwin", reason="Requires Macos") @pytest.mark.parametrize("generator", [None, "Ninja", "Xcode"]) @pytest.mark.tool("cmake", "3.19") -@pytest.mark.skip("FIXME: Could not find C++ compiler on Github Action") def test_editable_cmake_osx(generator): editable_cmake(generator) From 3bc955eccd1a73ebc8a0afec5f77c735ad2cb942 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 07:25:55 +0200 Subject: [PATCH 025/126] wip --- .github/workflows/osx-tests.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 8091f0650db..cbd5f6059c7 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -40,6 +40,7 @@ jobs: pip install -r conans/requirements.txt pip install -r conans/requirements_server.txt pip install -r conans/requirements_dev.txt + pip install meson - name: Install CMake versions run: | @@ -76,21 +77,13 @@ jobs: set -e for version in 6.3.2 7.1.2; do mkdir -p ${HOME}/Applications/bazel/${version} - wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-x86_64 + wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 chmod +x ${HOME}/Applications/bazel/${version}/bazel done - - name: Cache Homebrew dependencies - uses: actions/cache@v3 - with: - path: /opt/homebrew - key: ${{ runner.os }}-homebrew-${{ hashFiles('**/Brewfile') }} - restore-keys: | - ${{ runner.os }}-homebrew- - - name: Install homebrew dependencies run: | - brew install xcodegen + brew install xcodegen make libtool xz zlib autoconf automake ninja - name: Check for Xcode compiler version run: | From cae43b5afdbbcfc68a1e842d0e2b56e740c1c679 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 07:52:17 +0200 Subject: [PATCH 026/126] change cmake default, output debug data --- .github/workflows/osx-tests.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index cbd5f6059c7..7aee98627a7 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -26,6 +26,14 @@ jobs: name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) steps: + - name: Check for Xcode compiler version + run: | + xcodebuild -version + xcrun --show-sdk-path + xcrun --find clang++ + ls /Users/runner/Library/Android/sdk + tree /Users/runner/Library + - name: Checkout code uses: actions/checkout@v4 @@ -72,6 +80,12 @@ jobs: rm cmake-${version}-macos-universal.tar.gz done + brew uninstall cmake || true + # the conftest.py defines CMake 3.15 as the default for testing + export PATH="${HOME}/Applications/CMake/3.15.7/bin:$PATH" + echo "The default CMake version for testing is:" + cmake --version + - name: Install Bazel versions run: | set -e @@ -85,12 +99,6 @@ jobs: run: | brew install xcodegen make libtool xz zlib autoconf automake ninja - - name: Check for Xcode compiler version - run: | - xcodebuild -version - xcrun --show-sdk-path - xcrun --find clang++ - - name: Run Test - ${{ matrix.test-type }} shell: bash run: | From 49970d2770b4a7ed0a6de349bc3f60daa8ee5bcd Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 07:54:34 +0200 Subject: [PATCH 027/126] wip --- .github/workflows/osx-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 7aee98627a7..9c55f3520d8 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -28,6 +28,7 @@ jobs: steps: - name: Check for Xcode compiler version run: | + brew install tree xcodebuild -version xcrun --show-sdk-path xcrun --find clang++ From c521dd43e626a3ceaf4146d28aad4077c37a7810 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 08:00:56 +0200 Subject: [PATCH 028/126] get android ndk from env --- test/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/conftest.py b/test/conftest.py index 650c5b11649..907f5e4a04c 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -178,7 +178,7 @@ "exe": "ndk-build", "default": "system", "system": { - "path": {'Darwin': '/Users/runner/Library/Android/sdk'} + "path": {'Darwin': os.getenv("ANDROID_NDK")} } }, "qbs": {"disabled": True}, From 958740ba42d4e100963d426887a208264aaeb781 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 08:01:23 +0200 Subject: [PATCH 029/126] wip --- .github/workflows/osx-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 9c55f3520d8..10416e07f70 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -32,8 +32,6 @@ jobs: xcodebuild -version xcrun --show-sdk-path xcrun --find clang++ - ls /Users/runner/Library/Android/sdk - tree /Users/runner/Library - name: Checkout code uses: actions/checkout@v4 From a915b99fa851f10d20356790423fa514f243a942 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 08:23:21 +0200 Subject: [PATCH 030/126] wip --- .github/workflows/osx-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 10416e07f70..4fd522b8dab 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -28,10 +28,13 @@ jobs: steps: - name: Check for Xcode compiler version run: | - brew install tree + sudo xcodebuild -runFirstLaunch + sudo xcodebuild -license accept xcodebuild -version xcrun --show-sdk-path xcrun --find clang++ + xcrun -find c++ + xcrun -find cc - name: Checkout code uses: actions/checkout@v4 From dc69f4c20771e6a90e86478a1130cb20ef11bdba Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 08:30:11 +0200 Subject: [PATCH 031/126] wip --- .github/workflows/osx-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 4fd522b8dab..720770d5774 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -21,6 +21,7 @@ jobs: matrix: test-type: [functional] python-version: ['3.9'] + runs-on: macos-14 name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) @@ -103,6 +104,9 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash + env: + CC: $(xcrun --find cc) + CXX: $(xcrun --find c++) run: | if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 From 3c067c38f95fd22af998866fa3b7827c19bb0662 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 08:45:33 +0200 Subject: [PATCH 032/126] explicit xcode --- .github/workflows/osx-tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 720770d5774..e3d362f1b4a 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -27,10 +27,13 @@ jobs: name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) steps: - - name: Check for Xcode compiler version + + - name: Install default Xcode run: | - sudo xcodebuild -runFirstLaunch + sudo xcode-select -s /Applications/Xcode_15.4.app + sudo xcode-select --install || true sudo xcodebuild -license accept + sudo xcodebuild -runFirstLaunch xcodebuild -version xcrun --show-sdk-path xcrun --find clang++ From 5fc134b8eb9c156d73ac47158677006eec13f984 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 08:47:19 +0200 Subject: [PATCH 033/126] wip --- .github/workflows/osx-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index e3d362f1b4a..407ffdf655b 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -100,6 +100,7 @@ jobs: wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 chmod +x ${HOME}/Applications/bazel/${version}/bazel done + ls /Users/runner/Applications/bazel/ - name: Install homebrew dependencies run: | From dba6dea129705d3076f848c5f7276baa26e9c646 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 08:49:24 +0200 Subject: [PATCH 034/126] wip --- .github/workflows/osx-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 407ffdf655b..7ec64068218 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -100,7 +100,10 @@ jobs: wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 chmod +x ${HOME}/Applications/bazel/${version}/bazel done - ls /Users/runner/Applications/bazel/ + ls /Users/runner/Applications/bazel/6.3.2/bin + /Users/runner/Applications/bazel/6.3.2/bin/bazel --version + ls /Users/runner/Applications/bazel/7.1.2/bin + /Users/runner/Applications/bazel/7.1.2/bin/bazel --version - name: Install homebrew dependencies run: | From 4afeabe5e52786b8a2c5ebd72471dff89167d273 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 10:00:26 +0200 Subject: [PATCH 035/126] check bazel --- .github/workflows/osx-tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 7ec64068218..e2cf54f64e8 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -100,10 +100,8 @@ jobs: wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 chmod +x ${HOME}/Applications/bazel/${version}/bazel done - ls /Users/runner/Applications/bazel/6.3.2/bin - /Users/runner/Applications/bazel/6.3.2/bin/bazel --version - ls /Users/runner/Applications/bazel/7.1.2/bin - /Users/runner/Applications/bazel/7.1.2/bin/bazel --version + ls /Users/runner/Applications/bazel/6.3.2 + ls /Users/runner/Applications/bazel/7.1.2 - name: Install homebrew dependencies run: | From 78caceb52033acb555028696f6f1b2553603b02a Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 10:01:59 +0200 Subject: [PATCH 036/126] fix bazel --- .github/workflows/osx-tests.yml | 4 ++-- test/conftest.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index e2cf54f64e8..3a2e256f360 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -100,8 +100,8 @@ jobs: wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 chmod +x ${HOME}/Applications/bazel/${version}/bazel done - ls /Users/runner/Applications/bazel/6.3.2 - ls /Users/runner/Applications/bazel/7.1.2 + /Users/runner/Applications/bazel/6.3.2/bazel --version + /Users/runner/Applications/bazel/7.1.2/bazel --version - name: Install homebrew dependencies run: | diff --git a/test/conftest.py b/test/conftest.py index 907f5e4a04c..2d9a51173d4 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -158,10 +158,10 @@ "default": "6.3.2", "6.3.2": {"path": {'Linux': '/usr/share/bazel-6.3.2/bin', 'Windows': 'C:/bazel-6.3.2/bin', - 'Darwin': '/Users/runner/Applications/bazel/6.3.2/bin'}}, - "7.1.2": {"path": {'Linux': '/usr/share/bazel-7.1.2/bin', + 'Darwin': '/Users/runner/Applications/bazel/6.3.2'}}, + "7.1.2": {"path": {'Linux': '/usr/share/bazel-7.1.2', 'Windows': 'C:/bazel-7.1.2/bin', - 'Darwin': '/Users/runner/Applications/bazel/7.1.2/bin'}}, + 'Darwin': '/Users/runner/Applications/bazel/7.1.2'}}, }, 'premake': { "exe": "premake5", From fa6428d42ca7f58ae750ae249b24f856006b3ff4 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 10:03:24 +0200 Subject: [PATCH 037/126] wip --- .github/workflows/osx-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 3a2e256f360..ff0b3a973f5 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -36,9 +36,10 @@ jobs: sudo xcodebuild -runFirstLaunch xcodebuild -version xcrun --show-sdk-path + xcrun --find clang xcrun --find clang++ - xcrun -find c++ xcrun -find cc + xcrun -find c++ - name: Checkout code uses: actions/checkout@v4 @@ -110,8 +111,8 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash env: - CC: $(xcrun --find cc) - CXX: $(xcrun --find c++) + CC: $(xcrun --find clang) + CXX: $(xcrun --find clang++) run: | if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 From b4debe4bb727d013ec394492aa607783265ac975 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 10:11:17 +0200 Subject: [PATCH 038/126] add cmake 3.15 to path --- .github/workflows/osx-tests.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index ff0b3a973f5..5e7f18b5efa 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -86,12 +86,7 @@ jobs: rm -rf cmake-${version}-macos-universal rm cmake-${version}-macos-universal.tar.gz done - brew uninstall cmake || true - # the conftest.py defines CMake 3.15 as the default for testing - export PATH="${HOME}/Applications/CMake/3.15.7/bin:$PATH" - echo "The default CMake version for testing is:" - cmake --version - name: Install Bazel versions run: | @@ -113,6 +108,9 @@ jobs: env: CC: $(xcrun --find clang) CXX: $(xcrun --find clang++) + # the conftest.py defines CMake 3.15 as the default for testing + PATH: ${HOME}/Applications/CMake/3.15.7/bin:$PATH + run: | if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 From 2a14e849c225a8b7cc187fda47cce691fe4bdc67 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 10:16:03 +0200 Subject: [PATCH 039/126] check cmake --- .github/workflows/osx-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 5e7f18b5efa..45f200ff858 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -112,6 +112,7 @@ jobs: PATH: ${HOME}/Applications/CMake/3.15.7/bin:$PATH run: | + cmake --version if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From 899e45a454add06f2d793b4789d6954301cce4f0 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 10:18:45 +0200 Subject: [PATCH 040/126] wip --- .github/workflows/osx-tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 45f200ff858..80d156e506c 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -108,10 +108,8 @@ jobs: env: CC: $(xcrun --find clang) CXX: $(xcrun --find clang++) - # the conftest.py defines CMake 3.15 as the default for testing - PATH: ${HOME}/Applications/CMake/3.15.7/bin:$PATH - run: | + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH cmake --version if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 From e9a1f870ed59119a03a6922aa7e0f6cc8728e9f2 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 10:48:49 +0200 Subject: [PATCH 041/126] wip --- .github/workflows/osx-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 80d156e506c..4c2a66f38c3 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -105,11 +105,12 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash - env: - CC: $(xcrun --find clang) - CXX: $(xcrun --find clang++) run: | + export CC=$(xcrun --find clang) + export CXX=$(xcrun --find clang++) export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH + echo "Using CC: $CC" + echo "Using CXX: $CXX" cmake --version if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 From 38e212aaf679d70bf2c1f47a8397e5667959eb87 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 11:11:22 +0200 Subject: [PATCH 042/126] wip --- .github/workflows/osx-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 4c2a66f38c3..3f3a7c9c50a 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -106,6 +106,10 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | + which clang++ + clang++ --version + which clang + clang --version export CC=$(xcrun --find clang) export CXX=$(xcrun --find clang++) export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH @@ -117,5 +121,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional --durations=20 + pytest -v test/functional/toolchains/apple/test_xcodetoolchain.py fi From af774b2636ea638f59cfea2475a1952626b7b409 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 11:17:06 +0200 Subject: [PATCH 043/126] update sdk version --- test/functional/toolchains/apple/test_xcodetoolchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/toolchains/apple/test_xcodetoolchain.py b/test/functional/toolchains/apple/test_xcodetoolchain.py index c45614553d3..966b4196436 100644 --- a/test/functional/toolchains/apple/test_xcodetoolchain.py +++ b/test/functional/toolchains/apple/test_xcodetoolchain.py @@ -80,7 +80,7 @@ def package_info(self): client.run_command("xcodegen generate") - sdk_version = "11.3" + sdk_version = "14.5" settings = "-s arch=x86_64 -s os.sdk_version={} -s compiler.cppstd={} " \ "-s compiler.libcxx=libc++ -s os.version={} " \ "-c tools.build.cross_building:can_run=True " \ From d58f24212bf5b5d949cffa7910f18335e6332100 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 11:39:27 +0200 Subject: [PATCH 044/126] fix test --- test/functional/toolchains/apple/test_xcodetoolchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/toolchains/apple/test_xcodetoolchain.py b/test/functional/toolchains/apple/test_xcodetoolchain.py index 966b4196436..cdbbe7a8998 100644 --- a/test/functional/toolchains/apple/test_xcodetoolchain.py +++ b/test/functional/toolchains/apple/test_xcodetoolchain.py @@ -93,4 +93,4 @@ def package_info(self): assert "minos {}".format(min_version) in client.out assert "sdk {}".format(sdk_version) in client.out assert "libc++" in client.out - assert " -fstack-protector-strong -" in client.out + assert " -fstack-protector-strong" in client.out From d6dff486333e44463608aad0f3b078e460eb2c1d Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 11:44:04 +0200 Subject: [PATCH 045/126] run apple tests --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 3f3a7c9c50a..c99bbfeb9d9 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -121,5 +121,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest -v test/functional/toolchains/apple/test_xcodetoolchain.py + pytest -v test/functional/toolchains/apple fi From 8f2df0cb8e7d1288257232a15e72cab740c78560 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 11:58:04 +0200 Subject: [PATCH 046/126] run cmake tests --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index c99bbfeb9d9..e11a1d205b8 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -121,5 +121,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest -v test/functional/toolchains/apple + pytest test/functional/toolchains/cmake fi From 3988a15ffc7a96474f9e691222a0695fa41cf043 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 12:30:12 +0200 Subject: [PATCH 047/126] build cmake from sources --- .github/workflows/osx-tests.yml | 35 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index e11a1d205b8..b1b461ad8a8 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -57,22 +57,29 @@ jobs: pip install -r conans/requirements_dev.txt pip install meson + - name: Install homebrew dependencies + run: | + brew install xcodegen make libtool xz zlib autoconf automake ninja openssl + - name: Install CMake versions run: | set -e - for version in 3.15.7 3.16.9 3.17.5; do - wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-Darwin-x86_64.tar.gz - tar -xzf cmake-${version}-Darwin-x86_64.tar.gz \ - --exclude=CMake.app/Contents/bin/cmake-gui \ - --exclude=CMake.app/Contents/doc/cmake \ - --exclude=CMake.app/Contents/share/cmake-${version%.*}/Help \ - --exclude=CMake.app/Contents/share/vim - mkdir -p ${HOME}/Applications/CMake/${version} - cp -fR cmake-${version}-Darwin-x86_64/CMake.app/Contents/* ${HOME}/Applications/CMake/${version} + + CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") + for version in "${CMAKE_BUILD_VERSIONS[@]}"; do + echo "Compiling CMake version ${version} from source for ARM..." + wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz + tar -xzf cmake-${version}.tar.gz + cd cmake-${version} + mkdir build && cd build + ../bootstrap --prefix=${HOME}/Applications/CMake/${version} -- -DCMAKE_USE_OPENSSL=ON + make -j$(sysctl -n hw.ncpu) + make install ${HOME}/Applications/CMake/${version}/bin/cmake --version - rm -rf cmake-${version}-Darwin-x86_64 - rm cmake-${version}-Darwin-x86_64.tar.gz + cd ../../ + rm -rf cmake-${version} cmake-${version}.tar.gz done + for version in 3.19.7 3.23.1; do wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz tar -xzf cmake-${version}-macos-universal.tar.gz \ @@ -99,10 +106,6 @@ jobs: /Users/runner/Applications/bazel/6.3.2/bazel --version /Users/runner/Applications/bazel/7.1.2/bazel --version - - name: Install homebrew dependencies - run: | - brew install xcodegen make libtool xz zlib autoconf automake ninja - - name: Run Test - ${{ matrix.test-type }} shell: bash run: | @@ -121,5 +124,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional/toolchains/cmake + pytest test/functional/toolchains/cmake --durations=20 fi From 78df1ab889a1269afdaa9c2b43197f15588ee7b5 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 12:33:45 +0200 Subject: [PATCH 048/126] dont reinstall things with brew --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index b1b461ad8a8..38d6f7393fc 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -59,7 +59,7 @@ jobs: - name: Install homebrew dependencies run: | - brew install xcodegen make libtool xz zlib autoconf automake ninja openssl + brew install xcodegen make libtool zlib autoconf automake ninja - name: Install CMake versions run: | From 06c7985ab6cc02140a98c7c6f7c791dba027e9c3 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 12:43:21 +0200 Subject: [PATCH 049/126] wip --- .github/workflows/osx-tests.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 38d6f7393fc..fa870374ead 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -109,15 +109,13 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - which clang++ - clang++ --version - which clang - clang --version - export CC=$(xcrun --find clang) - export CXX=$(xcrun --find clang++) - export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH - echo "Using CC: $CC" - echo "Using CXX: $CXX" + # which clang++ + # clang++ --version + # which clang + # clang --version + # export CC=$(xcrun --find clang) + # export CXX=$(xcrun --find clang++) + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 From 7807d01c09a3af517f4043b8ee757ce9d589d359 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 12:47:28 +0200 Subject: [PATCH 050/126] cache cmake --- .github/workflows/osx-tests.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index fa870374ead..e4f168c0516 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -60,12 +60,24 @@ jobs: - name: Install homebrew dependencies run: | brew install xcodegen make libtool zlib autoconf automake ninja + brew uninstall cmake || true + + - name: Cache CMake installations (Build Versions) + id: cache-cmake + uses: actions/cache@v3 + with: + path: ${{ github.workspace }}/Applications/CMake + key: conan-cmake-${{ runner.os }}-v3.15.7-3.16.9-3.17.5-v3.19.7-3.23.1 + restore-keys: | + conan-cmake-${{ runner.os }}- - name: Install CMake versions + if: steps.cache-cmake.outputs.cache-hit != 'true' run: | set -e CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") + CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.1") for version in "${CMAKE_BUILD_VERSIONS[@]}"; do echo "Compiling CMake version ${version} from source for ARM..." wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz @@ -80,7 +92,8 @@ jobs: rm -rf cmake-${version} cmake-${version}.tar.gz done - for version in 3.19.7 3.23.1; do + for version in "${CMAKE_PRECOMP_VERSIONS[@]}"; do + echo "Downloading and installing precompiled universal CMake version ${version}..." wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz tar -xzf cmake-${version}-macos-universal.tar.gz \ --exclude=CMake.app/Contents/bin/cmake-gui \ @@ -93,7 +106,6 @@ jobs: rm -rf cmake-${version}-macos-universal rm cmake-${version}-macos-universal.tar.gz done - brew uninstall cmake || true - name: Install Bazel versions run: | @@ -109,13 +121,8 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - # which clang++ - # clang++ --version - # which clang - # clang --version - # export CC=$(xcrun --find clang) - # export CXX=$(xcrun --find clang++) export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + which cmake cmake --version if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 From ee3c44b15eee71f17b1810ecb800d50fbaf03328 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 12:48:01 +0200 Subject: [PATCH 051/126] minor changes --- .github/workflows/osx-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index e4f168c0516..94d914a8485 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -62,11 +62,11 @@ jobs: brew install xcodegen make libtool zlib autoconf automake ninja brew uninstall cmake || true - - name: Cache CMake installations (Build Versions) + - name: Cache CMake installations id: cache-cmake uses: actions/cache@v3 with: - path: ${{ github.workspace }}/Applications/CMake + path: $HOME/Applications/CMake key: conan-cmake-${{ runner.os }}-v3.15.7-3.16.9-3.17.5-v3.19.7-3.23.1 restore-keys: | conan-cmake-${{ runner.os }}- From fce7ea5dfef4e6745adc72e9cd1edaece71e9bb1 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 14:04:16 +0200 Subject: [PATCH 052/126] wip --- .github/workflows/osx-tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 94d914a8485..13c36683182 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -64,12 +64,10 @@ jobs: - name: Cache CMake installations id: cache-cmake - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: $HOME/Applications/CMake - key: conan-cmake-${{ runner.os }}-v3.15.7-3.16.9-3.17.5-v3.19.7-3.23.1 - restore-keys: | - conan-cmake-${{ runner.os }}- + key: conan-cmake-v3.15.7-3.16.9-3.17.5-v3.19.7-3.23.1 - name: Install CMake versions if: steps.cache-cmake.outputs.cache-hit != 'true' From 263329c3acaa89ca6c471a937457a9ed10741bf3 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 14:35:46 +0200 Subject: [PATCH 053/126] wip --- .github/workflows/osx-tests.yml | 18 +++++++++++------- test/conftest.py | 2 -- test/functional/tools_versions_test.py | 4 +++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 13c36683182..98f3abb1bb7 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -66,16 +66,16 @@ jobs: id: cache-cmake uses: actions/cache@v4 with: - path: $HOME/Applications/CMake - key: conan-cmake-v3.15.7-3.16.9-3.17.5-v3.19.7-3.23.1 + path: ${HOME}/Applications/CMake/3.15.7 + key: conan-cmake-3.15 - - name: Install CMake versions + - name: Build CMake old versions not available for arm if: steps.cache-cmake.outputs.cache-hit != 'true' run: | set -e - CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") - CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.1") + CMAKE_BUILD_VERSIONS=("3.15.7") + #CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") for version in "${CMAKE_BUILD_VERSIONS[@]}"; do echo "Compiling CMake version ${version} from source for ARM..." wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz @@ -90,6 +90,12 @@ jobs: rm -rf cmake-${version} cmake-${version}.tar.gz done + - name: Install universal CMake versions + if: steps.cache-cmake.outputs.cache-hit != 'true' + run: | + set -e + + CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.1") for version in "${CMAKE_PRECOMP_VERSIONS[@]}"; do echo "Downloading and installing precompiled universal CMake version ${version}..." wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz @@ -113,8 +119,6 @@ jobs: wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 chmod +x ${HOME}/Applications/bazel/${version}/bazel done - /Users/runner/Applications/bazel/6.3.2/bazel --version - /Users/runner/Applications/bazel/7.1.2/bazel --version - name: Run Test - ${{ matrix.test-type }} shell: bash diff --git a/test/conftest.py b/test/conftest.py index 2d9a51173d4..080b5fa7cb9 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -73,12 +73,10 @@ }, "3.16": { "path": {'Windows': 'C:/cmake/cmake-3.16.9-win64-x64/bin', - 'Darwin': '/Users/runner/Applications/CMake/3.16.9/bin', 'Linux': '/usr/share/cmake-3.16.9/bin'} }, "3.17": { "path": {'Windows': 'C:/cmake/cmake-3.17.5-win64-x64/bin', - 'Darwin': '/Users/runner/Applications/CMake/3.17.5/bin', 'Linux': '/usr/share/cmake-3.17.5/bin'} }, "3.19": { diff --git a/test/functional/tools_versions_test.py b/test/functional/tools_versions_test.py index 6e2947e380d..4f701bdc9e1 100644 --- a/test/functional/tools_versions_test.py +++ b/test/functional/tools_versions_test.py @@ -16,13 +16,15 @@ def test_default_cmake(self): client.run_command('cmake --version') default_cmake_version = tools_locations["cmake"]["default"] assert "cmake version {}".format(default_cmake_version) in client.out - + + @pytest.mark.skipif(platform.system() != "Darwin", reason="3.16 not installed in MacOS") @pytest.mark.tool("cmake", "3.16") def test_custom_cmake_3_16(self): client = TestClient() client.run_command('cmake --version') assert "cmake version 3.16" in client.out + @pytest.mark.skipif(platform.system() != "Darwin", reason="3.17 not installed in MacOS") @pytest.mark.tool("cmake", "3.17") def test_custom_cmake_3_17(self): client = TestClient() From 0f037c57ed26082d4ecba025a74e2c7f0bcce1ed Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 15:00:00 +0200 Subject: [PATCH 054/126] wip --- .github/workflows/osx-tests.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 98f3abb1bb7..5bd06191b9e 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -28,19 +28,6 @@ jobs: steps: - - name: Install default Xcode - run: | - sudo xcode-select -s /Applications/Xcode_15.4.app - sudo xcode-select --install || true - sudo xcodebuild -license accept - sudo xcodebuild -runFirstLaunch - xcodebuild -version - xcrun --show-sdk-path - xcrun --find clang - xcrun --find clang++ - xcrun -find cc - xcrun -find c++ - - name: Checkout code uses: actions/checkout@v4 @@ -126,6 +113,16 @@ jobs: export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin which cmake cmake --version + sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer + sudo xcode-select --install || true + sudo xcodebuild -license accept + sudo xcodebuild -runFirstLaunch + xcodebuild -version + xcrun --show-sdk-path + xcrun --find clang + xcrun --find clang++ + xcrun -find cc + xcrun -find c++ if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From 8b79f27891f23adaf72983d0972360ee663245a2 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 15:06:28 +0200 Subject: [PATCH 055/126] wip --- .github/workflows/osx-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 5bd06191b9e..6675f8549a1 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -110,7 +110,7 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + export PATH=${HOME}/Applications/CMake/3.19.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin which cmake cmake --version sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer @@ -123,6 +123,8 @@ jobs: xcrun --find clang++ xcrun -find cc xcrun -find c++ + #export CC=$(xcrun --find clang) + #export CXX=$(xcrun --find clang++) if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From 4b2c529d1ad861763a634eee4e08b04913b53096 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 15:07:17 +0200 Subject: [PATCH 056/126] wip --- .github/workflows/osx-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 6675f8549a1..63d3a60c890 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -117,6 +117,7 @@ jobs: sudo xcode-select --install || true sudo xcodebuild -license accept sudo xcodebuild -runFirstLaunch + xcode-select -p xcodebuild -version xcrun --show-sdk-path xcrun --find clang From b36d7419cd6166c65ea8e898f8e25687fdc3baa3 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 15:22:14 +0200 Subject: [PATCH 057/126] wip --- .github/workflows/osx-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 63d3a60c890..0c34b151532 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -64,7 +64,7 @@ jobs: CMAKE_BUILD_VERSIONS=("3.15.7") #CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") for version in "${CMAKE_BUILD_VERSIONS[@]}"; do - echo "Compiling CMake version ${version} from source for ARM..." + echo "Compiling CMake version ${version} from source for ARM..." wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz tar -xzf cmake-${version}.tar.gz cd cmake-${version} @@ -125,11 +125,11 @@ jobs: xcrun -find cc xcrun -find c++ #export CC=$(xcrun --find clang) - #export CXX=$(xcrun --find clang++) + #export CXX=$(xcrun --find clang++) if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional/toolchains/cmake --durations=20 + pytest test/functional/toolchains/cmake -v --durations=20 fi From d4e1a1b359609700f077754ba2eff5eb79d7c136 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 15:54:41 +0200 Subject: [PATCH 058/126] bump to cmake 3.23 some tests --- .github/workflows/osx-tests.yml | 2 +- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 +- test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py | 2 +- test/functional/toolchains/cmake/cmakedeps/test_link_order.py | 2 +- .../toolchains/cmake/test_cmake_toolchain_xcode_flags.py | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 0c34b151532..3526fda5a94 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -110,7 +110,7 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - export PATH=${HOME}/Applications/CMake/3.19.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin which cmake cmake --version sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 7472636a36e..45dd3eec6f5 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -42,7 +42,7 @@ def build(self): @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py index 71fe86d706a..672ce6fe4ff 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py @@ -561,7 +561,7 @@ def package_info(self): assert 'set(ZLIB_FIND_MODE "")' in contents -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_error_missing_build_type(matrix_client): # https://github.com/conan-io/conan/issues/11168 client = matrix_client diff --git a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py index d7d7ce901f1..0ecaaecb66d 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py @@ -332,7 +332,7 @@ def _run_and_get_lib_order(t, generator): @pytest.mark.parametrize("generator", [None, "Xcode"]) -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_cmake_deps(client, generator): if generator == "Xcode" and platform.system() != "Darwin": pytest.skip("Xcode is needed") diff --git a/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py b/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py index 3906fa918ca..0cfc20661eb 100644 --- a/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py +++ b/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py @@ -58,6 +58,7 @@ def test_cmake_apple_bitcode_arc_and_visibility_flags_enabled(op_system, os_vers @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") +@pytest.mark.tool("cmake", "3.19") @pytest.mark.parametrize("op_system,os_version,sdk,arch", [ ("watchOS", "8.1", "watchos", "armv7k"), ("tvOS", "13.2", "appletvos", "armv8") From e5c4bcdc9d10b1ac0ec4c1c7daca25e44e7f128a Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 15:55:35 +0200 Subject: [PATCH 059/126] wip --- .github/workflows/osx-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 3526fda5a94..ad26b2a1b48 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -131,5 +131,7 @@ jobs: elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional/toolchains/cmake -v --durations=20 + pytest test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py -v --durations=20 + pytest test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py -v --durations=20 + pytest test/functional/toolchains/cmake/cmakedeps/test_link_order.py -v --durations=20 fi From 37e9960283ed081f4d567ff469650f3ec49238b1 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:08:52 +0200 Subject: [PATCH 060/126] wip --- .github/workflows/osx-tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index ad26b2a1b48..ff07a7da11f 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -124,14 +124,14 @@ jobs: xcrun --find clang++ xcrun -find cc xcrun -find c++ - #export CC=$(xcrun --find clang) - #export CXX=$(xcrun --find clang++) + export CC=$(xcrun --find clang) + export CXX=$(xcrun --find clang++) if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py -v --durations=20 - pytest test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py -v --durations=20 - pytest test/functional/toolchains/cmake/cmakedeps/test_link_order.py -v --durations=20 + pytest test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py::test_apple_framework_xcode -v --durations=20 + pytest test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_error_missing_build_type -v --durations=20 + pytest test/functional/toolchains/cmake/cmakedeps/test_link_order.py::test_cmake_deps -v --durations=20 fi From e278b403463666fb263596817b2b25a7b3312a74 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:21:50 +0200 Subject: [PATCH 061/126] wip --- .github/workflows/osx-tests.yml | 61 +++++++++++++++++---------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index ff07a7da11f..f83d9eb0eb8 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -49,33 +49,33 @@ jobs: brew install xcodegen make libtool zlib autoconf automake ninja brew uninstall cmake || true - - name: Cache CMake installations - id: cache-cmake - uses: actions/cache@v4 - with: - path: ${HOME}/Applications/CMake/3.15.7 - key: conan-cmake-3.15 - - - name: Build CMake old versions not available for arm - if: steps.cache-cmake.outputs.cache-hit != 'true' - run: | - set -e - - CMAKE_BUILD_VERSIONS=("3.15.7") - #CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") - for version in "${CMAKE_BUILD_VERSIONS[@]}"; do - echo "Compiling CMake version ${version} from source for ARM..." - wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz - tar -xzf cmake-${version}.tar.gz - cd cmake-${version} - mkdir build && cd build - ../bootstrap --prefix=${HOME}/Applications/CMake/${version} -- -DCMAKE_USE_OPENSSL=ON - make -j$(sysctl -n hw.ncpu) - make install - ${HOME}/Applications/CMake/${version}/bin/cmake --version - cd ../../ - rm -rf cmake-${version} cmake-${version}.tar.gz - done + # - name: Cache CMake installations + # id: cache-cmake + # uses: actions/cache@v4 + # with: + # path: ${HOME}/Applications/CMake/3.15.7 + # key: conan-cmake-3.15 + + # - name: Build CMake old versions not available for arm + # if: steps.cache-cmake.outputs.cache-hit != 'true' + # run: | + # set -e + + # CMAKE_BUILD_VERSIONS=("3.15.7") + # #CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") + # for version in "${CMAKE_BUILD_VERSIONS[@]}"; do + # echo "Compiling CMake version ${version} from source for ARM..." + # wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz + # tar -xzf cmake-${version}.tar.gz + # cd cmake-${version} + # mkdir build && cd build + # ../bootstrap --prefix=${HOME}/Applications/CMake/${version} -- -DCMAKE_USE_OPENSSL=ON + # make -j$(sysctl -n hw.ncpu) + # make install + # ${HOME}/Applications/CMake/${version}/bin/cmake --version + # cd ../../ + # rm -rf cmake-${version} cmake-${version}.tar.gz + # done - name: Install universal CMake versions if: steps.cache-cmake.outputs.cache-hit != 'true' @@ -113,7 +113,8 @@ jobs: export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin which cmake cmake --version - sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer + sudo xcode-select --reset + sudo xcode-select -s /Applications/Xcode.app/Contents/Developer sudo xcode-select --install || true sudo xcodebuild -license accept sudo xcodebuild -runFirstLaunch @@ -124,8 +125,8 @@ jobs: xcrun --find clang++ xcrun -find cc xcrun -find c++ - export CC=$(xcrun --find clang) - export CXX=$(xcrun --find clang++) + #export CC=$(xcrun --find clang) + #export CXX=$(xcrun --find clang++) if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From a427aa7a2b0d306b01e66591b4f72e740ff9bb35 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:25:15 +0200 Subject: [PATCH 062/126] wip --- .github/workflows/osx-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index f83d9eb0eb8..5ae2e46a07b 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -110,15 +110,15 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - which cmake - cmake --version + #export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + #which cmake + #cmake --version sudo xcode-select --reset + sudo xcode-select -p sudo xcode-select -s /Applications/Xcode.app/Contents/Developer sudo xcode-select --install || true sudo xcodebuild -license accept sudo xcodebuild -runFirstLaunch - xcode-select -p xcodebuild -version xcrun --show-sdk-path xcrun --find clang From 7d1b2db881482b3cbd7c71e6cae800f0cd20ac3c Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:29:28 +0200 Subject: [PATCH 063/126] no spaces --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 45dd3eec6f5..b20ed2e1b0e 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -20,7 +20,7 @@ def package_info(self): self.cpp_info.frameworks.extend(['Foundation', 'CoreServices', 'CoreFoundation']) """) - t = TestClient() + t = TestClient(path_with_spaces=False) t.save({'conanfile.py': lib_conanfile}) t.run("create .") return t From 32e2406034ae3a972d770aab9f9b4b8f2b943bf5 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:39:57 +0200 Subject: [PATCH 064/126] wip --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index b20ed2e1b0e..9b782bf2146 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -42,7 +42,7 @@ def build(self): @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") -@pytest.mark.tool("cmake", "3.23") +#@pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) From 504c654de8ed37bf1086524f3d491388c37b5994 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:41:33 +0200 Subject: [PATCH 065/126] wip --- .github/workflows/osx-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 5ae2e46a07b..5816c3f1b0c 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -125,8 +125,8 @@ jobs: xcrun --find clang++ xcrun -find cc xcrun -find c++ - #export CC=$(xcrun --find clang) - #export CXX=$(xcrun --find clang++) + export CC=$(xcrun --find cc) + export CXX=$(xcrun -find c++) if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From 62372809dccb7d052d13c1fc42d12928dae19c96 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:43:24 +0200 Subject: [PATCH 066/126] wip --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 9b782bf2146..b20ed2e1b0e 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -42,7 +42,7 @@ def build(self): @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") -#@pytest.mark.tool("cmake", "3.23") +@pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) From ba7936a5a989835c3aadaf2367119ef42ea70736 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:48:20 +0200 Subject: [PATCH 067/126] wip --- .github/workflows/osx-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 5816c3f1b0c..d2a328d55ce 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -125,8 +125,8 @@ jobs: xcrun --find clang++ xcrun -find cc xcrun -find c++ - export CC=$(xcrun --find cc) - export CXX=$(xcrun -find c++) + export CC=/usr/bin/cc + export CXX=/usr/bin/c++ if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From 8ef7aef64db49a998a040fd42339e30972e2b583 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:51:56 +0200 Subject: [PATCH 068/126] wip --- conan/test/utils/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan/test/utils/tools.py b/conan/test/utils/tools.py index a1f98a39a90..866847c5593 100644 --- a/conan/test/utils/tools.py +++ b/conan/test/utils/tools.py @@ -76,7 +76,7 @@ os=Macos arch={arch_setting} compiler=apple-clang - compiler.version=13 + compiler.version=16 compiler.libcxx=libc++ build_type=Release """) From d492ea52e766771041219c59ed58b66b8979ac82 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:54:07 +0200 Subject: [PATCH 069/126] revert --- conan/test/utils/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan/test/utils/tools.py b/conan/test/utils/tools.py index 866847c5593..a1f98a39a90 100644 --- a/conan/test/utils/tools.py +++ b/conan/test/utils/tools.py @@ -76,7 +76,7 @@ os=Macos arch={arch_setting} compiler=apple-clang - compiler.version=16 + compiler.version=13 compiler.libcxx=libc++ build_type=Release """) From f444ea540d4b53235bf57f4c25355de47f27da63 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 16:54:31 +0200 Subject: [PATCH 070/126] bump --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index b20ed2e1b0e..50f94c9d5d5 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -45,7 +45,7 @@ def build(self): @pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" - cmake_minimum_required(VERSION 3.15) + cmake_minimum_required(VERSION 3.23) project(Testing CXX) find_package(foolib REQUIRED) message(">>> foolib_FRAMEWORKS_FOUND_DEBUG: ${foolib_FRAMEWORKS_FOUND_DEBUG}") From 1bc4952fa0f6144bf1fe290f27cf9d7425ae9727 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 17:05:25 +0200 Subject: [PATCH 071/126] wip --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 50f94c9d5d5..da37879ac09 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -45,7 +45,7 @@ def build(self): @pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" - cmake_minimum_required(VERSION 3.23) + cmake_minimum_required(VERSION 3.19) project(Testing CXX) find_package(foolib REQUIRED) message(">>> foolib_FRAMEWORKS_FOUND_DEBUG: ${foolib_FRAMEWORKS_FOUND_DEBUG}") @@ -89,7 +89,7 @@ def package_info(self): self.cpp_info.includedirs = [] """) cmake = textwrap.dedent(""" - cmake_minimum_required(VERSION 3.15) + cmake_minimum_required(VERSION 3.19) project(MyHello CXX) # set @rpaths for libraries to link against From c15abaa93562e3f9c376f25e5c121fbbe429b069 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 17:09:49 +0200 Subject: [PATCH 072/126] wip --- .github/workflows/osx-tests.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index d2a328d55ce..6bfffef1b49 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -113,20 +113,7 @@ jobs: #export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin #which cmake #cmake --version - sudo xcode-select --reset - sudo xcode-select -p - sudo xcode-select -s /Applications/Xcode.app/Contents/Developer - sudo xcode-select --install || true - sudo xcodebuild -license accept - sudo xcodebuild -runFirstLaunch - xcodebuild -version - xcrun --show-sdk-path - xcrun --find clang - xcrun --find clang++ - xcrun -find cc - xcrun -find c++ - export CC=/usr/bin/cc - export CXX=/usr/bin/c++ + sudo xcode-select --switch /Library/Developer/CommandLineTools if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From 7b1951358b135be0200b50e79f2982d4e14bf114 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 17:13:13 +0200 Subject: [PATCH 073/126] wip --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 6bfffef1b49..1ef945b8102 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -113,7 +113,7 @@ jobs: #export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin #which cmake #cmake --version - sudo xcode-select --switch /Library/Developer/CommandLineTools + sudo xcode-select --reset if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From c6e2bd0e2ae9f618b22d880c87a8cbbe1739cc3e Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 17:15:31 +0200 Subject: [PATCH 074/126] wip --- .github/workflows/osx-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 1ef945b8102..8539e176788 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -114,6 +114,8 @@ jobs: #which cmake #cmake --version sudo xcode-select --reset + echo $CC + echo $CXX if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From aa70cf76037fbc8cfecc528d450fcfc9e820e650 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 17:22:18 +0200 Subject: [PATCH 075/126] wip --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 8539e176788..1d5552aa6e2 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -113,7 +113,7 @@ jobs: #export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin #which cmake #cmake --version - sudo xcode-select --reset + sudo xcode-select -s /Applications/Xcode_16.app echo $CC echo $CXX if [ "${{ matrix.test-type }}" == "unittests" ]; then From b736192701a58063a10d70733c539276f6f5374c Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 17:50:17 +0200 Subject: [PATCH 076/126] output --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index da37879ac09..d4d2a8e5a55 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -55,7 +55,9 @@ def test_apple_framework_xcode(client): client.save({'conanfile.py': app_conanfile, 'CMakeLists.txt': app_cmakelists}) - client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode") + client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode", assert_error=True) + client.run_command("cat ./CMakeFiles/CMakeOutput.log") + client.run_command("cat ./CMakeFiles/CMakeError.log") assert "/System/Library/Frameworks/Foundation.framework;" in client.out assert "/System/Library/Frameworks/CoreServices.framework;" in client.out assert "/System/Library/Frameworks/CoreFoundation.framework" in client.out From 30fc36fd0c38a0dc24b7851b67ba709e5e10fb90 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 17:56:56 +0200 Subject: [PATCH 077/126] wip --- .github/workflows/osx-tests.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 1d5552aa6e2..97970644732 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -110,12 +110,7 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - #export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - #which cmake - #cmake --version - sudo xcode-select -s /Applications/Xcode_16.app - echo $CC - echo $CXX + export CODE_SIGN_IDENTITY="" if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then From 65781ebe39eb4d7b3193d4d43458589b2afaca22 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:01:07 +0200 Subject: [PATCH 078/126] wip --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index d4d2a8e5a55..da37879ac09 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -55,9 +55,7 @@ def test_apple_framework_xcode(client): client.save({'conanfile.py': app_conanfile, 'CMakeLists.txt': app_cmakelists}) - client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode", assert_error=True) - client.run_command("cat ./CMakeFiles/CMakeOutput.log") - client.run_command("cat ./CMakeFiles/CMakeError.log") + client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode") assert "/System/Library/Frameworks/Foundation.framework;" in client.out assert "/System/Library/Frameworks/CoreServices.framework;" in client.out assert "/System/Library/Frameworks/CoreFoundation.framework" in client.out From 7789d2229364ad0af3b4b2e3c5f1bfeab29df80f Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:06:12 +0200 Subject: [PATCH 079/126] add CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index da37879ac09..8319d302afd 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -47,6 +47,7 @@ def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.19) project(Testing CXX) + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") find_package(foolib REQUIRED) message(">>> foolib_FRAMEWORKS_FOUND_DEBUG: ${foolib_FRAMEWORKS_FOUND_DEBUG}") message(">>> foolib_FRAMEWORKS_FOUND_RELEASE: ${foolib_FRAMEWORKS_FOUND_RELEASE}") @@ -91,7 +92,7 @@ def package_info(self): cmake = textwrap.dedent(""" cmake_minimum_required(VERSION 3.19) project(MyHello CXX) - + # set @rpaths for libraries to link against SET(CMAKE_SKIP_RPATH FALSE) #SET(CMAKE_SKIP_BUILD_RPATH FALSE) From e0d55c2c315399449f4849af49dc6d318651b3eb Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:09:04 +0200 Subject: [PATCH 080/126] wip --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 8319d302afd..1e3abd1b3fd 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -56,7 +56,9 @@ def test_apple_framework_xcode(client): client.save({'conanfile.py': app_conanfile, 'CMakeLists.txt': app_cmakelists}) - client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode") + client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode", assert_error=True) + print(client.load("./CMakeFiles/CMakeOutput.log")) + print(client.load("./CMakeFiles/CMakeError.log")) assert "/System/Library/Frameworks/Foundation.framework;" in client.out assert "/System/Library/Frameworks/CoreServices.framework;" in client.out assert "/System/Library/Frameworks/CoreFoundation.framework" in client.out @@ -92,7 +94,7 @@ def package_info(self): cmake = textwrap.dedent(""" cmake_minimum_required(VERSION 3.19) project(MyHello CXX) - + # set @rpaths for libraries to link against SET(CMAKE_SKIP_RPATH FALSE) #SET(CMAKE_SKIP_BUILD_RPATH FALSE) From c51d11174a9dcc98f04bd8ca65c90e4b140d3bb1 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:33:09 +0200 Subject: [PATCH 081/126] wip --- .github/workflows/osx-tests.yml | 1 - .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 97970644732..3ce54c7cf1b 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -110,7 +110,6 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - export CODE_SIGN_IDENTITY="" if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 1e3abd1b3fd..cf9ba7f449b 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -47,6 +47,8 @@ def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.19) project(Testing CXX) + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO") + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") find_package(foolib REQUIRED) message(">>> foolib_FRAMEWORKS_FOUND_DEBUG: ${foolib_FRAMEWORKS_FOUND_DEBUG}") From be1f76599596c94ffed1558894d74f8f7c64bb9b Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:39:13 +0200 Subject: [PATCH 082/126] wip --- .github/workflows/osx-tests.yml | 2 +- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 3ce54c7cf1b..6e6a8975406 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -47,7 +47,7 @@ jobs: - name: Install homebrew dependencies run: | brew install xcodegen make libtool zlib autoconf automake ninja - brew uninstall cmake || true + #brew uninstall cmake || true # - name: Cache CMake installations # id: cache-cmake diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index cf9ba7f449b..ad28f39b1c6 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -42,7 +42,7 @@ def build(self): @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") -@pytest.mark.tool("cmake", "3.23") +#@pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.19) From 731e3765701155a608c8f1f56ae8e0f801d90168 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:47:45 +0200 Subject: [PATCH 083/126] update cmake 3.23 version --- .github/workflows/osx-tests.yml | 6 ++++-- test/conftest.py | 2 +- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 7 +++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 6e6a8975406..63f17069faf 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -47,7 +47,7 @@ jobs: - name: Install homebrew dependencies run: | brew install xcodegen make libtool zlib autoconf automake ninja - #brew uninstall cmake || true + brew uninstall cmake || true # - name: Cache CMake installations # id: cache-cmake @@ -82,7 +82,7 @@ jobs: run: | set -e - CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.1") + CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.5") for version in "${CMAKE_PRECOMP_VERSIONS[@]}"; do echo "Downloading and installing precompiled universal CMake version ${version}..." wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz @@ -110,6 +110,8 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | + #export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + #cmake --version if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then diff --git a/test/conftest.py b/test/conftest.py index 080b5fa7cb9..9d464ecdb31 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -86,7 +86,7 @@ }, "3.23": { "path": {'Windows': 'C:/cmake/cmake-3.23.1-win64-x64/bin', - 'Darwin': '/Users/runner/Applications/CMake/3.23.1/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.23.5/bin', 'Linux': "/usr/share/cmake-3.23.5/bin"} }, "3.28": { diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index ad28f39b1c6..ba754862da3 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -41,15 +41,14 @@ def build(self): """) +# needs at least 3.23.3 because of error with "empty identity" +# https://stackoverflow.com/questions/72746725/xcode-14-beta-cmake-not-able-to-resolve-cmake-c-compiler-and-cmake-cxx-compiler @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") -#@pytest.mark.tool("cmake", "3.23") +@pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.19) project(Testing CXX) - set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO") - set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") - set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") find_package(foolib REQUIRED) message(">>> foolib_FRAMEWORKS_FOUND_DEBUG: ${foolib_FRAMEWORKS_FOUND_DEBUG}") message(">>> foolib_FRAMEWORKS_FOUND_RELEASE: ${foolib_FRAMEWORKS_FOUND_RELEASE}") From 53b44332439c070fd60738036aae95284708f4e2 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:49:41 +0200 Subject: [PATCH 084/126] fix test --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index ba754862da3..6f097afcc60 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -57,9 +57,7 @@ def test_apple_framework_xcode(client): client.save({'conanfile.py': app_conanfile, 'CMakeLists.txt': app_cmakelists}) - client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode", assert_error=True) - print(client.load("./CMakeFiles/CMakeOutput.log")) - print(client.load("./CMakeFiles/CMakeError.log")) + client.run("build . -c tools.cmake.cmaketoolchain:generator=Xcode") assert "/System/Library/Frameworks/Foundation.framework;" in client.out assert "/System/Library/Frameworks/CoreServices.framework;" in client.out assert "/System/Library/Frameworks/CoreFoundation.framework" in client.out From 76c5b9d666909fec72391c9799acbdccc61062b6 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:52:54 +0200 Subject: [PATCH 085/126] wip --- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 4 ++-- test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py | 1 + test/functional/toolchains/cmake/cmakedeps/test_link_order.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 6f097afcc60..01d9419c348 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -47,7 +47,7 @@ def build(self): @pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" - cmake_minimum_required(VERSION 3.19) + cmake_minimum_required(VERSION 3.15) project(Testing CXX) find_package(foolib REQUIRED) message(">>> foolib_FRAMEWORKS_FOUND_DEBUG: ${foolib_FRAMEWORKS_FOUND_DEBUG}") @@ -91,7 +91,7 @@ def package_info(self): self.cpp_info.includedirs = [] """) cmake = textwrap.dedent(""" - cmake_minimum_required(VERSION 3.19) + cmake_minimum_required(VERSION 3.15) project(MyHello CXX) # set @rpaths for libraries to link against diff --git a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py index 672ce6fe4ff..31e55502a20 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py @@ -561,6 +561,7 @@ def package_info(self): assert 'set(ZLIB_FIND_MODE "")' in contents +# needs at least 3.23.3 because of error with "empty identity" @pytest.mark.tool("cmake", "3.23") def test_error_missing_build_type(matrix_client): # https://github.com/conan-io/conan/issues/11168 diff --git a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py index 0ecaaecb66d..cc7bf134173 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py @@ -331,6 +331,7 @@ def _run_and_get_lib_order(t, generator): return libs +# needs at least 3.23.3 because of error with "empty identity" @pytest.mark.parametrize("generator", [None, "Xcode"]) @pytest.mark.tool("cmake", "3.23") def test_cmake_deps(client, generator): From 367e84c5a5e5385277a64f7b87ff3bc8b1bad5f6 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 18:54:22 +0200 Subject: [PATCH 086/126] all tests --- .github/workflows/osx-tests.yml | 62 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 63f17069faf..0ac4d633245 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -49,33 +49,33 @@ jobs: brew install xcodegen make libtool zlib autoconf automake ninja brew uninstall cmake || true - # - name: Cache CMake installations - # id: cache-cmake - # uses: actions/cache@v4 - # with: - # path: ${HOME}/Applications/CMake/3.15.7 - # key: conan-cmake-3.15 - - # - name: Build CMake old versions not available for arm - # if: steps.cache-cmake.outputs.cache-hit != 'true' - # run: | - # set -e - - # CMAKE_BUILD_VERSIONS=("3.15.7") - # #CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") - # for version in "${CMAKE_BUILD_VERSIONS[@]}"; do - # echo "Compiling CMake version ${version} from source for ARM..." - # wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz - # tar -xzf cmake-${version}.tar.gz - # cd cmake-${version} - # mkdir build && cd build - # ../bootstrap --prefix=${HOME}/Applications/CMake/${version} -- -DCMAKE_USE_OPENSSL=ON - # make -j$(sysctl -n hw.ncpu) - # make install - # ${HOME}/Applications/CMake/${version}/bin/cmake --version - # cd ../../ - # rm -rf cmake-${version} cmake-${version}.tar.gz - # done + - name: Cache CMake installations + id: cache-cmake + uses: actions/cache@v4 + with: + path: ${HOME}/Applications/CMake/3.15.7 + key: conan-cmake-3.15 + + - name: Build CMake old versions not available for arm + if: steps.cache-cmake.outputs.cache-hit != 'true' + run: | + set -e + + CMAKE_BUILD_VERSIONS=("3.15.7") + #CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") + for version in "${CMAKE_BUILD_VERSIONS[@]}"; do + echo "Compiling CMake version ${version} from source for ARM..." + wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz + tar -xzf cmake-${version}.tar.gz + cd cmake-${version} + mkdir build && cd build + ../bootstrap --prefix=${HOME}/Applications/CMake/${version} -- -DCMAKE_USE_OPENSSL=ON + make -j$(sysctl -n hw.ncpu) + make install + ${HOME}/Applications/CMake/${version}/bin/cmake --version + cd ../../ + rm -rf cmake-${version} cmake-${version}.tar.gz + done - name: Install universal CMake versions if: steps.cache-cmake.outputs.cache-hit != 'true' @@ -110,14 +110,12 @@ jobs: - name: Run Test - ${{ matrix.test-type }} shell: bash run: | - #export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - #cmake --version + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + cmake --version if [ "${{ matrix.test-type }}" == "unittests" ]; then pytest test/unittests --durations=20 elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py::test_apple_framework_xcode -v --durations=20 - pytest test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py::test_error_missing_build_type -v --durations=20 - pytest test/functional/toolchains/cmake/cmakedeps/test_link_order.py::test_cmake_deps -v --durations=20 + pytest test/integration -v --durations=20 fi From 3d7016853bc0c89ecd6677feb098613ec75e7980 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 19:08:40 +0200 Subject: [PATCH 087/126] some cleaning --- .github/workflows/osx-tests.yml | 4 +--- .../toolchains/cmake/cmakedeps/test_apple_frameworks.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 0ac4d633245..65ccf41a1a8 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -5,7 +5,6 @@ on: branches: - develop2 - release/* - - ci/gh-action-osx pull_request: branches: - '*' @@ -19,7 +18,7 @@ jobs: strategy: fail-fast: true matrix: - test-type: [functional] + test-type: [unittests, integration, functional] python-version: ['3.9'] runs-on: macos-14 @@ -62,7 +61,6 @@ jobs: set -e CMAKE_BUILD_VERSIONS=("3.15.7") - #CMAKE_BUILD_VERSIONS=("3.15.7" "3.16.9" "3.17.5") for version in "${CMAKE_BUILD_VERSIONS[@]}"; do echo "Compiling CMake version ${version} from source for ARM..." wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 01d9419c348..f1cc092bac2 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -20,7 +20,7 @@ def package_info(self): self.cpp_info.frameworks.extend(['Foundation', 'CoreServices', 'CoreFoundation']) """) - t = TestClient(path_with_spaces=False) + t = TestClient() t.save({'conanfile.py': lib_conanfile}) t.run("create .") return t From b3e8e3ca623e69bef8c795e060fee51a7d4697c0 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 19:17:52 +0200 Subject: [PATCH 088/126] some fixes --- .github/workflows/osx-tests.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 65ccf41a1a8..4c63b5e4812 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -18,12 +18,11 @@ jobs: strategy: fail-fast: true matrix: - test-type: [unittests, integration, functional] python-version: ['3.9'] runs-on: macos-14 - name: Conan ${{ matrix.test-type }} (${{ matrix.python-version }}) + name: Conan Tests (${{ matrix.python-version }}) steps: @@ -43,6 +42,16 @@ jobs: pip install -r conans/requirements_dev.txt pip install meson + - name: Run Test - unittests & integration + shell: bash + run: | + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + cmake --version + pytest test/unittests --durations=20 + pytest test/integration --durations=20 + + # Install dependencies for functional tests + - name: Install homebrew dependencies run: | brew install xcodegen make libtool zlib autoconf automake ninja @@ -76,7 +85,6 @@ jobs: done - name: Install universal CMake versions - if: steps.cache-cmake.outputs.cache-hit != 'true' run: | set -e @@ -105,15 +113,9 @@ jobs: chmod +x ${HOME}/Applications/bazel/${version}/bazel done - - name: Run Test - ${{ matrix.test-type }} + - name: Run Test - functional shell: bash run: | export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version - if [ "${{ matrix.test-type }}" == "unittests" ]; then - pytest test/unittests --durations=20 - elif [ "${{ matrix.test-type }}" == "integration" ]; then - pytest test/integration --durations=20 - elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/integration -v --durations=20 - fi + pytest test/functional -v --durations=20 From 6891040702a41abcd6172741ea05ae15cd25930f Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 19:20:38 +0200 Subject: [PATCH 089/126] dont need cmake for this --- .github/workflows/osx-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 4c63b5e4812..8d99b5c1740 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -45,8 +45,6 @@ jobs: - name: Run Test - unittests & integration shell: bash run: | - export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - cmake --version pytest test/unittests --durations=20 pytest test/integration --durations=20 From 83c289aa695442121eb4a24a7ef2b680a1b30abe Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 19:21:33 +0200 Subject: [PATCH 090/126] minor changes --- .github/workflows/osx-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 8d99b5c1740..1dc24b77a53 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -42,6 +42,9 @@ jobs: pip install -r conans/requirements_dev.txt pip install meson + - name: Uninstall default CMake + run: brew uninstall cmake || true + - name: Run Test - unittests & integration shell: bash run: | @@ -53,7 +56,6 @@ jobs: - name: Install homebrew dependencies run: | brew install xcodegen make libtool zlib autoconf automake ninja - brew uninstall cmake || true - name: Cache CMake installations id: cache-cmake From 23d39aa635736d509e4a0abcc3f1f2f74bed06c4 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 19:40:00 +0200 Subject: [PATCH 091/126] better workflow --- .github/workflows/osx-tests.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 1dc24b77a53..6f315e02e34 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -19,10 +19,11 @@ jobs: fail-fast: true matrix: python-version: ['3.9'] + test-type: [unittests, integration, functional] runs-on: macos-14 - name: Conan Tests (${{ matrix.python-version }}) + name: Conan (${{ matrix.test-type }}) (${{ matrix.python-version }}) steps: @@ -45,27 +46,20 @@ jobs: - name: Uninstall default CMake run: brew uninstall cmake || true - - name: Run Test - unittests & integration - shell: bash - run: | - pytest test/unittests --durations=20 - pytest test/integration --durations=20 - - # Install dependencies for functional tests - - name: Install homebrew dependencies + if: matrix.test-type == 'functional' run: | brew install xcodegen make libtool zlib autoconf automake ninja - name: Cache CMake installations - id: cache-cmake + if: matrix.test-type == 'functional' uses: actions/cache@v4 with: path: ${HOME}/Applications/CMake/3.15.7 key: conan-cmake-3.15 - name: Build CMake old versions not available for arm - if: steps.cache-cmake.outputs.cache-hit != 'true' + if: matrix.test-type == 'functional' && steps.cache-cmake.outputs.cache-hit != 'true' run: | set -e @@ -85,6 +79,7 @@ jobs: done - name: Install universal CMake versions + if: matrix.test-type == 'functional' run: | set -e @@ -105,6 +100,7 @@ jobs: done - name: Install Bazel versions + if: matrix.test-type == 'functional' run: | set -e for version in 6.3.2 7.1.2; do @@ -113,9 +109,14 @@ jobs: chmod +x ${HOME}/Applications/bazel/${version}/bazel done - - name: Run Test - functional - shell: bash + - name: Run Tests run: | - export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - cmake --version - pytest test/functional -v --durations=20 + if [ "${{ matrix.test-type }}" == "unittests" ]; then + pytest test/unittests --durations=20 + elif [ "${{ matrix.test-type }}" == "integration" ]; then + pytest test/integration --durations=20 + elif [ "${{ matrix.test-type }}" == "functional" ]; then + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + cmake --version + pytest test/functional -v --durations=20 + fi From c16b4378e5f19c6971f4d69fd513af8cfbd06f2c Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 19:40:45 +0200 Subject: [PATCH 092/126] fix tests --- test/functional/tools_versions_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/tools_versions_test.py b/test/functional/tools_versions_test.py index 4f701bdc9e1..91617ae3449 100644 --- a/test/functional/tools_versions_test.py +++ b/test/functional/tools_versions_test.py @@ -17,14 +17,14 @@ def test_default_cmake(self): default_cmake_version = tools_locations["cmake"]["default"] assert "cmake version {}".format(default_cmake_version) in client.out - @pytest.mark.skipif(platform.system() != "Darwin", reason="3.16 not installed in MacOS") + @pytest.mark.skipif(platform.system() == "Darwin", reason="3.16 not installed in MacOS") @pytest.mark.tool("cmake", "3.16") def test_custom_cmake_3_16(self): client = TestClient() client.run_command('cmake --version') assert "cmake version 3.16" in client.out - @pytest.mark.skipif(platform.system() != "Darwin", reason="3.17 not installed in MacOS") + @pytest.mark.skipif(platform.system() == "Darwin", reason="3.17 not installed in MacOS") @pytest.mark.tool("cmake", "3.17") def test_custom_cmake_3_17(self): client = TestClient() From 89109967794d1b990d64e2b9fb853b581a0b1d41 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 19:41:17 +0200 Subject: [PATCH 093/126] more fixes --- test/functional/layout/test_editable_cmake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/layout/test_editable_cmake.py b/test/functional/layout/test_editable_cmake.py index 02da2d79672..3489be109c7 100644 --- a/test/functional/layout/test_editable_cmake.py +++ b/test/functional/layout/test_editable_cmake.py @@ -91,7 +91,7 @@ def test_editable_cmake_linux(generator): @pytest.mark.skipif(platform.system() != "Darwin", reason="Requires Macos") @pytest.mark.parametrize("generator", [None, "Ninja", "Xcode"]) -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_editable_cmake_osx(generator): editable_cmake(generator) @@ -154,6 +154,6 @@ def test_editable_cmake_linux_exe(generator): @pytest.mark.skipif(platform.system() != "Darwin", reason="Requires Macos") @pytest.mark.parametrize("generator", [None, "Ninja", "Xcode"]) -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_editable_cmake_osx_exe(generator): editable_cmake_exe(generator) From 99a7f9c5fe6c405a270c6c9d90eb012ac7c84943 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 20:17:34 +0200 Subject: [PATCH 094/126] update catalyst test --- .../toolchains/gnu/autotools/test_apple_toolchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py b/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py index 9cfd841a815..8ae7e9152e2 100644 --- a/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py +++ b/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py @@ -92,12 +92,12 @@ def test_catalyst(arch): include(default) [settings] os = Macos - os.version = 14.0 + os.version = 14.7 os.subsystem = catalyst os.subsystem.ios_version = 16.1 arch = {arch} [buildenv] - DEVELOPER_DIR=/Applications/conan/xcode/15.1 + DEVELOPER_DIR=/Applications/Xcode_15.4.app/Contents/Developer """).format(arch=arch) t = TestClient() From 951bec53e6ba4005271003dec5a5d8c4b64cf0d6 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 20:20:22 +0200 Subject: [PATCH 095/126] check test --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 6f315e02e34..0c9afd3c0b6 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -118,5 +118,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "functional" ]; then export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version - pytest test/functional -v --durations=20 + pytest test/functional/toolchains/gnu/autotools/test_apple_toolchain.py -v --durations=20 fi From 05681ed14c6ee3e0ddc75338a565f0a9a5ed5a23 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 20:26:17 +0200 Subject: [PATCH 096/126] run all --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 0c9afd3c0b6..6f315e02e34 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -118,5 +118,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "functional" ]; then export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version - pytest test/functional/toolchains/gnu/autotools/test_apple_toolchain.py -v --durations=20 + pytest test/functional -v --durations=20 fi From e377f7bc6c210a33603ff02d3735c15d9ee2d0aa Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 10 Oct 2024 21:42:22 +0200 Subject: [PATCH 097/126] fix tests --- .../functional/toolchains/gnu/autotools/test_apple_toolchain.py | 2 +- test/functional/toolchains/meson/_base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py b/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py index 8ae7e9152e2..cc14237219c 100644 --- a/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py +++ b/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py @@ -92,7 +92,7 @@ def test_catalyst(arch): include(default) [settings] os = Macos - os.version = 14.7 + os.version = 14.6 os.subsystem = catalyst os.subsystem.ios_version = 16.1 arch = {arch} diff --git a/test/functional/toolchains/meson/_base.py b/test/functional/toolchains/meson/_base.py index df22c417a51..4d2d8c5a896 100644 --- a/test/functional/toolchains/meson/_base.py +++ b/test/functional/toolchains/meson/_base.py @@ -23,7 +23,7 @@ def _check_binary(self): if platform.system() == "Darwin": self.assertIn(f"main {arch_macro['gcc'][host_arch]} defined", self.t.out) self.assertIn("main __apple_build_version__", self.t.out) - self.assertIn("main __clang_major__13", self.t.out) + self.assertIn("main __clang_major__15", self.t.out) # TODO: check why __clang_minor__ seems to be not defined in XCode 12 # commented while migrating to XCode12 CI # self.assertIn("main __clang_minor__0", self.t.out) From f0d3ac721afaaeab765421ca931cd9b681239f66 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 07:24:32 +0200 Subject: [PATCH 098/126] xfail test --- .../toolchains/gnu/test_v2_autotools_template.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/functional/toolchains/gnu/test_v2_autotools_template.py b/test/functional/toolchains/gnu/test_v2_autotools_template.py index d4ee48731f3..68271517d0c 100644 --- a/test/functional/toolchains/gnu/test_v2_autotools_template.py +++ b/test/functional/toolchains/gnu/test_v2_autotools_template.py @@ -118,8 +118,10 @@ def test_autotools_relocatable_libs_darwin(): assert "hello/0.1: Hello World Release!" in client.out +# FIXME: investigate this test @pytest.mark.skipif(platform.system() not in ["Darwin"], reason="Requires Autotools") @pytest.mark.tool("autotools") +@pytest.mark.xfail(reason="This test is failing for newer MacOS versions, but used to pass in the ci") def test_autotools_relocatable_libs_darwin_downloaded(): client = TestClient(default_server_user=True, path_with_spaces=False) client2 = TestClient(servers=client.servers, path_with_spaces=False) @@ -139,7 +141,7 @@ class GreetConan(ConanFile): version = "1.0" settings = "os", "compiler", "build_type", "arch" exports_sources = "configure.ac", "Makefile.am", "main.cpp" - generators = "AutotoolsDeps", "AutotoolsToolchain" + generators = "AutotoolsDeps", "AutotoolsToolchain", "VirtualRunEnv" def requirements(self): self.requires("hello/0.1") @@ -181,7 +183,12 @@ def build(self): client2.run("install . -o hello/*:shared=True -r default") client2.run("build . -o hello/*:shared=True -r default") + # for some reason this is failing for newer macos + # although -Wl,-rpath -Wl, if passed to set the rpath when building + # it fails with LC_RPATH's not found client2.run_command("build-release/greet") + # activating the environment should not be needed as the rpath is set when linking greet + #client2.run_command(". build-release/conan/conanrun.sh && build-release/greet") assert "Hello World Release!" in client2.out From b127412252d2d770d6e1844ec56f6ff6411d5ba4 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 07:31:40 +0200 Subject: [PATCH 099/126] add id --- .github/workflows/osx-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 6f315e02e34..84d61d97ce7 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -53,6 +53,7 @@ jobs: - name: Cache CMake installations if: matrix.test-type == 'functional' + id: cache-cmake uses: actions/cache@v4 with: path: ${HOME}/Applications/CMake/3.15.7 From 9b8f2472c6ffa85cca55e28c48b660569ca44c21 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 07:34:49 +0200 Subject: [PATCH 100/126] fix cache? --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 84d61d97ce7..414828afdff 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -56,7 +56,7 @@ jobs: id: cache-cmake uses: actions/cache@v4 with: - path: ${HOME}/Applications/CMake/3.15.7 + path: ${{ env.HOME }}/Applications/CMake/3.15.7 key: conan-cmake-3.15 - name: Build CMake old versions not available for arm From bbc62b7a5c0a51c0f68063976201ec047cadb46a Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 07:35:41 +0200 Subject: [PATCH 101/126] test cache --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 414828afdff..68dcd1960a3 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -119,5 +119,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "functional" ]; then export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version - pytest test/functional -v --durations=20 + #pytest test/functional -v --durations=20 fi From 739a3476a9602ce50564943875f3664e4146a6ae Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 07:41:11 +0200 Subject: [PATCH 102/126] testing cache --- .github/workflows/osx-tests.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 68dcd1960a3..841627aa447 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -56,7 +56,7 @@ jobs: id: cache-cmake uses: actions/cache@v4 with: - path: ${{ env.HOME }}/Applications/CMake/3.15.7 + path: ${{ runner.home }}/Applications/CMake/3.15.7 key: conan-cmake-3.15 - name: Build CMake old versions not available for arm @@ -110,14 +110,14 @@ jobs: chmod +x ${HOME}/Applications/bazel/${version}/bazel done - - name: Run Tests - run: | - if [ "${{ matrix.test-type }}" == "unittests" ]; then - pytest test/unittests --durations=20 - elif [ "${{ matrix.test-type }}" == "integration" ]; then - pytest test/integration --durations=20 - elif [ "${{ matrix.test-type }}" == "functional" ]; then - export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - cmake --version - #pytest test/functional -v --durations=20 - fi + # - name: Run Tests + # run: | + # if [ "${{ matrix.test-type }}" == "unittests" ]; then + # pytest test/unittests --durations=20 + # elif [ "${{ matrix.test-type }}" == "integration" ]; then + # pytest test/integration --durations=20 + # elif [ "${{ matrix.test-type }}" == "functional" ]; then + # export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + # cmake --version + # pytest test/functional -v --durations=20 + # fi From 405781483fe514c43f585b199ffaa498e3850f53 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 07:43:37 +0200 Subject: [PATCH 103/126] use ~ --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 841627aa447..c518fd3052b 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -56,7 +56,7 @@ jobs: id: cache-cmake uses: actions/cache@v4 with: - path: ${{ runner.home }}/Applications/CMake/3.15.7 + path: ~/Applications/CMake/3.15.7 key: conan-cmake-3.15 - name: Build CMake old versions not available for arm From 9a0febe173c613f5531bbe2c6f8a32c0696ce4c5 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 07:53:54 +0200 Subject: [PATCH 104/126] more things in cache --- .github/workflows/osx-tests.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index c518fd3052b..8bb30efc6a5 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -51,19 +51,23 @@ jobs: run: | brew install xcodegen make libtool zlib autoconf automake ninja - - name: Cache CMake installations + - name: Cache CMake and Bazel installations if: matrix.test-type == 'functional' - id: cache-cmake + id: cache-tools uses: actions/cache@v4 with: - path: ~/Applications/CMake/3.15.7 - key: conan-cmake-3.15 - - - name: Build CMake old versions not available for arm - if: matrix.test-type == 'functional' && steps.cache-cmake.outputs.cache-hit != 'true' + path: | + ~/Applications/CMake/3.15.7 + ~/Applications/CMake/3.19.7 + ~/Applications/CMake/3.23.5 + ~/Applications/bazel/6.3.2 + ~/Applications/bazel/7.1.2 + key: conan-tools-cache + + - name: Build CMake old versions not available for ARM + if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' run: | set -e - CMAKE_BUILD_VERSIONS=("3.15.7") for version in "${CMAKE_BUILD_VERSIONS[@]}"; do echo "Compiling CMake version ${version} from source for ARM..." @@ -80,10 +84,9 @@ jobs: done - name: Install universal CMake versions - if: matrix.test-type == 'functional' + if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' run: | set -e - CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.5") for version in "${CMAKE_PRECOMP_VERSIONS[@]}"; do echo "Downloading and installing precompiled universal CMake version ${version}..." @@ -101,7 +104,7 @@ jobs: done - name: Install Bazel versions - if: matrix.test-type == 'functional' + if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' run: | set -e for version in 6.3.2 7.1.2; do From e939f8a7b0f510753134e43302202ac96a7a4398 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 08:01:17 +0200 Subject: [PATCH 105/126] wip --- .github/workflows/osx-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 8bb30efc6a5..46c4021a057 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -113,6 +113,10 @@ jobs: chmod +x ${HOME}/Applications/bazel/${version}/bazel done + - name: Run Tests + run: | + pytest test/unittests --durations=20 + # - name: Run Tests # run: | # if [ "${{ matrix.test-type }}" == "unittests" ]; then From 893068e474e9156fcd9f4890a9142ccc8e547c99 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 08:04:46 +0200 Subject: [PATCH 106/126] test paralell run --- .github/workflows/osx-tests.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 46c4021a057..adf21169eb4 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -115,16 +115,14 @@ jobs: - name: Run Tests run: | - pytest test/unittests --durations=20 - - # - name: Run Tests - # run: | - # if [ "${{ matrix.test-type }}" == "unittests" ]; then - # pytest test/unittests --durations=20 - # elif [ "${{ matrix.test-type }}" == "integration" ]; then - # pytest test/integration --durations=20 - # elif [ "${{ matrix.test-type }}" == "functional" ]; then - # export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - # cmake --version - # pytest test/functional -v --durations=20 - # fi + NUM_CPUS=$(sysctl -n hw.ncpu) + echo "Number of CPUs available: $NUM_CPUS" + if [ "${{ matrix.test-type }}" == "unittests" ]; then + pytest test/unittests --durations=20 -n $NUM_CPUS + elif [ "${{ matrix.test-type }}" == "integration" ]; then + pytest test/integration --durations=20 -n $NUM_CPUS + elif [ "${{ matrix.test-type }}" == "functional" ]; then + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + cmake --version + pytest test/functional -v --durations=20 -n $NUM_CPUS + fi From 36f50a4530d841b5a1b6f3cb1591e56113995436 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 08:06:55 +0200 Subject: [PATCH 107/126] remove -v --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index adf21169eb4..66a748b9e36 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -124,5 +124,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "functional" ]; then export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version - pytest test/functional -v --durations=20 -n $NUM_CPUS + pytest test/functional --durations=20 -n $NUM_CPUS fi From 5e0fdaeec78570472a021f1cf0cc1cf5a90fe09f Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 08:09:52 +0200 Subject: [PATCH 108/126] more caching --- .github/workflows/osx-tests.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 66a748b9e36..a8b8c845d12 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -35,6 +35,13 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Cache pip packages + id: cache-pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('conans/requirements*.txt') }} + - name: Install Python requirements run: | pip install --upgrade pip @@ -46,6 +53,13 @@ jobs: - name: Uninstall default CMake run: brew uninstall cmake || true + - name: Cache Homebrew packages + id: cache-brew + uses: actions/cache@v4 + with: + path: ~/Library/Caches/Homebrew + key: ${{ runner.os }}-brew + - name: Install homebrew dependencies if: matrix.test-type == 'functional' run: | @@ -62,7 +76,7 @@ jobs: ~/Applications/CMake/3.23.5 ~/Applications/bazel/6.3.2 ~/Applications/bazel/7.1.2 - key: conan-tools-cache + key: ${{ runner.os }}-conan-tools-cache - name: Build CMake old versions not available for ARM if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' From 5be2b5b8b5dd3bc2bc171b82ad32c347e95f51ca Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 08:51:11 +0200 Subject: [PATCH 109/126] remove jenkins --- .ci/__init__.py | 0 .ci/bump_dev_version.py | 22 ----- .ci/jenkins/testsv2.jenkins | 184 ------------------------------------ 3 files changed, 206 deletions(-) delete mode 100644 .ci/__init__.py delete mode 100644 .ci/bump_dev_version.py delete mode 100644 .ci/jenkins/testsv2.jenkins diff --git a/.ci/__init__.py b/.ci/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.ci/bump_dev_version.py b/.ci/bump_dev_version.py deleted file mode 100644 index e3f802833ea..00000000000 --- a/.ci/bump_dev_version.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -import time - - -def replace_in_file(file_path, search, replace): - with open(file_path, "r") as handle: - content = handle.read() - if search not in content: - raise Exception("Incorrect development version in conans/__init__.py") - content = content.replace(search, replace) - content = content.encode("utf-8") - with open(file_path, "wb") as handle: - handle.write(content) - -def bump_dev(): - vfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../conans/__init__.py") - snapshot = "%s" % int(time.time()) - replace_in_file(vfile, "-dev'", "-dev%s'" % snapshot) - - -if __name__ == "__main__": - bump_dev() diff --git a/.ci/jenkins/testsv2.jenkins b/.ci/jenkins/testsv2.jenkins deleted file mode 100644 index 01bc871790c..00000000000 --- a/.ci/jenkins/testsv2.jenkins +++ /dev/null @@ -1,184 +0,0 @@ -def branchName = env.BRANCH_NAME -def jobName = env.JOB_NAME - -void cancelPrevious() { - stage("Cancelling previous") { - def buildNumber = env.BUILD_NUMBER as int - if (buildNumber > 1) milestone(buildNumber - 1) - milestone(buildNumber) - } -} - -String getTempFolder(String nodeName) { - if (nodeName == "Windows") { return "C:/J/t_v2/" } - return "/tmp/" -} - -List getConfigurations(String moduleName, String branchName, String jobName) { - def configs = [] - - String LinuxNode - if (moduleName == "test/unittests" || moduleName == "test/integration") { - LinuxNode = "LinuxUnittests" - } else if (moduleName == "test/functional") { - LinuxNode = "LinuxFunctional" - } - - configs.add([node: LinuxNode, pyvers: ["PY312"]]) - - if (branchName =~ /(^PR-.*)/) { - configs.add([node: LinuxNode, pyvers: ["PY38"]]) - configs.add([node: "Windows", pyvers: ["PY38"]]) - configs.add([node: "M2Macos", pyvers: ["PY38"]]) - } - else if (jobName == "ConanNightlyv2" || branchName =~ /^release.*/) { - configs.add([node: LinuxNode, pyvers: ["PY36", "PY38"]]) - configs.add([node: "Windows", pyvers: ["PY36", "PY38"]]) - configs.add([node: "M2Macos", pyvers: ["PY36", "PY38"]]) - } - else if (branchName == "develop2") { - configs.add([node: LinuxNode, pyvers: ["PY36", "PY38"]]) - configs.add([node: "Windows", pyvers: ["PY36", "PY38"]]) - configs.add([node: "M2Macos", pyvers: ["PY36", "PY38"]]) - } - return configs -} - -boolean shouldTestServer(String moduleName) { - // run conan_server --help after running functional tests - if (moduleName == "test/functional") { - return true - } - return false -} - -private Closure runTests(String nodeName, String pythonVersion, String module) { - def ret = { - node(nodeName) { - stage("${nodeName} - ${pythonVersion}") { - def scmVars = checkout scm - def commit = scmVars["GIT_COMMIT"].substring(0, 4) - def workDir = getTempFolder(nodeName) + "${commit}/${pythonVersion}/" - def venvName = "env_${env.BUILD_NUMBER}_${pythonVersion}_${commit}" - def pipArguments = "--no-cache-dir --timeout 30" - def pipInstalls = "python -m pip install -r conans/requirements.txt ${pipArguments} && " + - "python -m pip install -r conans/requirements_server.txt ${pipArguments} && " + - "python -m pip install -r conans/requirements_dev.txt ${pipArguments} && " + - "python -m pip install meson ${pipArguments} && " - def conanToolInstall = "python -m pip install . && conan --version && conan --help && python --version && " - def launchTests = "python -m pytest ${module} -n=4 --durations=20 -rs" - if (shouldTestServer(module)) { - def rm = (nodeName == "Windows") ? "del" : "rm" - def mv = (nodeName == "Windows") ? "move" : "mv" - def conanServerToolInstall = "${rm} setup.py && ${mv} setup_server.py setup.py && python -m pip install . && conan_server --help" - launchTests = launchTests + ' && ' + conanServerToolInstall - } - if (nodeName.indexOf("Linux") >= 0) { - try { - // we only test scons in Linux - pipInstalls = pipInstalls + "python -m pip install scons ${pipArguments} && " - def sourcedir = "/home/conan/" - def pyenvdir = "${sourcedir}.pyenv" - def launchCommand = "export PYENV_ROOT=${pyenvdir} && " + - "export PATH=\"${pyenvdir}/versions/\$${pythonVersion}/bin:${pyenvdir}/bin:\$PATH\" && " + - "pyenv global \$${pythonVersion} && " + - pipInstalls + - conanToolInstall + - launchTests - sh(script: launchCommand) - } finally {} - } else if (nodeName == "M2Macos") { - def localDir = "/Users/jenkins" - withEnv(["CONAN_TEST_FOLDER=${workDir}", "PY27=2.7.18", "PY36=3.6.15", "PY38=3.8.12", "PY39=3.9.10", - "PYENV_ROOT=${localDir}/.pyenv", "PATH+EXTRA=${localDir}/.pyenv/shims:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"]) { - try { - sh(script: "mkdir -p ${workDir}") - def pythonLocation = "${localDir}/.pyenv/versions/\$${pythonVersion}/bin/python" - def configVenv = "${pythonLocation} -m virtualenv --python ${pythonLocation} ${workDir}${venvName} && " + - "source ${workDir}${venvName}/bin/activate && python --version && " - def launchCommand = configVenv + pipInstalls + conanToolInstall + launchTests - sh(script: launchCommand) - } finally { - sh(script: "rm -rf ${workDir}") - } - } - } else if (nodeName == "Windows") { - withEnv(["CONAN_TEST_FOLDER=${workDir}", "CONAN_BASH_PATH=c:/tools/msys64/usr/bin/bash", - "PY27=Python27", "PY36=Python36", "PY38=Python38-64"]) { - try { - bat(script: "if not exist \"${workDir}\" mkdir \"${workDir}\"") - def pythonLocation = "C:/%${pythonVersion}%/python.exe" - def configVenv = "virtualenv --python ${pythonLocation} ${workDir}${venvName} && " + - "${workDir}${venvName}/Scripts/activate && python --version && " - def launchCommand = configVenv + pipInstalls + conanToolInstall + launchTests - bat(script: launchCommand) - } finally { - bat(script: "rd /s /q \"${workDir}\"") - } - } - } - cleanWs() - } - } - } - return ret -} - -void runTestsModule(String moduleName, String branchName, String jobName) { - def configs = getConfigurations(moduleName, branchName, jobName) - def paralellRuns = [:] - configs.each { config -> - def testKind = moduleName.split("/").last() - config["pyvers"].each { pyver -> - paralellRuns["${testKind} - ${config['node']} - ${pyver}"] = runTests(config["node"], pyver, moduleName) - } - } - parallel(paralellRuns) -} - -def testModules = ["test/unittests", "test/integration", "test/functional"] - -void deployToPypiTest() { - node("LinuxFunctional") { - try { - def scmVars = checkout scm - checkout scm - stage("Deploy conan to pypitesting") { - withCredentials([usernamePassword(credentialsId: 'PYPITEST_CONAN_CREDENTIALS', usernameVariable: 'TWINE_USERNAME', passwordVariable: 'TWINE_PASSWORD')]) { - def deployConan = "python -m pip install twine && " + - "python .ci/bump_dev_version.py && " + - "rm -rf dist/ && python setup.py sdist && " + - "python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*" - sh(script: deployConan) - } - } - stage("Deploy conan-server to pypitesting") { - withCredentials([usernamePassword(credentialsId: 'PYPITEST_CONAN_SERVER_CREDENTIALS', usernameVariable: 'TWINE_USERNAME', passwordVariable: 'TWINE_PASSWORD')]) { - def deployServer = "rm -rf dist/ rm setup.py && mv setup_server.py setup.py && python setup.py sdist && " + - "python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*" - sh(script: deployServer) - } - } - } finally {} - } -} - -try { - cancelPrevious() - - testModules.each { moduleName -> - runTestsModule(moduleName, branchName, jobName) - } - - if (branchName == "develop2") { - deployToPypiTest() - } -} -catch(e){ - if (branchName == "develop2") { - def subject = "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${env.BUILD_URL}), Conan Branch: ${branchName}" - slackSend (color: '#FF0000', message: summary) - } - throw e -} From 0943c22681d60560c6ee2449308b1cb6f231652c Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 11:57:03 +0200 Subject: [PATCH 110/126] use macos 13 --- .github/workflows/osx-tests.yml | 2 +- test/functional/toolchains/apple/test_xcodetoolchain.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index a8b8c845d12..97b25da98c2 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -21,7 +21,7 @@ jobs: python-version: ['3.9'] test-type: [unittests, integration, functional] - runs-on: macos-14 + runs-on: macos-13 name: Conan (${{ matrix.test-type }}) (${{ matrix.python-version }}) diff --git a/test/functional/toolchains/apple/test_xcodetoolchain.py b/test/functional/toolchains/apple/test_xcodetoolchain.py index cdbbe7a8998..fb1985e64a0 100644 --- a/test/functional/toolchains/apple/test_xcodetoolchain.py +++ b/test/functional/toolchains/apple/test_xcodetoolchain.py @@ -80,7 +80,7 @@ def package_info(self): client.run_command("xcodegen generate") - sdk_version = "14.5" + sdk_version = "14.2" settings = "-s arch=x86_64 -s os.sdk_version={} -s compiler.cppstd={} " \ "-s compiler.libcxx=libc++ -s os.version={} " \ "-c tools.build.cross_building:can_run=True " \ From c5b9cac310fe10bd590456a4de49080886dc3764 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 11 Oct 2024 12:07:33 +0200 Subject: [PATCH 111/126] revert changes --- .github/workflows/osx-tests.yml | 2 +- test/functional/toolchains/apple/test_xcodetoolchain.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 97b25da98c2..a8b8c845d12 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -21,7 +21,7 @@ jobs: python-version: ['3.9'] test-type: [unittests, integration, functional] - runs-on: macos-13 + runs-on: macos-14 name: Conan (${{ matrix.test-type }}) (${{ matrix.python-version }}) diff --git a/test/functional/toolchains/apple/test_xcodetoolchain.py b/test/functional/toolchains/apple/test_xcodetoolchain.py index fb1985e64a0..cdbbe7a8998 100644 --- a/test/functional/toolchains/apple/test_xcodetoolchain.py +++ b/test/functional/toolchains/apple/test_xcodetoolchain.py @@ -80,7 +80,7 @@ def package_info(self): client.run_command("xcodegen generate") - sdk_version = "14.2" + sdk_version = "14.5" settings = "-s arch=x86_64 -s os.sdk_version={} -s compiler.cppstd={} " \ "-s compiler.libcxx=libc++ -s os.version={} " \ "-c tools.build.cross_building:can_run=True " \ From 1cd4dca53ada1c5792e8033e6d94b561caba6ff7 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 25 Oct 2024 09:27:44 +0200 Subject: [PATCH 112/126] use -n auto --- .github/workflows/osx-tests.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index a8b8c845d12..2a53e37e5d1 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -129,14 +129,12 @@ jobs: - name: Run Tests run: | - NUM_CPUS=$(sysctl -n hw.ncpu) - echo "Number of CPUs available: $NUM_CPUS" if [ "${{ matrix.test-type }}" == "unittests" ]; then - pytest test/unittests --durations=20 -n $NUM_CPUS + pytest test/unittests --durations=20 -n auto elif [ "${{ matrix.test-type }}" == "integration" ]; then - pytest test/integration --durations=20 -n $NUM_CPUS + pytest test/integration --durations=20 -n auto elif [ "${{ matrix.test-type }}" == "functional" ]; then export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version - pytest test/functional --durations=20 -n $NUM_CPUS + pytest test/functional --durations=20 -n auto fi From 6ee900691e436173796f926cd85a8143600c11f0 Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Mon, 28 Oct 2024 10:48:40 +0100 Subject: [PATCH 113/126] Update .github/workflows/osx-tests.yml --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 2a53e37e5d1..b4ade2f02f5 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ['3.9'] + python-version: ['3.8', '3.6'] test-type: [unittests, integration, functional] runs-on: macos-14 From 500f25ba5150e3aa6c2023ef08b61913076b1569 Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Mon, 28 Oct 2024 11:51:43 +0100 Subject: [PATCH 114/126] Update .github/workflows/osx-tests.yml --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index b4ade2f02f5..b19ec4c7622 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ['3.8', '3.6'] + python-version: ['3.8', '3.12'] test-type: [unittests, integration, functional] runs-on: macos-14 From 76198803dcfdb1bc1ee3106ae05281ecbd5e404a Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Tue, 29 Oct 2024 10:55:36 +0100 Subject: [PATCH 115/126] Update .github/workflows/osx-tests.yml --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index b19ec4c7622..07ea6c0e67b 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ['3.8', '3.12'] + python-version: ['3.8', '3.12', '3.13'] test-type: [unittests, integration, functional] runs-on: macos-14 From d5f586353eb0332b7fe2a07223bad31eb88c4caf Mon Sep 17 00:00:00 2001 From: czoido Date: Tue, 26 Nov 2024 17:58:01 +0100 Subject: [PATCH 116/126] test with two steps --- .github/workflows/osx-tests.yml | 54 +++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 07ea6c0e67b..1b576c7f8e3 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -14,26 +14,17 @@ concurrency: cancel-in-progress: true jobs: - testing: - strategy: - fail-fast: true - matrix: - python-version: ['3.8', '3.12', '3.13'] - test-type: [unittests, integration, functional] - + setup-caches: runs-on: macos-14 - - name: Conan (${{ matrix.test-type }}) (${{ matrix.python-version }}) - + name: Setup and Cache Dependencies steps: - - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: 3.8 - name: Cache pip packages id: cache-pip @@ -61,12 +52,10 @@ jobs: key: ${{ runner.os }}-brew - name: Install homebrew dependencies - if: matrix.test-type == 'functional' run: | brew install xcodegen make libtool zlib autoconf automake ninja - name: Cache CMake and Bazel installations - if: matrix.test-type == 'functional' id: cache-tools uses: actions/cache@v4 with: @@ -79,7 +68,7 @@ jobs: key: ${{ runner.os }}-conan-tools-cache - name: Build CMake old versions not available for ARM - if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' + if: steps.cache-tools.outputs.cache-hit != 'true' run: | set -e CMAKE_BUILD_VERSIONS=("3.15.7") @@ -98,7 +87,7 @@ jobs: done - name: Install universal CMake versions - if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' + if: steps.cache-tools.outputs.cache-hit != 'true' run: | set -e CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.5") @@ -118,7 +107,7 @@ jobs: done - name: Install Bazel versions - if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' + if: steps.cache-tools.outputs.cache-hit != 'true' run: | set -e for version in 6.3.2 7.1.2; do @@ -127,6 +116,33 @@ jobs: chmod +x ${HOME}/Applications/bazel/${version}/bazel done + testing: + needs: setup-caches + strategy: + fail-fast: true + matrix: + python-version: ['3.8', '3.12', '3.13'] + test-type: [unittests, integration, functional] + + runs-on: macos-14 + + name: Conan (${{ matrix.test-type }}) (${{ matrix.python-version }}) + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Use Cached Dependencies + run: | + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + cmake --version + bazel --version + - name: Run Tests run: | if [ "${{ matrix.test-type }}" == "unittests" ]; then @@ -134,7 +150,5 @@ jobs: elif [ "${{ matrix.test-type }}" == "integration" ]; then pytest test/integration --durations=20 -n auto elif [ "${{ matrix.test-type }}" == "functional" ]; then - export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin - cmake --version pytest test/functional --durations=20 -n auto fi From d0c9bbdaa3aa413381ddef299f8aef92043bd39e Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 27 Nov 2024 07:27:55 +0100 Subject: [PATCH 117/126] wip --- .github/workflows/osx-tests.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 1b576c7f8e3..6827362caad 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -132,23 +132,38 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Restore pip cache + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('conans/requirements*.txt') }} + + - name: Restore tools cache + uses: actions/cache@v4 + with: + path: | + ~/Applications/CMake/3.15.7 + ~/Applications/CMake/3.19.7 + ~/Applications/CMake/3.23.5 + ~/Applications/bazel/6.3.2 + ~/Applications/bazel/7.1.2 + key: ${{ runner.os }}-conan-tools-cache + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Use Cached Dependencies + - name: Run Tests run: | export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin cmake --version bazel --version - - name: Run Tests - run: | if [ "${{ matrix.test-type }}" == "unittests" ]; then - pytest test/unittests --durations=20 -n auto + python -m pytest test/unittests --durations=20 -n auto elif [ "${{ matrix.test-type }}" == "integration" ]; then - pytest test/integration --durations=20 -n auto + python -m pytest test/integration --durations=20 -n auto elif [ "${{ matrix.test-type }}" == "functional" ]; then - pytest test/functional --durations=20 -n auto + python -m pytest test/functional --durations=20 -n auto fi From 244f866d7f86ca657422e7644aac3be997ef8878 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 27 Nov 2024 07:37:13 +0100 Subject: [PATCH 118/126] wip --- .github/workflows/osx-tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 6827362caad..c42a1d35087 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -154,6 +154,14 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install Python Dependencies + run: | + pip install --upgrade pip + pip install -r conans/requirements.txt + pip install -r conans/requirements_server.txt + pip install -r conans/requirements_dev.txt + pip install pytest + - name: Run Tests run: | export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin From d615d0dac48366f61541693261e8cbfec6173475 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 27 Nov 2024 07:51:50 +0100 Subject: [PATCH 119/126] wip --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index c42a1d35087..79812995e88 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -160,7 +160,7 @@ jobs: pip install -r conans/requirements.txt pip install -r conans/requirements_server.txt pip install -r conans/requirements_dev.txt - pip install pytest + pip install meson - name: Run Tests run: | From 84652d155f30d9cb4df07a714bedf939062a5a01 Mon Sep 17 00:00:00 2001 From: czoido Date: Wed, 27 Nov 2024 08:14:36 +0100 Subject: [PATCH 120/126] wip --- .github/workflows/osx-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index 79812995e88..a1f7dbeb1a6 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -162,6 +162,10 @@ jobs: pip install -r conans/requirements_dev.txt pip install meson + - name: Install homebrew dependencies + run: | + brew install xcodegen make libtool zlib autoconf automake ninja + - name: Run Tests run: | export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin From ea96119b8ff9e853a30b67905211cc7985d81da9 Mon Sep 17 00:00:00 2001 From: czoido Date: Mon, 2 Dec 2024 11:22:17 +0100 Subject: [PATCH 121/126] wip --- .ci/__init__.py | 0 test/functional/tools_versions_test.py | 18 ++---------------- 2 files changed, 2 insertions(+), 16 deletions(-) create mode 100644 .ci/__init__.py diff --git a/.ci/__init__.py b/.ci/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/functional/tools_versions_test.py b/test/functional/tools_versions_test.py index 91617ae3449..b79ce8c7224 100644 --- a/test/functional/tools_versions_test.py +++ b/test/functional/tools_versions_test.py @@ -16,20 +16,6 @@ def test_default_cmake(self): client.run_command('cmake --version') default_cmake_version = tools_locations["cmake"]["default"] assert "cmake version {}".format(default_cmake_version) in client.out - - @pytest.mark.skipif(platform.system() == "Darwin", reason="3.16 not installed in MacOS") - @pytest.mark.tool("cmake", "3.16") - def test_custom_cmake_3_16(self): - client = TestClient() - client.run_command('cmake --version') - assert "cmake version 3.16" in client.out - - @pytest.mark.skipif(platform.system() == "Darwin", reason="3.17 not installed in MacOS") - @pytest.mark.tool("cmake", "3.17") - def test_custom_cmake_3_17(self): - client = TestClient() - client.run_command('cmake --version') - assert "cmake version 3.17" in client.out @pytest.mark.tool("cmake", "3.19") def test_custom_cmake_3_19(self): @@ -38,13 +24,13 @@ def test_custom_cmake_3_19(self): assert "cmake version 3.19" in client.out @pytest.mark.tool("mingw64") - @pytest.mark.tool("cmake", "3.16") + @pytest.mark.tool("cmake", "3.19") @pytest.mark.skipif(platform.system() != "Windows", reason="Mingw test") def test_custom_cmake_mingw64(self): client = TestClient() client.run_command('cmake --version') - assert "cmake version 3.16" in client.out + assert "cmake version 3.19" in client.out main = gen_function_cpp(name="main") cmakelist = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) From 7702190c3e06e7bdb6d2b0815613bb9354b90dc4 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 2 Dec 2024 11:23:40 +0100 Subject: [PATCH 122/126] Use test type name for testing folder name too. --- .github/workflows/osx-tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index a1f7dbeb1a6..f54c904f957 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -172,10 +172,4 @@ jobs: cmake --version bazel --version - if [ "${{ matrix.test-type }}" == "unittests" ]; then - python -m pytest test/unittests --durations=20 -n auto - elif [ "${{ matrix.test-type }}" == "integration" ]; then - python -m pytest test/integration --durations=20 -n auto - elif [ "${{ matrix.test-type }}" == "functional" ]; then - python -m pytest test/functional --durations=20 -n auto - fi + python -m pytest test/${{ matrix.test-type }} --durations=20 -n auto From 04bb2d8d76f299dd33d03bf5df6b39e7fdfe1953 Mon Sep 17 00:00:00 2001 From: czoido Date: Mon, 2 Dec 2024 11:41:14 +0100 Subject: [PATCH 123/126] fix default profile --- conan/test/utils/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan/test/utils/tools.py b/conan/test/utils/tools.py index da021b2d872..4a0e9448b20 100644 --- a/conan/test/utils/tools.py +++ b/conan/test/utils/tools.py @@ -77,7 +77,7 @@ os=Macos arch={arch_setting} compiler=apple-clang - compiler.version=13 + compiler.version=15 compiler.libcxx=libc++ build_type=Release """) From 2c612e4381a0013cb8875d8e2bad93c19e765d46 Mon Sep 17 00:00:00 2001 From: czoido Date: Mon, 2 Dec 2024 11:44:11 +0100 Subject: [PATCH 124/126] sync with develop2 --- test/conftest.py | 50 +++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/test/conftest.py b/test/conftest.py index 9cf82ad5d09..572bbfa23f7 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -24,12 +24,12 @@ "3.15": {}, "3.16": {"disabled": True}, "3.17": {"disabled": True}, - "3.19": {"path": {"Windows": "C:/ws/cmake/cmake-3.19.7-win64-x64/bin"}}, + "3.19": {"path": {"Windows": "C:/ws/cmake/cmake-3.19.7-windows-x86_64/bin"}}, # To explicitly skip one tool for one version, define the path as 'skip-tests' # if you don't define the path for one platform it will run the test with the # tool in the path. For example here it will skip the test with CMake in Darwin but # in Linux it will run with the version found in the path if it's not specified - "3.23": {"path": {"Windows": "C:/ws/cmake/cmake-3.19.7-win64-x64/bin", + "3.23": {"path": {"Windows": "C:/ws/cmake/cmake-3.19.7-windows-x86_64/bin", "Darwin": "skip-tests"}}, }, 'ninja': { @@ -44,7 +44,8 @@ MacOS_arm = all([platform.system() == "Darwin", platform.machine() == "arm64"]) homebrew_root = "/opt/homebrew" if MacOS_arm else "/usr/local" - +windows_choco_root = "C:/ProgramData/chocolatey/lib/" +msys2_path = os.getenv("MSYS2_PATH", "C:/msys64") tools_locations = { "clang": {"disabled": True}, @@ -58,7 +59,7 @@ "0.28": { "path": { # Using chocolatey in Windows -> choco install pkgconfiglite --version 0.28 - 'Windows': "C:/ProgramData/chocolatey/lib/pkgconfiglite/tools/pkg-config-lite-0.28-1/bin", + 'Windows': f"{windows_choco_root}/pkgconfiglite/tools/pkg-config-lite-0.28-1/bin", 'Darwin': f"{homebrew_root}/bin", 'Linux': "/usr/bin" } @@ -67,25 +68,17 @@ 'cmake': { "default": "3.15", "3.15": { - "path": {'Windows': 'C:/cmake/cmake-3.15.7-win64-x64/bin', + "path": {'Windows': 'C:/tools/cmake/3.15.7/cmake-3.15.7-win64-x64/bin', 'Darwin': '/Users/runner/Applications/CMake/3.15.7/bin', 'Linux': '/usr/share/cmake-3.15.7/bin'} }, - "3.16": { - "path": {'Windows': 'C:/cmake/cmake-3.16.9-win64-x64/bin', - 'Linux': '/usr/share/cmake-3.16.9/bin'} - }, - "3.17": { - "path": {'Windows': 'C:/cmake/cmake-3.17.5-win64-x64/bin', - 'Linux': '/usr/share/cmake-3.17.5/bin'} - }, "3.19": { - "path": {'Windows': 'C:/cmake/cmake-3.19.7-win64-x64/bin', + "path": {'Windows': 'C:/tools/cmake/3.19.7/cmake-3.19.7-win64-x64/bin', 'Darwin': '/Users/runner/Applications/CMake/3.19.7/bin', 'Linux': '/usr/share/cmake-3.19.7/bin'} }, "3.23": { - "path": {'Windows': 'C:/cmake/cmake-3.23.1-win64-x64/bin', + "path": {'Windows': 'C:/tools/cmake/3.23.5/cmake-3.23.5-windows-x86_64/bin', 'Darwin': '/Users/runner/Applications/CMake/3.23.5/bin', 'Linux': "/usr/share/cmake-3.23.5/bin"} }, @@ -96,7 +89,7 @@ 'ninja': { "default": "1.10.2", "1.10.2": { - "path": {'Windows': 'C:/Tools/ninja/1.10.2'} + "path": {'Windows': f'{windows_choco_root}/ninja/tools'} } }, # This is the non-msys2 mingw, which is 32 bits x86 arch @@ -105,60 +98,60 @@ "platform": "Windows", "default": "system", "exe": "mingw32-make", - "system": {"path": {'Windows': "C:/mingw"}}, + "system": {"path": {'Windows': "C:/ProgramData/mingw64/mingw64/bin"}}, }, 'mingw32': { "platform": "Windows", "default": "system", "exe": "mingw32-make", - "system": {"path": {'Windows': "C:/msys64/mingw32/bin"}}, + "system": {"path": {'Windows': f"{msys2_path}/mingw32/bin"}}, }, 'ucrt64': { "disabled": True, "platform": "Windows", "default": "system", "exe": "mingw32-make", - "system": {"path": {'Windows': "C:/msys64/ucrt64/bin"}}, + "system": {"path": {'Windows': f"{msys2_path}/ucrt64/bin"}}, }, 'mingw64': { "platform": "Windows", "default": "system", "exe": "mingw32-make", - "system": {"path": {'Windows': "C:/msys64/mingw64/bin"}}, + "system": {"path": {'Windows': f"{msys2_path}/mingw64/bin"}}, }, 'msys2': { "platform": "Windows", "default": "system", "exe": "make", - "system": {"path": {'Windows': r"C:\msys64\usr\bin"}}, + "system": {"path": {'Windows': f"{msys2_path}/usr/bin"}}, }, 'msys2_clang64': { "disabled": True, "platform": "Windows", "default": "system", "exe": "clang", - "system": {"path": {'Windows': "C:/msys64/clang64/bin"}}, + "system": {"path": {'Windows': f"{msys2_path}/clang64/bin"}}, }, 'msys2_mingw64_clang64': { "disabled": True, "platform": "Windows", "default": "system", "exe": "clang", - "system": {"path": {'Windows': "C:/msys64/mingw64/bin"}}, + "system": {"path": {'Windows': f"{msys2_path}/mingw64/bin"}}, }, 'cygwin': { "platform": "Windows", "default": "system", "exe": "make", - "system": {"path": {'Windows': "C:/cygwin64/bin"}}, + "system": {"path": {'Windows': "C:/tools/cygwin/bin"}}, }, 'bazel': { "default": "6.3.2", "6.3.2": {"path": {'Linux': '/usr/share/bazel-6.3.2/bin', - 'Windows': 'C:/bazel-6.3.2/bin', + 'Windows': 'C:/tools/bazel/6.3.2', 'Darwin': '/Users/runner/Applications/bazel/6.3.2'}}, - "7.1.2": {"path": {'Linux': '/usr/share/bazel-7.1.2', - 'Windows': 'C:/bazel-7.1.2/bin', + "7.1.2": {"path": {'Linux': '/usr/share/bazel-7.1.2/bin', + 'Windows': 'C:/tools/bazel/7.1.2', 'Darwin': '/Users/runner/Applications/bazel/7.1.2'}}, }, 'premake': { @@ -178,6 +171,7 @@ "default": "system", "system": { "path": {'Darwin': os.getenv("ANDROID_NDK")} + # 'Windows': os.getenv("ANDROID_NDK_HOME"), } }, "qbs": {"disabled": True}, @@ -256,7 +250,7 @@ def _get_individual_tool(name, version): tool_path = tool_path.replace("/", "\\") if tool_platform == "Windows" and tool_path is not None else tool_path # To allow to skip for a platform, we can put the path to None # "cmake": { "3.23": { - # "path": {'Windows': 'C:/cmake/cmake-3.23.1-win64-x64/bin', + # "path": {'Windows': 'C:/cmake/cmake-3.23.1-windows-x86_64/bin', # 'Darwin': '/Users/jenkins/cmake/cmake-3.23.1/bin', # 'Linux': None}} # } From 9a967daecbb7d125ca1e9adc0b7502b238ffcc5f Mon Sep 17 00:00:00 2001 From: czoido Date: Mon, 2 Dec 2024 12:09:27 +0100 Subject: [PATCH 125/126] test with 3.6 --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index f54c904f957..f482046ae12 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -121,7 +121,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ['3.8', '3.12', '3.13'] + python-version: ['3.6', '3.8', '3.13'] test-type: [unittests, integration, functional] runs-on: macos-14 From 9905f20062102de3abe7e516c679063ec52565af Mon Sep 17 00:00:00 2001 From: czoido Date: Mon, 2 Dec 2024 12:31:42 +0100 Subject: [PATCH 126/126] revert --- .github/workflows/osx-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml index f482046ae12..f54c904f957 100644 --- a/.github/workflows/osx-tests.yml +++ b/.github/workflows/osx-tests.yml @@ -121,7 +121,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ['3.6', '3.8', '3.13'] + python-version: ['3.8', '3.12', '3.13'] test-type: [unittests, integration, functional] runs-on: macos-14