mirror of
https://github.com/gorules/zen.git
synced 2026-10-03 16:02:27 +00:00
chore: improve release pipeline (#451)
* chore: improve release pipeline * fix pipelines * fix sccache * update workflows * fix workflow * update workflow * remove sccache and cross * bring back sccache * fix pipelines * fix nodejs build * fix pipelines * move python to abi3 for future proofing * fix workflow ordering bug * gate releases via environment - configure go via release * set release as 1.0.0-beta
This commit is contained in:
@@ -12,7 +12,7 @@ crate-type = ["cdylib"]
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
either = "1"
|
||||
pyo3 = { version = "0.25", features = ["anyhow", "serde", "either"] }
|
||||
pyo3 = { version = "0.25", features = ["anyhow", "serde", "either", "abi3-py38"] }
|
||||
pyo3-async-runtimes = { version = "0.25", features = ["tokio-runtime", "attributes"] }
|
||||
pythonize = "0.25"
|
||||
json_dotpath = { workspace = true }
|
||||
|
||||
@@ -35,8 +35,8 @@ impl<'py> FromPyObject<'py> for PyZenDecisionContentJson {
|
||||
}
|
||||
|
||||
if let Ok(b) = ob.downcast::<PyString>() {
|
||||
let str = b.to_str()?;
|
||||
let content = serde_json::from_str(str).context("Invalid JSON")?;
|
||||
let str = b.to_cow()?;
|
||||
let content = serde_json::from_str(&str).context("Invalid JSON")?;
|
||||
|
||||
return Ok(Self(PyZenDecisionContent(Arc::new(content))));
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ impl<'py> IntoPyObject<'py> for PyValue {
|
||||
impl<'py> FromPyObject<'py> for PyValue {
|
||||
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
|
||||
if let Ok(s) = ob.downcast::<PyString>() {
|
||||
let str_slice = s.to_str()?;
|
||||
let str_slice = s.to_cow()?;
|
||||
|
||||
let var = serde_json::from_str(str_slice).context("Invalid JSON")?;
|
||||
let var = serde_json::from_str(&str_slice).context("Invalid JSON")?;
|
||||
return Ok(PyValue(var));
|
||||
}
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@ impl<'py> IntoPyObject<'py> for PyVariable {
|
||||
impl<'py> FromPyObject<'py> for PyVariable {
|
||||
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
|
||||
if let Ok(s) = ob.downcast::<PyString>() {
|
||||
let str_slice = s.to_str()?;
|
||||
let str_slice = s.to_cow()?;
|
||||
|
||||
let var = serde_json::from_str(str_slice).context("Invalid JSON")?;
|
||||
let var = serde_json::from_str(&str_slice).context("Invalid JSON")?;
|
||||
return Ok(PyVariable(var));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user