Skip to content

Commit

Permalink
fix(ci): copy wheel generation from @messense
Browse files Browse the repository at this point in the history
  • Loading branch information
tversteeg committed Feb 22, 2023
1 parent 32c3890 commit 3fcda55
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 15 deletions.
75 changes: 62 additions & 13 deletions .github/workflows/release_pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,74 @@
name: Release
name: Test & Release

on:
push:
branches:
- main
tags:
- "v*"
pull_request:

jobs:
deploy:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: PyO3/maturin-action@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build and publish
uses: messense/maturin-action@v1
env:
MATURIN_USERNAME: ${{ secrets.PYPI_USERNAME }}
MATURIN_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
manylinux: auto
command: build
args: --release --sdist -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: PyO3/maturin-action@v1
with:
command: build
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: PyO3/maturin-action@v1
with:
command: build
args: --release -o dist --universal2 --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

release:
name: Release
runs-on: ubuntu-latest
needs:
- macos
- windows
- linux
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/download-artifact@v2
with:
maturin-version: latest
command: publish
name: wheels
- uses: actions/setup-python@v2
- name: Publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install --upgrade twine
twine upload --skip-existing *
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
[dependencies]
itertools = "0.10.5"
nom = "7.1.3"
pyo3 = { version = "0.18.1", features = ["extension-module"] }
pyo3 = { version = "0.18.1", features = ["extension-module", "abi3-py37"] }
thiserror = "1.0.38"

# Automatically add git hooks for code conventions & tests
Expand All @@ -24,3 +24,6 @@ features = [
"run-cargo-clippy",
"run-cargo-fmt",
]

[package.metadata.maturin]
python-source = "python"
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
name = "gef-file-to-map"
version = "0.1.0"
description = "Utility library for parsing .gef files"
requires-python = ">=3.8"
requires-python = ">=3.7"
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["gef", "pygef"]
authors = [{ name = "Thomas Versteeg", email = "[email protected]" }]
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]

[project.urls]
repository = "https://github.com/cemsbv/gef-file-to-map"
Expand Down

0 comments on commit 3fcda55

Please sign in to comment.