From f35f274fb936eab7f7e1829a2a0bcfa9f5484729 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 15:59:54 -0500 Subject: [PATCH 01/11] Try to fix CI --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6406716..7d82681 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,6 +25,9 @@ jobs: - name: Install Make run: sudo apt-get install make + - name: openssl + run: sudo apt-get install librust-openssl-dev + - name: Maturin Build uses: PyO3/maturin-action@v1 with: From e3699b6b30f703b527b47bbea13081ff85f09b68 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 16:21:24 -0500 Subject: [PATCH 02/11] temporarily use PR submodule --- Cargo.lock | 121 +++++++++++++++++++++++++++++++++++++++++++++-------- imagetext | 2 +- 2 files changed, 104 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2682140..f5c63b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -367,16 +367,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "fontdue" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9099a2f86b8e674b75d03ff154b3fe4c5208ed249ced8d69cc313a9fa40bb488" -dependencies = [ - "hashbrown", - "ttf-parser 0.20.0", -] - [[package]] name = "foreign-types" version = "0.3.2" @@ -590,6 +580,20 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -637,7 +641,6 @@ name = "imagetext" version = "2.1.1" dependencies = [ "emojis", - "fontdue", "hashbrown", "image", "log", @@ -952,7 +955,7 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" dependencies = [ - "ttf-parser 0.15.2", + "ttf-parser", ] [[package]] @@ -1230,6 +1233,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -1239,12 +1243,16 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", @@ -1253,6 +1261,20 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.48.0", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -1281,6 +1303,49 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rusttype" version = "0.9.3" @@ -1321,6 +1386,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -1618,6 +1693,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.10" @@ -1675,12 +1760,6 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" -[[package]] -name = "ttf-parser" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" - [[package]] name = "unicase" version = "2.7.0" @@ -1723,6 +1802,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.0" diff --git a/imagetext b/imagetext index 978eab4..bb598ba 160000 --- a/imagetext +++ b/imagetext @@ -1 +1 @@ -Subproject commit 978eab463011afa104734cadd60dede82f67e3f9 +Subproject commit bb598ba8729d049586cbc144e61f3dc4e642cc20 From 3f2d6a9a3bf69868e4bd57c42f42b787150bb45b Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 16:26:48 -0500 Subject: [PATCH 03/11] tweaks --- Cargo.lock | 50 -------------------------------------------------- imagetext | 2 +- 2 files changed, 1 insertion(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f5c63b2..8e5b3dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -594,19 +594,6 @@ dependencies = [ "tokio-rustls", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "idna" version = "0.5.0" @@ -710,12 +697,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "lebe" version = "0.5.2" @@ -822,24 +803,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -1234,12 +1197,10 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", - "hyper-tls", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -1251,7 +1212,6 @@ dependencies = [ "serde_urlencoded", "system-configuration", "tokio", - "tokio-native-tls", "tokio-rustls", "tower-service", "url", @@ -1683,16 +1643,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.24.1" diff --git a/imagetext b/imagetext index bb598ba..32d11a7 160000 --- a/imagetext +++ b/imagetext @@ -1 +1 @@ -Subproject commit bb598ba8729d049586cbc144e61f3dc4e642cc20 +Subproject commit 32d11a70ce5ba9769c3c6ec8c45dac2135d4d9f4 From feaac81154acfb7d0bc90aafae7274cdaca260ac Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 16:30:55 -0500 Subject: [PATCH 04/11] Update CI.yml --- .github/workflows/CI.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7d82681..edfcb1a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,9 +8,6 @@ on: pull_request: workflow_dispatch: -# for linux -# sudo apt install pkg-config - jobs: linux: runs-on: ubuntu-latest @@ -26,7 +23,7 @@ jobs: run: sudo apt-get install make - name: openssl - run: sudo apt-get install librust-openssl-dev + run: sudo apt-get install librust-openssl-dev libssl-dev pkg-config - name: Maturin Build uses: PyO3/maturin-action@v1 From 533556de8572a3a4be0f52cf39d7f1c4895e1cb4 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 16:44:55 -0500 Subject: [PATCH 05/11] tweaks --- .github/workflows/CI.yml | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index edfcb1a..ef6a6ad 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,26 +11,39 @@ on: jobs: linux: runs-on: ubuntu-latest + strategy: + matrix: + target: + - x86 + - x86_64 + - aarch64 + - armv7 + - ppc64le steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Install Perl - run: sudo apt-get install perl - - - name: Install Make - run: sudo apt-get install make - - - name: openssl - run: sudo apt-get install librust-openssl-dev libssl-dev pkg-config - - name: Maturin Build uses: PyO3/maturin-action@v1 with: + target: ${{ matrix.target }} manylinux: auto - command: build - args: --release -o dist --find-interpreter + args: --release --out dist + before-script-linux: | + # If we're running on rhel centos, install needed packages. + if command -v yum &> /dev/null; then + yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic + + # If we're running on i686 we need to symlink libatomic + # in order to build openssl with -latomic flag. + if [[ ! -d "/usr/lib64" ]]; then + ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so + fi + else + # If we're running on debian-based system. + apt update -y && apt-get install -y libssl-dev openssl pkg-config + fi - name: Upload wheels uses: actions/upload-artifact@v3 From 259bd2cceb1b4685d5f269f5d9d64a426f1d6602 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 16:53:58 -0500 Subject: [PATCH 06/11] Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ef6a6ad..4e8db78 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ jobs: target: - x86 - x86_64 - - aarch64 + # - aarch64 - armv7 - ppc64le steps: From 38e940e8578816b9d48e806d7d2a89845401a840 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 17:02:26 -0500 Subject: [PATCH 07/11] use existing submodule --- Cargo.lock | 145 ++++++++++++++++++++--------------------------------- imagetext | 2 +- 2 files changed, 56 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e5b3dd..2682140 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -367,6 +367,16 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "fontdue" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9099a2f86b8e674b75d03ff154b3fe4c5208ed249ced8d69cc313a9fa40bb488" +dependencies = [ + "hashbrown", + "ttf-parser 0.20.0", +] + [[package]] name = "foreign-types" version = "0.3.2" @@ -581,17 +591,16 @@ dependencies = [ ] [[package]] -name = "hyper-rustls" -version = "0.24.2" +name = "hyper-tls" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "futures-util", - "http", + "bytes", "hyper", - "rustls", + "native-tls", "tokio", - "tokio-rustls", + "tokio-native-tls", ] [[package]] @@ -628,6 +637,7 @@ name = "imagetext" version = "2.1.1" dependencies = [ "emojis", + "fontdue", "hashbrown", "image", "log", @@ -697,6 +707,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "lebe" version = "0.5.2" @@ -803,6 +819,24 @@ dependencies = [ "uuid", ] +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -918,7 +952,7 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e6affeb1632d6ff6a23d2cd40ffed138e82f1532571a26f527c8a284bb2fbb" dependencies = [ - "ttf-parser", + "ttf-parser 0.15.2", ] [[package]] @@ -1196,23 +1230,21 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls", + "hyper-tls", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "system-configuration", "tokio", - "tokio-rustls", + "tokio-native-tls", "tower-service", "url", "wasm-bindgen", @@ -1221,20 +1253,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "ring" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" -dependencies = [ - "cc", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.48.0", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -1263,49 +1281,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rusttype" version = "0.9.3" @@ -1346,16 +1321,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "security-framework" version = "2.9.2" @@ -1644,12 +1609,12 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.24.1" +name = "tokio-native-tls" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ - "rustls", + "native-tls", "tokio", ] @@ -1710,6 +1675,12 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" +[[package]] +name = "ttf-parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" + [[package]] name = "unicase" version = "2.7.0" @@ -1752,12 +1723,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.0" diff --git a/imagetext b/imagetext index 32d11a7..978eab4 160000 --- a/imagetext +++ b/imagetext @@ -1 +1 @@ -Subproject commit 32d11a70ce5ba9769c3c6ec8c45dac2135d4d9f4 +Subproject commit 978eab463011afa104734cadd60dede82f67e3f9 From a937ee2c79ccbad740b2631540347cd035dc0b5f Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 17:14:06 -0500 Subject: [PATCH 08/11] Update CI.yml --- .github/workflows/CI.yml | 257 +++++++++++++++++++++++++++++++++------ 1 file changed, 219 insertions(+), 38 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4e8db78..8a6bcc8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,78 +9,252 @@ on: workflow_dispatch: jobs: + # linux: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # target: + # - x86 + # - x86_64 + # # - aarch64 + # - armv7 + # - ppc64le + # steps: + # - uses: actions/checkout@v4 + # with: + # submodules: recursive + + # - name: Maturin Build + # uses: PyO3/maturin-action@v1 + # with: + # target: ${{ matrix.target }} + # manylinux: auto + # args: --release --out dist + # before-script-linux: | + # # If we're running on rhel centos, install needed packages. + # if command -v yum &> /dev/null; then + # yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic + + # # If we're running on i686 we need to symlink libatomic + # # in order to build openssl with -latomic flag. + # if [[ ! -d "/usr/lib64" ]]; then + # ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so + # fi + # else + # # If we're running on debian-based system. + # apt update -y && apt-get install -y libssl-dev openssl pkg-config + # fi + + # - name: Upload wheels + # uses: actions/upload-artifact@v3 + # with: + # name: wheels + # path: dist + + windows: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + platform: + - target: x86_64-pc-windows-msvc + arch: x64 + - target: i686-pc-windows-msvc + arch: x86 + - target: aarch64-pc-windows-msvc + arch: x64 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.platform.arch }} + - name: "Build wheels - windows" + uses: PyO3/maturin-action@v1 + with: + args: --release -i python${{ matrix.python-version }} --out dist + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + macos-x86_64: + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: "Build wheels - x86_64" + uses: PyO3/maturin-action@v1 + with: + target: x86_64 + args: --release -i python${{ matrix.python-version }} --out dist + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + macos-universal: + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: "Build wheels - universal" + uses: PyO3/maturin-action@v1 + with: + args: --release -i python${{ matrix.python-version }} --target universal2-apple-darwin --out dist + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + linux: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] target: - - x86 - - x86_64 - # - aarch64 - - armv7 - - ppc64le + - x86_64-unknown-linux-gnu + - i686-unknown-linux-gnu steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - - name: Maturin Build + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: "Build wheels - linux" uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} manylinux: auto - args: --release --out dist - before-script-linux: | - # If we're running on rhel centos, install needed packages. - if command -v yum &> /dev/null; then - yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic - - # If we're running on i686 we need to symlink libatomic - # in order to build openssl with -latomic flag. - if [[ ! -d "/usr/lib64" ]]; then - ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so - fi - else - # If we're running on debian-based system. - apt update -y && apt-get install -y libssl-dev openssl pkg-config - fi - + command: build + args: --release -i python${{ matrix.python-version }} -o dist - name: Upload wheels uses: actions/upload-artifact@v3 with: name: wheels path: dist - windows: - runs-on: windows-latest + linux-cross: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + platform: + - target: aarch64-unknown-linux-gnu + arch: aarch64 + maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 + - target: armv7-unknown-linux-gnueabihf + arch: armv7 + - target: s390x-unknown-linux-gnu + arch: s390x + - target: powerpc64le-unknown-linux-gnu + arch: ppc64le + - target: powerpc64-unknown-linux-gnu + arch: ppc64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - - name: Maturin Build + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: "Build wheels - linux-cross" uses: PyO3/maturin-action@v1 with: - command: build - args: --release -o dist --find-interpreter + target: ${{ matrix.platform.target }} + manylinux: auto + docker-options: ${{ matrix.platform.maturin_docker_options }} + args: --release -i python${{ matrix.python-version }} -o dist - name: Upload wheels uses: actions/upload-artifact@v3 with: name: wheels path: dist - macos: - runs-on: macos-latest + musllinux: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + target: + - x86_64-unknown-linux-musl + - i686-unknown-linux-musl steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: "Build wheels - musllinux" + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + manylinux: musllinux_1_2 + args: --release -i python${{ matrix.python-version }} -o dist + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist - - name: Maturin Build + musllinux-cross: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + platform: + - target: aarch64-unknown-linux-musl + arch: aarch64 + maturin_docker_options: -e JEMALLOC_SYS_WITH_LG_PAGE=16 + - target: armv7-unknown-linux-musleabihf + arch: armv7 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: "Build wheels - musllinux-cross" uses: PyO3/maturin-action@v1 with: - command: build - args: --release -o dist --find-interpreter + target: ${{ matrix.platform.target }} + manylinux: musllinux_1_2 + args: --release -i python${{ matrix.python-version }} -o dist + docker-options: ${{ matrix.platform.maturin_docker_options }} - name: Upload wheels uses: actions/upload-artifact@v3 with: @@ -90,7 +264,14 @@ jobs: release: name: Release runs-on: ubuntu-latest - needs: [macos, windows, linux] + needs: + - linux + - linux-cross + - macos-x86_64 + - macos-universal + - musllinux + - musllinux-cross + - windows steps: - uses: actions/download-artifact@v3 with: From eaccec66b338b89d44d8df254076db16423a26e4 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 17:19:50 -0500 Subject: [PATCH 09/11] Update CI.yml --- .github/workflows/CI.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8a6bcc8..88a266f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -155,6 +155,20 @@ jobs: manylinux: auto command: build args: --release -i python${{ matrix.python-version }} -o dist + before-script-linux: | + # If we're running on rhel centos, install needed packages. + if command -v yum &> /dev/null; then + yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic + + # If we're running on i686 we need to symlink libatomic + # in order to build openssl with -latomic flag. + if [[ ! -d "/usr/lib64" ]]; then + ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so + fi + else + # If we're running on debian-based system. + apt update -y && apt-get install -y libssl-dev openssl pkg-config + fi - name: Upload wheels uses: actions/upload-artifact@v3 with: From e5181bea703bc9599e9e5e441f4498ffebb68631 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 17:28:00 -0500 Subject: [PATCH 10/11] Update CI.yml --- .github/workflows/CI.yml | 42 ---------------------------------------- 1 file changed, 42 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 88a266f..b171cb0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,48 +9,6 @@ on: workflow_dispatch: jobs: - # linux: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # target: - # - x86 - # - x86_64 - # # - aarch64 - # - armv7 - # - ppc64le - # steps: - # - uses: actions/checkout@v4 - # with: - # submodules: recursive - - # - name: Maturin Build - # uses: PyO3/maturin-action@v1 - # with: - # target: ${{ matrix.target }} - # manylinux: auto - # args: --release --out dist - # before-script-linux: | - # # If we're running on rhel centos, install needed packages. - # if command -v yum &> /dev/null; then - # yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic - - # # If we're running on i686 we need to symlink libatomic - # # in order to build openssl with -latomic flag. - # if [[ ! -d "/usr/lib64" ]]; then - # ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so - # fi - # else - # # If we're running on debian-based system. - # apt update -y && apt-get install -y libssl-dev openssl pkg-config - # fi - - # - name: Upload wheels - # uses: actions/upload-artifact@v3 - # with: - # name: wheels - # path: dist - windows: runs-on: windows-latest strategy: From 889bbfd12390e7a48e4afa92e2b5b240df4b08cb Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 13 Jan 2024 17:36:27 -0500 Subject: [PATCH 11/11] tweak CI `on` --- .github/workflows/CI.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b171cb0..3e67c90 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,12 +1,9 @@ name: CI on: - push: - branches: - - main - - master - pull_request: workflow_dispatch: + push: + tags: ["v*"] jobs: windows: