Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
jeertmans committed Dec 21, 2023
1 parent 9a428d1 commit 100ae28
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Publish differt-core Python Package

name: Publish Python Package
on:
push:
branches:
Expand All @@ -11,10 +10,6 @@ on:
permissions:
contents: read

defaults:
run:
working-directory: differt-core

jobs:
linux:
runs-on: ubuntu-latest
Expand All @@ -28,12 +23,11 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: differt-core
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
Expand All @@ -43,7 +37,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: wheels
path: differt-core/dist
path: dist

windows:
runs-on: windows-latest
Expand All @@ -63,7 +57,6 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: differt-core
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
Expand All @@ -72,7 +65,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: wheels
path: differt-core/dist
path: dist

macos:
runs-on: macos-latest
Expand All @@ -91,7 +84,6 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: differt-core
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
Expand All @@ -100,7 +92,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: wheels
path: differt-core/dist
path: dist

sdist:
runs-on: ubuntu-latest
Expand All @@ -112,14 +104,12 @@ jobs:
uses: PyO3/maturin-action@v1
with:
command: sdist
working-directory: differt-core
args: --out dist

- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: differt-core/dist

release:
name: Release
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/publish_differt.yml

This file was deleted.

23 changes: 12 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:

name: Test code

env:
JAX_PLATFORM_NAME: cpu

jobs:
pytest:
strategy:
Expand Down Expand Up @@ -31,7 +34,7 @@ jobs:
- name: Run Pytest
run: |
poetry run pytest -Werror -n auto
pdm run pytest -Werror -n auto
cargo-test:
strategy:
fail-fast: false
Expand Down Expand Up @@ -63,22 +66,20 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
env:
JAX_PLATFORM_NAME: cpu
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry

- name: Install Python
uses: actions/setup-python@v4
- name: Install PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: '3.11'
cache: poetry
cache: true

- name: Install DiffeRT
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
run: |
pdm install -G test,github-action # TODO: build in release mode?
Expand All @@ -91,7 +92,7 @@ jobs:
clean: false

- name: Run Benchmarks before changes
run: poetry run pytest --benchmark-only --benchmark-save=before
run: pdm run pytest --benchmark-only --benchmark-save=before

- name: Compare benchmarks
run: |
Expand Down
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ name = "differt"
edition = "2021"
name = "_core"
version = "0.0.5"

[profile.release]
lto = "fat"
codegen-units = 1
strip = true

[profile.bench]
debug = true
strip = false
Empty file added python/differt/py.typed
Empty file.

0 comments on commit 100ae28

Please sign in to comment.