-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflows to support python and rust crate publish (#44)
* Update workflows * Attempt to update working directory * Update working dir for real * Update python container? * Maybe missing extension * Cleanup rust actions * update mappers dep * Update package metadata * Update rust workflows
- Loading branch information
1 parent
ba0566f
commit 86582fe
Showing
9 changed files
with
252 additions
and
47 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
# This file is autogenerated by maturin v1.7.0 | ||
# To update, run | ||
# | ||
# maturin generate-ci github | ||
# | ||
name: python ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux: | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- runner: ubuntu-latest | ||
target: x86_64 | ||
- runner: ubuntu-latest | ||
target: x86 | ||
- runner: ubuntu-latest | ||
target: aarch64 | ||
- runner: ubuntu-latest | ||
target: armv7 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
working-directory: python | ||
target: ${{ matrix.platform.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
manylinux: auto | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-linux-${{ matrix.platform.target }} | ||
path: dist | ||
|
||
musllinux: | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- runner: ubuntu-latest | ||
target: x86_64 | ||
- runner: ubuntu-latest | ||
target: x86 | ||
- runner: ubuntu-latest | ||
target: aarch64 | ||
- runner: ubuntu-latest | ||
target: armv7 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
working-directory: python | ||
target: ${{ matrix.platform.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
manylinux: musllinux_1_2 | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-musllinux-${{ matrix.platform.target }} | ||
path: dist | ||
|
||
windows: | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- runner: windows-latest | ||
target: x64 | ||
- runner: windows-latest | ||
target: x86 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
architecture: ${{ matrix.platform.target }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
working-directory: python | ||
target: ${{ matrix.platform.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-windows-${{ matrix.platform.target }} | ||
path: dist | ||
|
||
macos: | ||
runs-on: ${{ matrix.platform.runner }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- runner: macos-12 | ||
target: x86_64 | ||
- runner: macos-14 | ||
target: aarch64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
working-directory: python | ||
target: ${{ matrix.platform.target }} | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-macos-${{ matrix.platform.target }} | ||
path: dist | ||
|
||
sdist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build sdist | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
working-directory: python | ||
command: sdist | ||
args: --out dist | ||
- name: Upload sdist | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-sdist | ||
path: dist | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [linux, musllinux, windows, macos, sdist] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- 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 wheels-*/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: rust ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: run cargo check | ||
run: cargo build | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: run cargo test | ||
run: cargo test | ||
|
||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [check, test] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
- name: publish gribberish-types | ||
run: cargo publish -p gribberish-types | ||
- name: publish gribberish-macros | ||
run: cargo publish -p gribberish-macros | ||
- name: publish gribberish | ||
run: cargo publish -p gribberish |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,22 @@ | |
name = "gribberish" | ||
version = "0.20.0" | ||
authors = ["Matthew Iannucci <[email protected]>"] | ||
description = "Parse grib 2 files with Rust" | ||
edition = "2021" | ||
license = "MIT" | ||
repository = "https://github.com/mpiannucci/gribberish" | ||
keywords = ["grib", "weather", "meteorology", "climate", "oceanography"] | ||
categories = ["science", "encoding", "compression"] | ||
|
||
[dependencies] | ||
gribberish-types = { path = "../types" } | ||
gribberish-macros = { path = "../macros" } | ||
gribberish-types = { path = "../types", version = "0.20.0" } | ||
gribberish-macros = { path = "../macros", version = "0.20.0" } | ||
chrono = "0.4" | ||
openjpeg-sys = { version = "1.0.3", optional = true } | ||
png = { version = "0.17.2", optional = true } | ||
num = { version = "0.2", default-features = false } | ||
itertools = "0.10.5" | ||
mappers = { git = "https://github.com/mpiannucci/mappers" } | ||
mappers = "0.7.1" | ||
bitvec = "1.0.1" | ||
thiserror = "1.0.60" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
[package] | ||
name = "gribberish-macros" | ||
version = "0.1.0" | ||
version = "0.20.0" | ||
authors = ["Matthew Iannucci <[email protected]>"] | ||
edition = "2018" | ||
description = "Procedural macros for the gribberish crate" | ||
edition = "2021" | ||
license = "MIT" | ||
repository = "https://github.com/mpiannucci/gribberish" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
gribberish-types = { path = "./../types" } | ||
gribberish-types = { path = "./../types", version = "0.20.0" } | ||
syn = { version = "1.0", features = ["full"] } | ||
quote = "1.0" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
[package] | ||
name = "gribberish-types" | ||
version = "0.1.0" | ||
version = "0.20.0" | ||
authors = ["Matthew Iannucci <[email protected]>"] | ||
edition = "2018" | ||
description = "Common types for the gribberish crate" | ||
edition = "2021" | ||
license = "MIT" | ||
repository = "https://github.com/mpiannucci/gribberish" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
|