Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all examples to a top-level directory #1286

Merged
merged 9 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ jobs:
Get-Command clang.exe
clang.exe --version

# Install wasm32-wasi target in order to build wasi-common's integration
# tests
# Install wasm32 targets in order to build various tests throughout the
# repo
- run: rustup target add wasm32-wasi
- run: rustup target add wasm32-unknown-unknown

- run: cargo fetch --locked
- run: cargo fetch --locked --manifest-path crates/test-programs/wasi-tests/Cargo.toml
Expand All @@ -197,6 +198,9 @@ jobs:
- run: cargo build --manifest-path crates/api/Cargo.toml --features lightbeam
if: matrix.rust == 'nightly'

# Ensure all our examples build and execute
- run: cargo run -p run-examples

# Build and test all features except for lightbeam
- run: cargo test --features test_programs --all --exclude lightbeam --exclude wasmtime-c-api -- --nocapture
env:
Expand All @@ -205,7 +209,7 @@ jobs:

# Test debug (DWARF) related functionality.
- run: cargo test test_debug_dwarf_ -- --ignored --nocapture --test-threads 1
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-latest'
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
path = tests/spec_testsuite
url = https://github.com/WebAssembly/testsuite
[submodule "crates/c-api/examples/wasm-c-api"]
path = crates/c-api/examples/wasm-c-api
path = crates/c-api/wasm-c-api
url = https://github.com/WebAssembly/wasm-c-api
[submodule "crates/wasi-common/WASI"]
path = crates/wasi-common/wig/WASI
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

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

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ opt-level = 0
[workspace]
members = [
"cranelift",
"crates/c-api",
"crates/fuzzing",
"crates/misc/rust",
"crates/misc/py",
"crates/c-api",
"fuzz",
"crates/misc/run-examples",
"crates/misc/rust",
"crates/wiggle",
"examples/fib-debug/wasm",
"fuzz",
]

[features]
Expand Down
2 changes: 1 addition & 1 deletion ci/build-tarballs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mkdir tmp/$api_pkgname/lib
mkdir tmp/$api_pkgname/include
cp LICENSE README.md tmp/$api_pkgname
mv bins-$src/* tmp/$api_pkgname/lib
cp crates/c-api/examples/wasm-c-api/include/wasm.h tmp/$api_pkgname/include
cp crates/c-api/wasm-c-api/include/wasm.h tmp/$api_pkgname/include
cp crates/c-api/include/{wasmtime,wasi}.h tmp/$api_pkgname/include
mktarball $api_pkgname

Expand Down
60 changes: 0 additions & 60 deletions crates/api/examples/gcd.rs

This file was deleted.

160 changes: 0 additions & 160 deletions crates/api/examples/memory.rs

This file was deleted.

Loading