Skip to content

Commit c6be13c

Browse files
authored
added support for arm64 m1 build (#7)
1 parent 217bf41 commit c6be13c

File tree

5 files changed

+187
-20
lines changed

5 files changed

+187
-20
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Build
22
on:
3-
- workflow_dispatch
43
- push
54
- pull_request
65
jobs:

.github/workflows/deploy.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Deploy
22
on:
3-
workflow_dispatch:
43
release:
54
types:
65
- released
@@ -24,7 +23,7 @@ jobs:
2423
- name: Checkout
2524
uses: actions/checkout@v3
2625
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v3
26+
uses: actions/setup-python@v4
2827
with:
2928
python-version: ${{ matrix.python-version }}
3029
- name: Install Rust
@@ -33,10 +32,32 @@ jobs:
3332
profile: minimal
3433
toolchain: stable
3534
override: true
35+
- name: Install Cross-compilers (macOS)
36+
if: matrix.os == 'macos-latest'
37+
run: |
38+
rustup target add x86_64-apple-darwin
39+
rustup target add aarch64-apple-darwin
3640
- name: Publish Package
37-
uses: messense/maturin-action@v1
41+
uses: PyO3/maturin-action@v1
3842
with:
3943
command: publish
40-
args: --username=__token__ ${{ (matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7') && '' || '--no-sdist' }} --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
44+
args: --username=__token__ ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && '' || '--no-sdist' }} --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
4145
env:
4246
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
47+
if: matrix.os != 'macos-latest'
48+
- name: Publish macOS (x86_64) Package
49+
if: matrix.os == 'macos-latest'
50+
uses: PyO3/maturin-action@v1
51+
with:
52+
command: publish
53+
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=x86_64-apple-darwin --no-sdist
54+
env:
55+
MATURIN_PASSWORD: ${{ secrets.pypi_password }}
56+
- name: Publish macOS (arm64) Package
57+
if: matrix.os == 'macos-latest'
58+
uses: PyO3/maturin-action@v1
59+
with:
60+
command: publish
61+
args: --username=__token__ --interpreter=python${{ matrix.python-version }} --target=aarch64-apple-darwin --no-sdist
62+
env:
63+
MATURIN_PASSWORD: ${{ secrets.pypi_password }}

Cargo.toml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "braveblock"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
authors = ["Gal Ben David <gal@intsights.com>"]
55
edition = "2021"
66
description = "A fast and easy adblockplus parser and matcher based on adblock-rust package"
@@ -19,19 +19,6 @@ keywords = [
1919
]
2020

2121
[package.metadata.maturin]
22-
requires-python = ">=3.7"
23-
classifier = [
24-
"License :: OSI Approved :: MIT License",
25-
"Operating System :: MacOS",
26-
"Operating System :: Microsoft",
27-
"Operating System :: POSIX :: Linux",
28-
"Programming Language :: Python :: 3.7",
29-
"Programming Language :: Python :: 3.8",
30-
"Programming Language :: Python :: 3.9",
31-
"Programming Language :: Python :: 3.10",
32-
"Programming Language :: Python :: 3.11",
33-
"Programming Language :: Rust",
34-
]
3522

3623
[lib]
3724
name = "braveblock"

poetry.lock

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sdist-include = [
1313

1414
[tool.poetry]
1515
name = "braveblock"
16-
version = "0.5.0"
16+
version = "0.5.1"
1717
authors = ["Gal Ben David <gal@intsights.com>"]
1818
description = "A fast and easy adblockplus parser and matcher based on adblock-rust package"
1919
readme = "README.md"

0 commit comments

Comments
 (0)