Skip to content

Commit

Permalink
feat: export llvm test utilities under llvm-test feature (#1677)
Browse files Browse the repository at this point in the history
Closes #1673
  • Loading branch information
ss2165 authored Nov 22, 2024
1 parent 1b94d45 commit 78435b5
Show file tree
Hide file tree
Showing 28 changed files with 338 additions and 298 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ jobs:

tests-stable-llvm:
needs: changes
if: ${{ ( needs.changes.outputs.llvm == 'true' && github.event_name == 'push' ) || needs.changes.outputs.override == 'true' }}
if: ${{ ( needs.changes.outputs.llvm == 'true' && github.event_name == 'push' ) || needs.changes.outputs.override == 'true' }}
runs-on: ubuntu-latest
name: tests hugr-llvm
strategy:
Expand Down
29 changes: 21 additions & 8 deletions hugr-llvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,23 @@ keywords = ["Quantum", "Quantinuum"]
categories = ["compilers"]

[features]
test-utils = [
"insta",
"rstest",
"portgraph",
"pathsearch",
"serde_json",
"serde",
"typetag",
]

default = ["llvm14-0"]
llvm14-0 = ["inkwell/llvm14-0"]


[dependencies]
inkwell = { version = "0.4.0", default-features = false }
hugr-core = { path = "../hugr-core", version = "0.13.3"}
hugr-core = { path = "../hugr-core", version = "0.13.3" }
anyhow = "1.0.83"
itertools.workspace = true
delegate.workspace = true
Expand All @@ -30,11 +41,13 @@ lazy_static.workspace = true
downcast-rs.workspace = true
strum.workspace = true

insta = { workspace = true, optional = true }
rstest = { workspace = true, optional = true }
portgraph = { workspace = true, optional = true }
pathsearch = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
typetag = { workspace = true, optional = true }

[dev-dependencies]
insta.workspace = true
rstest.workspace = true
portgraph.workspace = true
pathsearch.workspace = true
serde_json.workspace = true
serde.workspace = true
typetag.workspace = true
hugr-llvm = {"path" = ".", features = ["test-utils"]}
2 changes: 1 addition & 1 deletion hugr-llvm/src/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,5 @@ pub fn get_intrinsic<'c>(
))
}

#[cfg(test)]
#[cfg(any(test, feature = "test-utils"))]
pub mod test;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 78435b5

Please sign in to comment.