Compare commits

..

No commits in common. "222d248fabdce689b7f16ce4358977bb4bb1c355" and "be574d7efe436fbd73e768c94916b14a3ad5ada3" have entirely different histories.

8 changed files with 146 additions and 9 deletions

120
.github/workflows/maturin.yml vendored Normal file
View file

@ -0,0 +1,120 @@
# This file is autogenerated by maturin v1.4.0
# To update, run
#
# maturin generate-ci github
#
name: CI
on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing *

View file

@ -10,7 +10,7 @@ default-members = [".", "members/libpt-core"]
[workspace.package] [workspace.package]
publish = true publish = true
version = "0.4.0" version = "0.4.0-alpha.1"
edition = "2021" edition = "2021"
authors = ["Christoph J. Scherr <software@cscherr.de>"] authors = ["Christoph J. Scherr <software@cscherr.de>"]
license = "MIT" license = "MIT"
@ -28,10 +28,10 @@ categories = [
[workspace.dependencies] [workspace.dependencies]
anyhow = "1.0.79" anyhow = "1.0.79"
thiserror = "1.0.56" thiserror = "1.0.56"
libpt-core = { version = "0.4.0-alpha.2", path = "members/libpt-core" } libpt-core = { version = "0.3.12", path = "members/libpt-core" }
libpt-bintols = { version = "0.4.0-alpha.2", path = "members/libpt-bintols" } libpt-bintols = { version = "0.3.12", path = "members/libpt-bintols" }
libpt-log = { version = "0.4.0-alpha.2", path = "members/libpt-log" } libpt-log = { version = "0.3.12", path = "members/libpt-log" }
libpt-py = { version = "0.4.0-alpha.2", path = "members/libpt-py" } libpt-py = { version = "0.3.12", path = "members/libpt-py" }
[package] [package]
name = "libpt" name = "libpt"

View file

@ -1,7 +1,7 @@
[package] [package]
name = "libpt-bintols" name = "libpt-bintols"
publish.workspace = true publish.workspace = true
version = "0.4.0" version = "0.3.12"
edition.workspace = true edition.workspace = true
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

View file

@ -1,7 +1,7 @@
[package] [package]
name = "libpt-core" name = "libpt-core"
publish.workspace = true publish.workspace = true
version = "0.4.0" version = "0.3.12"
edition.workspace = true edition.workspace = true
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

View file

@ -1,7 +1,7 @@
[package] [package]
name = "libpt-log" name = "libpt-log"
publish.workspace = true publish.workspace = true
version = "0.4.0" version = "0.3.12"
edition.workspace = true edition.workspace = true
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

View file

@ -2,8 +2,13 @@
set -e set -e
cargo check --all-features cargo check --all-features
echo ">>>>>>>> SELECT A NEW VERSION" echo ">>>>>>>> SELECT A NEW VERSION"
cargo ws version cargo ws version --no-git-commit
NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1') NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1')
bash scripts/set_all_versions.sh $NEW_VERSION
git add -A
git commit -m "Release v$NEW_VERSION" || (echo ">>>>>>>> COMMIT FAILED OR THERE WAS NOTHING TO COMMIT"; sleep 5)
echo ">>>>>>>> SKIP!!!!!"
cargo ws version --amend
echo ">>>>>>>> PUBLISHING RELEASE FOR REPO" echo ">>>>>>>> PUBLISHING RELEASE FOR REPO"
bash scripts/release.sh bash scripts/release.sh
echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT" echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT"
@ -11,10 +16,14 @@ sleep 10
cargo publish -p libpt-log cargo publish -p libpt-log
cargo publish -p libpt-core cargo publish -p libpt-core
cargo publish -p libpt-bintols cargo publish -p libpt-bintols
cargo publish -p libpt-math
cargo publish -p libpt-net
cargo publish -p libpt cargo publish -p libpt
echo ">>>>>>>> PUBLISHING TO CSCHERR.DE NEXT" echo ">>>>>>>> PUBLISHING TO CSCHERR.DE NEXT"
sleep 3 sleep 3
cargo publish --registry cscherr -p libpt-log cargo publish --registry cscherr -p libpt-log
cargo publish --registry cscherr -p libpt-core cargo publish --registry cscherr -p libpt-core
cargo publish --registry cscherr -p libpt-bintols cargo publish --registry cscherr -p libpt-bintols
cargo publish --registry cscherr -p libpt-math
cargo publish --registry cscherr -p libpt-net
cargo publish --registry cscherr -p libpt cargo publish --registry cscherr -p libpt

6
scripts/set_all_versions.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
export NEW_VER=$1
pwd
sed -i 's/\(^\s*version\)\s*=\s*"\([^"]*\)"$/\1 = "'$NEW_VER'"/g' Cargo.toml
find * -name 'Cargo.toml' -type f \
-exec sed -i 's/\(libpt.*version\s*=\s*\)"[^"]*"/\1"'$NEW_VER'"/g' Cargo.toml {} +

View file

@ -12,3 +12,5 @@ pub use libpt_bintols as bintols;
pub use libpt_core as core; pub use libpt_core as core;
#[cfg(feature = "log")] #[cfg(feature = "log")]
pub use libpt_log as log; pub use libpt_log as log;
#[cfg(feature = "py")]
pub use libpt_py as py;