Skip to content

Commit

Permalink
Merge pull request #342 from koto-lang/fix-rc-builds-when-using-seria…
Browse files Browse the repository at this point in the history
…lization-libs

Ensure that libs can be used with the rc build variant
  • Loading branch information
irh authored Jun 11, 2024
2 parents 06583ec + 3467ad1 commit acef57e
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 14 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,34 @@ jobs:
- name: Test with optimizations
run: just test_release --verbose

build_and_test_rc:
# We don't need to test rc builds on all platforms for now
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Test the rc build variant
run: just test_rc --verbose

build_and_test_release_rc:
# We don't need to test rc builds on all platforms for now
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Test the rc build variant
run: just test_rc --release --verbose

code_checks:
runs-on: ubuntu-latest

Expand Down
6 changes: 4 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ test *args:
cargo test {{args}}

test_rc *args:
cargo test -p koto_runtime --no-default-features --features rc {{args}}
cargo test --no-default-features --features rc \
-p koto_runtime \
-p lib_tests \
{{args}}

test_benches:
cargo test --benches
Expand Down Expand Up @@ -54,7 +57,6 @@ test_parser:

test_release *args:
just test --release {{args}}
just test_rc --release {{args}}

test_runtime:
cargo test --package koto_runtime
Expand Down
6 changes: 5 additions & 1 deletion libs/json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ arc = ["koto_runtime/arc"]
rc = ["koto_runtime/rc"]

[dependencies]
koto_serialize = { path = "../../crates/serialize", version = "^0.15.0" }
serde_json = { workspace = true }

[dependencies.koto_runtime]
path = "../../crates/runtime"
version = "^0.15.0"
default-features = false

[dependencies.koto_serialize]
path = "../../crates/serialize"
version = "^0.15.0"
default-features = false

[dev-dependencies]
koto_test_utils = { path = "../../crates/test_utils", default-features = false }
23 changes: 14 additions & 9 deletions libs/lib_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ description = "A test runner for the standard Koto libraries"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["arc"]
arc = ["koto/arc"]
rc = ["koto/rc"]

[dev-dependencies]
koto = { path = "../../crates/koto", version = "^0.15.0" }
koto_color = { path = "../color", version = "^0.15.0" }
koto_geometry = { path = "../geometry", version = "^0.15.0" }
koto_json = { path = "../json", version = "^0.15.0" }
koto_random = { path = "../random", version = "^0.15.0" }
koto_regex = { path = "../regex", version = "^0.15.0" }
koto_tempfile = { path = "../tempfile", version = "^0.15.0" }
koto_toml = { path = "../toml", version = "^0.15.0" }
koto_yaml = { path = "../yaml", version = "^0.15.0" }
koto = { path = "../../crates/koto", version = "^0.15.0", default-features = false }
koto_color = { path = "../color", version = "^0.15.0", default-features = false }
koto_geometry = { path = "../geometry", version = "^0.15.0", default-features = false }
koto_json = { path = "../json", version = "^0.15.0", default-features = false }
koto_random = { path = "../random", version = "^0.15.0", default-features = false }
koto_regex = { path = "../regex", version = "^0.15.0", default-features = false }
koto_tempfile = { path = "../tempfile", version = "^0.15.0", default-features = false }
koto_toml = { path = "../toml", version = "^0.15.0", default-features = false }
koto_yaml = { path = "../yaml", version = "^0.15.0", default-features = false }
6 changes: 5 additions & 1 deletion libs/toml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ arc = ["koto_runtime/arc"]
rc = ["koto_runtime/rc"]

[dependencies]
koto_serialize = { path = "../../crates/serialize", version = "^0.15.0" }
toml = { workspace = true }

[dependencies.koto_runtime]
path = "../../crates/runtime"
version = "^0.15.0"
default-features = false

[dependencies.koto_serialize]
path = "../../crates/serialize"
version = "^0.15.0"
default-features = false

[dev-dependencies]
koto_test_utils = { path = "../../crates/test_utils", default-features = false }
6 changes: 5 additions & 1 deletion libs/yaml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ arc = ["koto_runtime/arc"]
rc = ["koto_runtime/rc"]

[dependencies]
koto_serialize = { path = "../../crates/serialize", version = "^0.15.0" }
serde_yaml = { workspace = true }

[dependencies.koto_runtime]
path = "../../crates/runtime"
version = "^0.15.0"
default-features = false

[dependencies.koto_serialize]
path = "../../crates/serialize"
version = "^0.15.0"
default-features = false

[dev-dependencies]
koto_test_utils = { path = "../../crates/test_utils", default-features = false }

0 comments on commit acef57e

Please sign in to comment.