Skip to content

Commit

Permalink
Add workflow for wheels (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
prehner authored Apr 15, 2024
1 parent d5f38c6 commit 85dc324
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 2 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Build Wheels
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
manylinux: auto
command: build
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
macos_universal2:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
args: --release --target universal2-apple-darwin --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: ${{ matrix.target }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# feos-torch
Parallel evaluation of vapor pressures and liquid densities including gradients using PyTorch
Parallel evaluation of vapor pressures, liquid densities, and bubble/dew points including gradients using PyTorch.

## Installation
Install with (needs rust compiler)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin>=0.13,<0.14"]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[tool.maturin]
Expand Down

0 comments on commit 85dc324

Please sign in to comment.