Skip to content

Commit

Permalink
added support for apple m1 users (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmontza-r7 authored Feb 14, 2024
1 parent 8c7ed98 commit 0c3a214
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 35 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Build
on: [push, pull_request]
on:
- push
- pull_request
jobs:
lint:
if: github.event_name == 'push' && !startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install latest rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: clippy
- name: Lint with clippy
Expand All @@ -24,17 +27,25 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest , macos-latest, windows-latest]
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
- name: Install Poetry
uses: abatilo/actions-poetry@v2.1.3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
50 changes: 34 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
name: Deploy
on:
release:
types: [released]
types:
- released
jobs:
deploy:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
Expand All @@ -23,23 +32,32 @@ jobs:
profile: minimal
toolchain: stable
override: true
- name: Install Cross-compilers (macOS)
if: matrix.os == 'macos-latest'
run: |
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
- name: Publish Package
if: matrix.os != 'windows-latest'
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
with:
maturin-version: latest
command: publish
manylinux: 2014
args: --username=__token__ --no-sdist --interpreter=python${{ matrix.python-version }}
args: --username=__token__ ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && '' || '--no-sdist' }} --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
env:
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
- name: Publish Package
if: matrix.os == 'windows-latest'
uses: messense/maturin-action@v1
if: matrix.os != 'macos-latest'
- name: Publish macOS (x86_64) Package
if: matrix.os == 'macos-latest'
uses: PyO3/maturin-action@v1
with:
maturin-version: latest
command: publish
manylinux: 2014
args: --username=__token__ --no-sdist --interpreter=python
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=x86_64-apple-darwin --no-sdist
env:
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
- name: Publish macOS (arm64) Package
if: matrix.os == 'macos-latest'
uses: PyO3/maturin-action@v1
with:
command: publish
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=aarch64-apple-darwin --no-sdist
env:
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
11 changes: 1 addition & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "PyDeduplines"
version = "0.6.0"
version = "0.6.1"
authors = ["Gal Ben David <[email protected]>"]
edition = "2021"
description = "Python library for a duplicate lines removal written in Rust"
Expand All @@ -16,15 +16,6 @@ keywords = [
]

[package.metadata.maturin]
requires-python = ">=3.7"
classifier = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[lib]
name = "pydeduplines"
Expand Down
160 changes: 160 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sdist-include = [

[tool.poetry]
name = "PyDeduplines"
version = "0.6.0"
version = "0.6.1"
authors = ["Gal Ben David <[email protected]>"]
description = "Python library for a duplicate lines removal written in Rust"
readme = "README.md"
Expand Down

0 comments on commit 0c3a214

Please sign in to comment.