Skip to content

Commit

Permalink
fix build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jueseitz committed Aug 2, 2024
1 parent aa8b65e commit aee2eed
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 87 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
with:
submodules: recursive
- uses: dtolnay/[email protected]
- name: get-cmake
uses: lukka/get-cmake@latest
- uses: jetli/[email protected]
with:
version: "v0.12.1"
Expand All @@ -30,11 +32,14 @@ jobs:
rustup component add clippy
cargo clippy --no-deps
- name: Build
run: cargo build --release
run: cargo build --features schema,trace --release
- name: Test Rust
run: cargo test
run: cargo test --features schema,trace
- name: Build WASM
run: wasm-pack build --release --target nodejs --reference-types --weak-refs
run: |
wasm-pack build --release --target nodejs --reference-types --weak-refs --features wasm
cp target/schemas/out/980faa7cf81d51eab3f26de770ae345d.xsdb pkg/xwasser-v050.xsdb.bin
cp package.tmp.json pkg/package.json
- name: Test WASM
run: |
pnpm i
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ jobs:
with:
submodules: recursive
- uses: dtolnay/[email protected]
- name: get-cmake
uses: lukka/get-cmake@latest
- name: Publish to crates.io.
run: |
cargo publish --token ${CRATES_TOKEN}
cargo publish --token ${CRATES_TOKEN} -p xoev-xwasser-derive
cargo publish --token ${CRATES_TOKEN} -p xoev-xwasser
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
- uses: actions/setup-node@v4
Expand Down
20 changes: 16 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 20 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["crates/*"]

[workspace.package]
edition = "2021"
version = "0.2.3+0.5.0"
version = "0.3.0+0.5.0"
description = """
"XOEV XWasser XML Standard"
"""
Expand All @@ -16,7 +16,16 @@ categories = []
keywords = []

[workspace.dependencies]
xoev-xwasser-derive-rs = { version = "0.2.3", path = "crates/derive" }
anyhow = "1"
xoev-xwasser-derive = { version = "0.3.0", path = "crates/derive" }
raxb = "0.4.1"
raxb-validate = "0.4.1"
raxb-xmlschema = "0.4.1"
raxb-xmlschema-build = "0.4.1"
# raxb = { path = "../raxb/crates/raxb" }
# raxb-validate = { path = "../raxb/crates/raxb-validate"}
# raxb-xmlschema = { path = "../raxb/crates/raxb-xmlschema"}
# raxb-xmlschema-build = { path = "../raxb/crates/raxb-xmlschema-build"}

[package]
name = "xoev-xwasser"
Expand Down Expand Up @@ -45,25 +54,24 @@ schema = [
]

[dependencies]

xoev-xwasser-derive-rs.workspace = true
xoev-xwasser-derive.workspace = true
anyhow = { version = "1", optional = true }
rust-embed = { version = "8.5.0", optional = true }
raxb = { path = "../raxb/crates/raxb", features = ["trace"] }
raxb-validate = { path = "../raxb/crates/raxb-validate", optional = true }
raxb-xmlschema = { path = "../raxb/crates/raxb-xmlschema", optional = true }
serde = { version = "1.0.203", features = ["derive"] }
raxb = { workspace = true, features = ["trace"] }
raxb-validate = { workspace = true, optional = true }
raxb-xmlschema = { workspace = true, optional = true }
wasm-bindgen = { version = "0.2.84", optional = true }
tsify = { version = "0.4.5", features = ["js"], optional = true }
serde = { version = "1.0.203", features = ["derive"] }

[build-dependencies]
raxb-xmlschema-build = { path = "../raxb/crates/raxb-xmlschema-build" }
anyhow = "1"
anyhow.workspace = true
raxb-xmlschema-build.workspace = true

[dev-dependencies]
raxb-xmlschema-build = { path = "../raxb/crates/raxb-xmlschema-build" }
anyhow.workspace = true
raxb-xmlschema-build.workspace = true
serde_json = "1"
anyhow = "1"
test-log = { version = "0.2.16", features = ["trace", "color"] }

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

cargo test --features schema,trace
wasm-pack build --release --target nodejs --reference-types --weak-refs --features wasm --no-default-features
cp target/schemas/out/980faa7cf81d51eab3f26de770ae345d.xsdb pkg/xwasser-v050.xsdb.bin
cp package.tmp.json pkg/package.json
2 changes: 1 addition & 1 deletion crates/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "xoev-xwasser-derive-rs"
name = "xoev-xwasser-derive"
edition.workspace = true
version.workspace = true
description.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xoev-xwasser",
"version": "1.0.0",
"version": "0.3.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.tmp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"H & D GmbH Open Source <[email protected]>"
],
"description": "\"XOEV XWasser XML Standard\"\n",
"version": "0.2.3+0.5.0",
"version": "0.3.0+0.5.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions src/model/codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
#[cfg(feature = "wasm")]
use tsify::Tsify;

use xoev_xwasser_derive_rs::xoev_xwasser_code;
use xoev_xwasser_derive::xoev_xwasser_code;

use raxb::de::XmlDeserializeError;
use std::str::FromStr;
Expand Down Expand Up @@ -52,9 +52,9 @@ pub struct CodeBehoerdenkennungType {
#[xml(name = b"code", ty = "child")]
pub code: String,
#[xml(name = b"name", ty = "child")]
pub name: Option<String>,
pub name: Option<String>,
#[xml(name = b"listURI", ty = "attr")]
pub list_uri: String,
pub list_uri: String,
#[xml(name = b"listVersionID", ty = "attr")]
pub list_version_id: String,
}
Expand Down
Loading

0 comments on commit aee2eed

Please sign in to comment.