From da4d1eec10478f6dbd81772f9aa3d7d0afc399b9 Mon Sep 17 00:00:00 2001 From: Kafonek Date: Mon, 13 Feb 2023 19:01:18 -0500 Subject: [PATCH 1/5] bump maturin build version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bf9b0e1..6c3e89f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin>=0.13,<0.14"] +requires = ["maturin>=0.14,<0.15"] build-backend = "maturin" [project] From b684e66cbd772b3394e8296736f636b82d51067a Mon Sep 17 00:00:00 2001 From: Kafonek Date: Mon, 13 Feb 2023 19:02:08 -0500 Subject: [PATCH 2/5] basically copy py-dissimilar CI --- .github/workflows/wheels.yml | 156 +++++++++++++++++++---------------- 1 file changed, 84 insertions(+), 72 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index adaf838..fba7222 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,8 +1,12 @@ name: Build and Release on: + push: + branches: + - build_aarch64 release: types: [published] + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -14,35 +18,31 @@ env: jobs: macos: runs-on: macos-latest - strategy: - matrix: - python-version: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - - '3.11' steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: '3.11' architecture: x64 - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + - uses: dtolnay/rust-toolchain@stable - name: Build wheels - x86_64 - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 with: target: x86_64 - args: --release --out dist --sdist --find-interpreter + args: --release --out dist --sdist -i 3.7 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9 + - name: Test built wheel - x86_64 + run: | + pip install y-py --no-index --find-links dist --force-reinstall + pip install pytest + pytest - name: Build wheels - universal2 - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 with: - args: --release --universal2 --out dist --find-interpreter + args: --release --universal2 --out dist -i 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9 + - name: Test built wheel - universal2 + run: | + pip install y-py --no-index --find-links dist --force-reinstall + pytest - name: Upload wheels uses: actions/upload-artifact@v2 with: @@ -51,32 +51,31 @@ jobs: windows: runs-on: windows-latest + name: windows (${{ matrix.platform.target }}) strategy: matrix: - target: [x64, x86] - python-version: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - - '3.11' + platform: + - target: x64 + interpreter: 3.7 3.8 3.9 3.10 3.11 + - target: x86 + interpreter: 3.7 3.8 3.9 3.10 3.11 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.target }} - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + python-version: '3.11' + architecture: ${{ matrix.platform.target }} + - uses: dtolnay/rust-toolchain@stable - name: Build wheels - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter + target: ${{ matrix.platform.target }} + args: --release --out dist -i ${{ matrix.platform.interpreter }} + - name: Test built wheel + run: | + pip install y-py --no-index --find-links dist --force-reinstall + pip install pytest + pytest - name: Upload wheels uses: actions/upload-artifact@v2 with: @@ -88,24 +87,25 @@ jobs: strategy: matrix: target: [x86_64, i686] - python-version: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - - '3.11' steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.target }} + python-version: '3.11' + architecture: x64 - name: Build wheels - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 with: + rust-toolchain: stable target: ${{ matrix.target }} manylinux: auto - args: --release --out dist --find-interpreter + args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9 + - name: Test built wheel + if: matrix.target == 'x86_64' + run: | + pip install y-py --no-index --find-links dist --force-reinstall + pip install pytest + pytest - name: Upload wheels uses: actions/upload-artifact@v2 with: @@ -116,28 +116,40 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - - '3.11' target: [aarch64, armv7, s390x, ppc64le] - steps: - - uses: actions/checkout@v3 - - name: Build Wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - manylinux: auto - args: -i ${{ matrix.python-version }} --release --out dist + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + rust-toolchain: stable + target: ${{ matrix.target }} + manylinux: auto + args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9 + + - uses: uraimo/run-on-arch-action@v2.3.0 + if: matrix.target != 'ppc64' + name: Test built wheel + with: + arch: ${{ matrix.target }} + distro: ubuntu20.04 + githubToken: ${{ github.token }} + install: | + apt-get update + apt-get install -y --no-install-recommends python3 python3-pip + pip3 install -U pip pytest + run: | + pip3 install y-py --no-index --find-links dist/ --force-reinstall + pytest - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist wasm: runs-on: ubuntu-20.04 From e5c02a0ac1bef6f7a59831b91ba331dfeea93ba1 Mon Sep 17 00:00:00 2001 From: Kafonek Date: Mon, 13 Feb 2023 19:02:24 -0500 Subject: [PATCH 3/5] test build --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index fba7222..8ead878 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -3,7 +3,7 @@ name: Build and Release on: push: branches: - - build_aarch64 + - build_aarch64_take_2 release: types: [published] pull_request: From a61275cebcaef7305539a72afd09736dc08648a2 Mon Sep 17 00:00:00 2001 From: Kafonek Date: Mon, 13 Feb 2023 19:20:59 -0500 Subject: [PATCH 4/5] remove test on push to branch --- .github/workflows/wheels.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8ead878..96699f9 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,9 +1,6 @@ name: Build and Release on: - push: - branches: - - build_aarch64_take_2 release: types: [published] pull_request: From 8a6a83a8dfa8b7b47d1819ca85478fc2484d3b07 Mon Sep 17 00:00:00 2001 From: Kafonek Date: Tue, 14 Feb 2023 08:54:54 -0500 Subject: [PATCH 5/5] make pypi-release wait on linux-cross job --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 96699f9..e0f56be 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -198,6 +198,7 @@ jobs: - macos - windows - linux + - linux-cross if: startsWith(github.ref, 'refs/tags/') steps: - uses: actions/download-artifact@v2