From d704e87518975fdb5dda955cdda88824232e592d Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 27 Jan 2023 12:49:17 -0500 Subject: [PATCH 01/14] Try MacOS arm64 build and test. --- .cirrus.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 5f6d4a02f2b..1c72b473010 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -19,3 +19,48 @@ task: cd test b2 -l250 warnings-as-errors=on warnings=all crypto=openssl stage_enum_if stage_dependencies include=/usr/local/include library-path=/usr/local/lib LD_LIBRARY_PATH=./dependencies ./enum_if + +build_and_store_wheels: &BUILD_AND_STORE_WHEELS + install_cibuildwheel_script: + - python -m pip install cibuildwheel==2.12.0 + run_cibuildwheel_script: + - cibuildwheel + wheels_artifacts: + path: "wheelhouse/*" + +build_macos_arm64_task: + name: Build macOS arm64 wheels. + macos_instance: + image: ghcr.io/cirruslabs/macos-monterey-xcode + + env: + PATH: /opt/homebrew/opt/python@3.9/bin:$PATH + + install_pre_requirements_script: + - brew install python@3.9 + - ln -s python3 /opt/homebrew/opt/python@3.9/bin/python + <<: *BUILD_AND_STORE_WHEELS + +test_macos_arm64_task: + name: Test macOS arm64. + macos_instance: + image: ghcr.io/cirruslabs/macos-monterey-xcode + + env: + PATH: /opt/homebrew/opt/python@3.9/bin:$PATH + + install_pre_requirements_script: + - brew install python@3.9 + - ln -s python3 /opt/homebrew/opt/python@3.9/bin/python + - brew install boost-build boost openssl@1.1 + - echo "using darwin ;" >>~/user-config.jam + + test_script: + - cd test + - b2 crypto=built-in -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests + - b2 deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests + + test_flaky_script: + - cd test + - b2 crypto=built-in -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on + - b2 deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on From cdbefe7ee6f425f1d331e3a6e3b0794a99953656 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:32:19 -0500 Subject: [PATCH 02/14] Fix PATH var. --- .cirrus.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1c72b473010..ad0d97ace1b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -34,11 +34,10 @@ build_macos_arm64_task: image: ghcr.io/cirruslabs/macos-monterey-xcode env: - PATH: /opt/homebrew/opt/python@3.9/bin:$PATH + PATH: /opt/homebrew/bin:$PATH install_pre_requirements_script: - brew install python@3.9 - - ln -s python3 /opt/homebrew/opt/python@3.9/bin/python <<: *BUILD_AND_STORE_WHEELS test_macos_arm64_task: @@ -47,11 +46,10 @@ test_macos_arm64_task: image: ghcr.io/cirruslabs/macos-monterey-xcode env: - PATH: /opt/homebrew/opt/python@3.9/bin:$PATH + PATH: /opt/homebrew/bin:$PATH install_pre_requirements_script: - brew install python@3.9 - - ln -s python3 /opt/homebrew/opt/python@3.9/bin/python - brew install boost-build boost openssl@1.1 - echo "using darwin ;" >>~/user-config.jam From b35b1d89ffa57e80898abf68b08df9e660b49062 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:37:43 -0500 Subject: [PATCH 03/14] Add CIRRUS_CLONE_SUBMODULES=true. --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index ad0d97ace1b..8af1766b6b6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -34,6 +34,7 @@ build_macos_arm64_task: image: ghcr.io/cirruslabs/macos-monterey-xcode env: + CIRRUS_CLONE_SUBMODULES: true PATH: /opt/homebrew/bin:$PATH install_pre_requirements_script: @@ -46,8 +47,8 @@ test_macos_arm64_task: image: ghcr.io/cirruslabs/macos-monterey-xcode env: + CIRRUS_CLONE_SUBMODULES: true PATH: /opt/homebrew/bin:$PATH - install_pre_requirements_script: - brew install python@3.9 - brew install boost-build boost openssl@1.1 From 9a931b8599bd378838c62fea6da465695ad6c241 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:42:46 -0500 Subject: [PATCH 04/14] Debug PATH and bin/ --- .cirrus.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 8af1766b6b6..e36988fed5b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -21,6 +21,9 @@ task: LD_LIBRARY_PATH=./dependencies ./enum_if build_and_store_wheels: &BUILD_AND_STORE_WHEELS + debug_script: + - echo $PATH + - ls -l /opt/homebrew/bin install_cibuildwheel_script: - python -m pip install cibuildwheel==2.12.0 run_cibuildwheel_script: @@ -39,6 +42,11 @@ build_macos_arm64_task: install_pre_requirements_script: - brew install python@3.9 + + debug_script: + - echo $PATH + - ls -l /opt/homebrew/bin + <<: *BUILD_AND_STORE_WHEELS test_macos_arm64_task: @@ -49,11 +57,16 @@ test_macos_arm64_task: env: CIRRUS_CLONE_SUBMODULES: true PATH: /opt/homebrew/bin:$PATH + install_pre_requirements_script: - brew install python@3.9 - brew install boost-build boost openssl@1.1 - echo "using darwin ;" >>~/user-config.jam + debug_script: + - echo $PATH + - ls -l /opt/homebrew/bin + test_script: - cd test - b2 crypto=built-in -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests From e92870c9b253205dda669c97782bb69b9c1d9359 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:55:13 -0500 Subject: [PATCH 05/14] Fix python3.9 naming issue. --- .cirrus.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index e36988fed5b..9916cb177a8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -25,7 +25,7 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS - echo $PATH - ls -l /opt/homebrew/bin install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.12.0 + - $PYTHON -m pip install cibuildwheel==2.12.0 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: @@ -39,6 +39,7 @@ build_macos_arm64_task: env: CIRRUS_CLONE_SUBMODULES: true PATH: /opt/homebrew/bin:$PATH + PYTHON: python3.9 install_pre_requirements_script: - brew install python@3.9 @@ -57,6 +58,7 @@ test_macos_arm64_task: env: CIRRUS_CLONE_SUBMODULES: true PATH: /opt/homebrew/bin:$PATH + PYTHON: python3.9 install_pre_requirements_script: - brew install python@3.9 From eec4ef962e3e4a6825b4754b5b7507b213ce7c26 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:11:56 -0500 Subject: [PATCH 06/14] Debug openssl location. --- .cirrus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 9916cb177a8..bd83bf6a93a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -47,6 +47,7 @@ build_macos_arm64_task: debug_script: - echo $PATH - ls -l /opt/homebrew/bin + - find /opt/homebrew -name '*openssl*' -ls <<: *BUILD_AND_STORE_WHEELS @@ -68,6 +69,7 @@ test_macos_arm64_task: debug_script: - echo $PATH - ls -l /opt/homebrew/bin + - find /opt/homebrew -name '*openssl*' -ls test_script: - cd test From f3e4dd708f3247ac0bc4299bea31525738b103c7 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:17:56 -0500 Subject: [PATCH 07/14] Add /opt/homebrew/opt/openssl@1.1 to build path. --- Jamfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jamfile b/Jamfile index 215b7dac926..738eadeed7f 100644 --- a/Jamfile +++ b/Jamfile @@ -396,7 +396,7 @@ rule openssl-lib-path ( properties * ) # on macOS, default to pick up openssl from the homebrew installation # brew install openssl # homebrew on M1 Macs install to /opt/homebrew - OPENSSL_LIB = /opt/homebrew/opt/openssl/lib /usr/local/opt/openssl/lib ; + OPENSSL_LIB = /opt/homebrew/opt/openssl@1.1/lib /opt/homebrew/opt/openssl/lib /usr/local/opt/openssl/lib ; } else if windows in $(properties) && $(OPENSSL_LIB) = "" { @@ -423,7 +423,7 @@ rule openssl-include-path ( properties * ) # on macOS, default to pick up openssl from the homebrew installation # brew install openssl # homebrew on M1 Macs install to /opt/homebrew - OPENSSL_INCLUDE = /opt/homebrew/opt/openssl/include /usr/local/opt/openssl/include ; + OPENSSL_INCLUDE = /opt/homebrew/opt/openssl@1.1/include /opt/homebrew/opt/openssl/include /usr/local/opt/openssl/include ; } else if windows in $(properties) && $(OPENSSL_INCLUDE) = "" { From 5c100e8f3f85af801f903f151a10d3418cbcb114 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Mon, 30 Jan 2023 13:06:18 -0500 Subject: [PATCH 08/14] Locating libtorrent-rasterbar... --- .cirrus.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index bd83bf6a93a..db8f71b4572 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -21,6 +21,13 @@ task: LD_LIBRARY_PATH=./dependencies ./enum_if build_and_store_wheels: &BUILD_AND_STORE_WHEELS + env: + CIBW_BUILD_VERBOSITY: 3 + CIBW_REPAIR_WHEEL_COMMAND_MACOS: > + find . -name '*libtorrent-rasterbar*' -ls && + REPAIR_LIBRARY_PATH=xxxx/lib && + DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && + DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} debug_script: - echo $PATH - ls -l /opt/homebrew/bin From bfe74af5d0bd01920db36d5799a1f4fc3f85a79e Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Mon, 30 Jan 2023 13:33:56 -0500 Subject: [PATCH 09/14] Disable cp38-* wheels. --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index db8f71b4572..34fa9788ed1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -45,6 +45,7 @@ build_macos_arm64_task: env: CIRRUS_CLONE_SUBMODULES: true + CIBW_BUILD: cp39-* PATH: /opt/homebrew/bin:$PATH PYTHON: python3.9 From dbba1f88252c6cfda926979e3b2af6b1fc1b72b3 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Mon, 30 Jan 2023 13:52:36 -0500 Subject: [PATCH 10/14] Skip cp38-* and build cp39, cp310, ... --- .cirrus.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 34fa9788ed1..8742f660eab 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -24,10 +24,8 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS env: CIBW_BUILD_VERBOSITY: 3 CIBW_REPAIR_WHEEL_COMMAND_MACOS: > - find . -name '*libtorrent-rasterbar*' -ls && - REPAIR_LIBRARY_PATH=xxxx/lib && - DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} && - DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} + delocate-listdeps {wheel} && + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} debug_script: - echo $PATH - ls -l /opt/homebrew/bin @@ -45,7 +43,8 @@ build_macos_arm64_task: env: CIRRUS_CLONE_SUBMODULES: true - CIBW_BUILD: cp39-* + CIBW_SKIP: cp38-* + CIBW_ARCH: arm64 PATH: /opt/homebrew/bin:$PATH PYTHON: python3.9 From c725c912d0da3e26a0d9e39205720554c7703215 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Mon, 30 Jan 2023 14:38:21 -0500 Subject: [PATCH 11/14] Skip cp311-* wheels. --- .cirrus.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8742f660eab..aaefaf95ee8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -26,13 +26,13 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS CIBW_REPAIR_WHEEL_COMMAND_MACOS: > delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} - debug_script: - - echo $PATH - - ls -l /opt/homebrew/bin + install_cibuildwheel_script: - $PYTHON -m pip install cibuildwheel==2.12.0 + run_cibuildwheel_script: - cibuildwheel + wheels_artifacts: path: "wheelhouse/*" @@ -43,7 +43,8 @@ build_macos_arm64_task: env: CIRRUS_CLONE_SUBMODULES: true - CIBW_SKIP: cp38-* + CIBW_SKIP: pp* cp38-* # cp38-* has problem with x86_64 / arm64 confusion + CIBW_BUILD: cp39-* cp310-* # cp311-* can be added after boost-python version >= 1.81 CIBW_ARCH: arm64 PATH: /opt/homebrew/bin:$PATH PYTHON: python3.9 From fe4ebfc4fda63139eccb84116c9782a8ec7d23be Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Mon, 30 Jan 2023 15:20:53 -0500 Subject: [PATCH 12/14] Make it a manual task. --- .cirrus.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index aaefaf95ee8..7f11fe58d10 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -38,6 +38,8 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS build_macos_arm64_task: name: Build macOS arm64 wheels. + trigger_type: manual + macos_instance: image: ghcr.io/cirruslabs/macos-monterey-xcode @@ -61,6 +63,8 @@ build_macos_arm64_task: test_macos_arm64_task: name: Test macOS arm64. + trigger_type: manual + macos_instance: image: ghcr.io/cirruslabs/macos-monterey-xcode From 77fcc696a911e91a6aa5e93932ba590514cf366e Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Tue, 31 Jan 2023 10:50:07 -0500 Subject: [PATCH 13/14] Pull /opt/homebrew/opt/openssl@1.1/ special case out of Jamfile. --- .cirrus.yml | 9 +++++++-- Jamfile | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 7f11fe58d10..4f47111525f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -72,6 +72,9 @@ test_macos_arm64_task: CIRRUS_CLONE_SUBMODULES: true PATH: /opt/homebrew/bin:$PATH PYTHON: python3.9 + OPENSSL_OPTS: > + openssl-lib=/opt/homebrew/opt/openssl@1.1/lib + openssl-include=/opt/homebrew/opt/openssl@1.1/include install_pre_requirements_script: - brew install python@3.9 @@ -86,9 +89,11 @@ test_macos_arm64_task: test_script: - cd test - b2 crypto=built-in -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests - - b2 deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests + - b2 $OPENSSL_OPTS crypto=openssl -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests + - b2 $OPENSSL_OPTS deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests test_flaky_script: - cd test - b2 crypto=built-in -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on - - b2 deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on + - b2 $OPENSSL_OPTS crypto=openssl -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on + - b2 $OPENSSL_OPTS deprecated-functions=off -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on diff --git a/Jamfile b/Jamfile index 738eadeed7f..215b7dac926 100644 --- a/Jamfile +++ b/Jamfile @@ -396,7 +396,7 @@ rule openssl-lib-path ( properties * ) # on macOS, default to pick up openssl from the homebrew installation # brew install openssl # homebrew on M1 Macs install to /opt/homebrew - OPENSSL_LIB = /opt/homebrew/opt/openssl@1.1/lib /opt/homebrew/opt/openssl/lib /usr/local/opt/openssl/lib ; + OPENSSL_LIB = /opt/homebrew/opt/openssl/lib /usr/local/opt/openssl/lib ; } else if windows in $(properties) && $(OPENSSL_LIB) = "" { @@ -423,7 +423,7 @@ rule openssl-include-path ( properties * ) # on macOS, default to pick up openssl from the homebrew installation # brew install openssl # homebrew on M1 Macs install to /opt/homebrew - OPENSSL_INCLUDE = /opt/homebrew/opt/openssl@1.1/include /opt/homebrew/opt/openssl/include /usr/local/opt/openssl/include ; + OPENSSL_INCLUDE = /opt/homebrew/opt/openssl/include /usr/local/opt/openssl/include ; } else if windows in $(properties) && $(OPENSSL_INCLUDE) = "" { From 64212021ec670852ef81212fe1a76a967e65891c Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Fri, 10 Feb 2023 11:10:12 -0500 Subject: [PATCH 14/14] Remove manual trigger. Task should run on all pushes. --- .cirrus.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 4f47111525f..fe454e9545a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -38,7 +38,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS build_macos_arm64_task: name: Build macOS arm64 wheels. - trigger_type: manual macos_instance: image: ghcr.io/cirruslabs/macos-monterey-xcode @@ -63,7 +62,6 @@ build_macos_arm64_task: test_macos_arm64_task: name: Test macOS arm64. - trigger_type: manual macos_instance: image: ghcr.io/cirruslabs/macos-monterey-xcode