From 00f6bf48f36ef0a1db8a068d24b01fb1db9cc4c9 Mon Sep 17 00:00:00 2001 From: Genaro Camele Date: Sun, 7 Jul 2024 13:34:24 -0300 Subject: [PATCH] Updated CI --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++----------- README.md | 16 +++------------- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6043b03..4d2e7b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,24 +24,41 @@ jobs: runs-on: ${{ matrix.platform.runner }} strategy: matrix: + python-version: [ + "pypy-3.10", + "pypy-3.9", + "3.8", + "3.9", + "3.10", + "3.11", + "3.12", + "3.13", + "3", + "3.x", + ] platform: - runner: ubuntu-latest target: x86_64 - - runner: ubuntu-latest - target: x86 - - runner: ubuntu-latest - target: aarch64 - - runner: ubuntu-latest - target: armv7 - - runner: ubuntu-latest - target: s390x - - runner: ubuntu-latest - target: ppc64le + # - runner: ubuntu-latest + # target: x86 + # - runner: ubuntu-latest + # target: aarch64 + # - runner: ubuntu-latest + # target: armv7 + # - runner: ubuntu-latest + # target: s390x + # - runner: ubuntu-latest + # target: ppc64le steps: - uses: actions/checkout@v4 + # Set up Python to avoid cache and include modern versions + # Read more at (https://github.com/PyO3/maturin-action/discussions/218) - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: ${{ matrix.python-version }} + allow-prereleases: true + cache: pip + cache-dependency-path: .github/workflows/ci.yml - name: Build wheels uses: PyO3/maturin-action@v1 with: diff --git a/README.md b/README.md index 8ffda2a..68a290d 100644 --- a/README.md +++ b/README.md @@ -144,19 +144,8 @@ All kind of help is welcome! Feel free o submit an issue or a PR. There are some We provide a Docker image to execute all the commands listed below: -- Build for rust: cargo build [--release] -- Build for Python (uses Maturin): - 1. First of all, remove the `target/wheels` folder: `rm -rf ./target/wheels` - 1. Build wheels: `docker run --rm -v $(pwd):/io jwaresolutions/ggca-build:0.3.0 maturin build --release --skip-auditwheel --manylinux=2014` - 1. Repair wheels to include some missing `.so` files: `docker run --rm -v $(pwd):/io jwaresolutions/ggca-build:0.3.0 ./repair-wheels.sh` -- Only for development: - - To run the examples you must run with this command due to [an issue][pyo3-issue] with Pyo3: `cargo run [--release] --example ` - - In Python you can test with Maturin: - - Maturin develop (installs the package in your current virtualenv): `maturin develop` - - Maturin build (just builds the wheel for your current Python version): `maturin build --manylinux=1-unchecked` -- To publish in PyPi: - 1. Install twine: `pip install twine` - 1. Upload: `twine upload ./target/wheels/wheelhouse/*` +- Build for rust: `cargo build [--release]` +- Build for Python (uses Maturin) and it's generated by CI [maturin-actions][maturin-actions] ### Tests @@ -202,4 +191,5 @@ If you use any part of our code, or the tool itself is useful for your research, [colorectal-dataset]: https://cbioportal-datahub.s3.amazonaws.com/coadread_tcga_pub.tar.gz [multiomix]: https://www.multiomix.org [env-logger]: https://docs.rs/env_logger/latest/env_logger/ +[maturin-actions]: https://github.com/PyO3/maturin-action [criterion]: https://github.com/bheisler/criterion.rs