fix compilation of wasm32 test and skip to run wasm32 tests
This commit is contained in:
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -44,7 +44,8 @@ jobs:
|
|||||||
# architectures
|
# architectures
|
||||||
- { os: ubuntu-22.04, rust-version: stable, target: 'x86_64-unknown-linux-gnu', publish: true }
|
- { os: ubuntu-22.04, rust-version: stable, target: 'x86_64-unknown-linux-gnu', publish: true }
|
||||||
- { os: ubuntu-22.04, rust-version: stable, target: 'i686-unknown-linux-gnu', publish: true }
|
- { os: ubuntu-22.04, rust-version: stable, target: 'i686-unknown-linux-gnu', publish: true }
|
||||||
- { os: ubuntu-22.04, rust-version: nightly, target: 'wasm32-unknown-unknown', publish: true, args: '--no-default-features' }
|
# FIXME(issue #2138): run wasm tests, failing to run since https://github.com/mthom/scryer-prolog/pull/2137 removed wasm-pack
|
||||||
|
- { os: ubuntu-22.04, rust-version: nightly, target: 'wasm32-unknown-unknown', publish: true, args: '--no-default-features' , test-args: '--no-run --no-default-features' }
|
||||||
# rust versions
|
# rust versions
|
||||||
- { os: ubuntu-22.04, rust-version: "1.70", target: 'x86_64-unknown-linux-gnu'}
|
- { os: ubuntu-22.04, rust-version: "1.70", target: 'x86_64-unknown-linux-gnu'}
|
||||||
- { os: ubuntu-22.04, rust-version: beta, target: 'x86_64-unknown-linux-gnu'}
|
- { os: ubuntu-22.04, rust-version: beta, target: 'x86_64-unknown-linux-gnu'}
|
||||||
@@ -65,7 +66,7 @@ jobs:
|
|||||||
- name: Build library
|
- name: Build library
|
||||||
run: cargo build --all-targets --target ${{ matrix.target }} ${{ matrix.args }} --verbose
|
run: cargo build --all-targets --target ${{ matrix.target }} ${{ matrix.args }} --verbose
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test --target ${{ matrix.target }} ${{ matrix.args }} --all
|
run: cargo test --target ${{ matrix.target }} ${{ matrix.test-args }} --all
|
||||||
|
|
||||||
# On stable rust builds, build a binary and publish as a github actions
|
# On stable rust builds, build a binary and publish as a github actions
|
||||||
# artifact. These binaries could be useful for testing the pipeline but
|
# artifact. These binaries could be useful for testing the pipeline but
|
||||||
|
|||||||
57
Cargo.toml
57
Cargo.toml
@@ -37,55 +37,55 @@ to-syn-value_derive = "0.1.1"
|
|||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
base64 = "0.12.3"
|
||||||
bit-set = "0.5.3"
|
bit-set = "0.5.3"
|
||||||
bitvec = "1"
|
bitvec = "1"
|
||||||
|
blake2 = "0.8.1"
|
||||||
|
bytes = "1"
|
||||||
|
chrono = "0.4.11"
|
||||||
cpu-time = "1.0.0"
|
cpu-time = "1.0.0"
|
||||||
|
crrl = "0.6.0"
|
||||||
|
dashu = "0.4.0"
|
||||||
|
derive_deref = "1.1.1"
|
||||||
dirs-next = "2.0.0"
|
dirs-next = "2.0.0"
|
||||||
divrem = "0.1.0"
|
divrem = "0.1.0"
|
||||||
|
futures = "0.3"
|
||||||
fxhash = "0.2.1"
|
fxhash = "0.2.1"
|
||||||
git-version = "0.3.4"
|
git-version = "0.3.4"
|
||||||
indexmap = "1.0.2"
|
indexmap = "1.0.2"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
lexical = "5.2.2"
|
lexical = "5.2.2"
|
||||||
libc = "0.2.62"
|
libc = "0.2.62"
|
||||||
|
libloading = "0.7"
|
||||||
modular-bitfield = "0.11.2"
|
modular-bitfield = "0.11.2"
|
||||||
|
num-order = { version = "1.2.0" }
|
||||||
ordered-float = "2.6.0"
|
ordered-float = "2.6.0"
|
||||||
phf = { version = "0.9", features = ["macros"] }
|
phf = { version = "0.9", features = ["macros"] }
|
||||||
|
rand = "0.8.5"
|
||||||
ref_thread_local = "0.0.0"
|
ref_thread_local = "0.0.0"
|
||||||
|
regex = "1.9.1"
|
||||||
|
ring = { version = "0.17.5", features = ["wasm32_unknown_unknown_js"] }
|
||||||
ripemd160 = "0.8.0"
|
ripemd160 = "0.8.0"
|
||||||
sha3 = "0.8.2"
|
|
||||||
blake2 = "0.8.1"
|
|
||||||
crrl = "0.6.0"
|
|
||||||
chrono = "0.4.11"
|
|
||||||
select = "0.6.0"
|
|
||||||
roxmltree = "0.11.0"
|
roxmltree = "0.11.0"
|
||||||
base64 = "0.12.3"
|
ryu = "1.0.9"
|
||||||
|
select = "0.6.0"
|
||||||
|
sha3 = "0.8.2"
|
||||||
smallvec = "1.8.0"
|
smallvec = "1.8.0"
|
||||||
static_assertions = "1.1.0"
|
static_assertions = "1.1.0"
|
||||||
ryu = "1.0.9"
|
|
||||||
futures = "0.3"
|
|
||||||
regex = "1.9.1"
|
|
||||||
libloading = "0.7"
|
|
||||||
derive_deref = "1.1.1"
|
|
||||||
bytes = "1"
|
|
||||||
dashu = "0.4.0"
|
|
||||||
num-order = { version = "1.2.0" }
|
|
||||||
rand = "0.8.5"
|
|
||||||
ring = { version = "0.17.5", features = ["wasm32_unknown_unknown_js"] }
|
|
||||||
|
|
||||||
serde_json = "1.0.95"
|
serde_json = "1.0.95"
|
||||||
serde = "1.0.159"
|
serde = "1.0.159"
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
libffi = { version = "3.2.0", optional = true }
|
|
||||||
hostname = { version = "0.3.1", optional = true }
|
|
||||||
crossterm = { version = "0.20.0", optional = true }
|
crossterm = { version = "0.20.0", optional = true }
|
||||||
ctrlc = { version = "3.2.2", optional = true }
|
ctrlc = { version = "3.2.2", optional = true }
|
||||||
rustyline = { version = "12.0.0", optional = true }
|
hostname = { version = "0.3.1", optional = true }
|
||||||
|
libffi = { version = "3.2.0", optional = true }
|
||||||
native-tls = { version = "0.2.4", optional = true }
|
native-tls = { version = "0.2.4", optional = true }
|
||||||
warp = { version = "=0.3.5", features = ["tls"], optional = true }
|
|
||||||
reqwest = { version = "0.11.18", optional = true }
|
reqwest = { version = "0.11.18", optional = true }
|
||||||
|
rustyline = { version = "12.0.0", optional = true }
|
||||||
tokio = { version = "1.28.2", features = ["full"] }
|
tokio = { version = "1.28.2", features = ["full"] }
|
||||||
|
warp = { version = "=0.3.5", features = ["tls"], optional = true }
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
getrandom = { version = "0.2.10", features = ["js"] }
|
getrandom = { version = "0.2.10", features = ["js"] }
|
||||||
@@ -102,19 +102,26 @@ console_error_panic_hook = "0.1"
|
|||||||
wasm-bindgen = "0.2.87"
|
wasm-bindgen = "0.2.87"
|
||||||
wasm-bindgen-futures = "0.4"
|
wasm-bindgen-futures = "0.4"
|
||||||
serde-wasm-bindgen = "0.5"
|
serde-wasm-bindgen = "0.5"
|
||||||
web-sys = { version = "0.3", features = ["Document", "Window", "Element", "Performance"] }
|
web-sys = { version = "0.3", features = [
|
||||||
|
"Document",
|
||||||
|
"Window",
|
||||||
|
"Element",
|
||||||
|
"Performance",
|
||||||
|
] }
|
||||||
js-sys = "0.3"
|
js-sys = "0.3"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
assert_cmd = "1.0.3"
|
|
||||||
predicates-core = "1.0.2"
|
|
||||||
maplit = "1.0.2"
|
maplit = "1.0.2"
|
||||||
|
predicates-core = "1.0.2"
|
||||||
serial_test = "2.0.0"
|
serial_test = "2.0.0"
|
||||||
iai-callgrind = { git = "https://github.com/iai-callgrind/iai-callgrind.git", rev = "c77bc3c83d7f4e976cc42d4597236a8db259e772" }
|
|
||||||
|
[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dev-dependencies]
|
||||||
|
assert_cmd = "1.0.3"
|
||||||
criterion = "0.5.1"
|
criterion = "0.5.1"
|
||||||
|
iai-callgrind = { git = "https://github.com/iai-callgrind/iai-callgrind.git", rev = "c77bc3c83d7f4e976cc42d4597236a8db259e772" }
|
||||||
trycmd = "0.14.19"
|
trycmd = "0.14.19"
|
||||||
|
|
||||||
[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
|
[target.'cfg(not(any(target_os = "windows", all(target_arch = "wasm32", target_os = "unknown"))))'.dev-dependencies]
|
||||||
pprof = { version = "0.13.0", features = ["criterion", "flamegraph"] }
|
pprof = { version = "0.13.0", features = ["criterion", "flamegraph"] }
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
fn main() -> std::process::ExitCode {
|
fn main() -> std::process::ExitCode {
|
||||||
use scryer_prolog::atom_table::Atom;
|
use scryer_prolog::atom_table::Atom;
|
||||||
use scryer_prolog::*;
|
use scryer_prolog::*;
|
||||||
use std::sync::atomic::Ordering;
|
|
||||||
|
|
||||||
#[cfg(feature = "repl")]
|
#[cfg(feature = "repl")]
|
||||||
ctrlc::set_handler(move || {
|
ctrlc::set_handler(move || {
|
||||||
scryer_prolog::machine::INTERRUPT.store(true, Ordering::Relaxed);
|
scryer_prolog::machine::INTERRUPT.store(true, std::sync::atomic::Ordering::Relaxed);
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ mod src_tests;
|
|||||||
/// to re-generate all reference output files run `TRYCMD=overwrite cargo test -- cli_test`
|
/// to re-generate all reference output files run `TRYCMD=overwrite cargo test -- cli_test`
|
||||||
/// then check that the changes are as expected e.g. by looking at the `git diff`
|
/// then check that the changes are as expected e.g. by looking at the `git diff`
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
|
||||||
#[cfg_attr(miri, ignore = "blocked on crossbeam UB")]
|
#[cfg_attr(miri, ignore = "blocked on crossbeam UB")]
|
||||||
fn cli_tests() {
|
fn cli_tests() {
|
||||||
trycmd::TestCases::new()
|
trycmd::TestCases::new()
|
||||||
|
|||||||
Reference in New Issue
Block a user