-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from dhardy/ci
Add CI config and implement on WASM
- Loading branch information
Showing
19 changed files
with
628 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock | ||
*.ts | ||
*.js | ||
*.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
language: rust | ||
sudo: false | ||
|
||
matrix: | ||
include: | ||
- rust: 1.28.0 | ||
env: DESCRIPTION="Linux, 1.28.0" | ||
os: linux | ||
|
||
- rust: 1.28.0 | ||
env: DESCRIPTION="OSX, 1.22.0" | ||
os: osx | ||
|
||
- rust: stable | ||
env: DESCRIPTION="Linux, stable" | ||
|
||
- rust: stable | ||
env: DESCRIPTION="OSX+iOS, stable" | ||
os: osx | ||
install: | ||
- rustup target add aarch64-apple-ios | ||
|
||
- rust: beta | ||
env: DESCRIPTION="Linux, beta" | ||
|
||
- rust: nightly | ||
os: linux | ||
env: DESCRIPTION="Linux, nightly, docs" | ||
install: | ||
- cargo --list | egrep "^\s*deadlinks$" -q || cargo install cargo-deadlinks | ||
- cargo deadlinks -V | ||
script: | ||
- cargo test | ||
- cargo test --benches | ||
- cargo test --examples | ||
# remove cached documentation, otherwise files from previous PRs can get included | ||
- rm -rf target/doc | ||
- cargo doc --no-deps --all --all-features | ||
- cargo deadlinks --dir target/doc | ||
|
||
- rust: nightly | ||
os: osx | ||
env: DESCRIPTION="OSX, nightly, docs" | ||
install: | ||
- cargo --list | egrep "^\s*deadlinks$" -q || cargo install cargo-deadlinks | ||
- cargo deadlinks -V | ||
script: | ||
- cargo test | ||
- cargo test --benches | ||
- cargo test --examples | ||
# remove cached documentation, otherwise files from previous PRs can get included | ||
- rm -rf target/doc | ||
- cargo doc --no-deps --all --all-features | ||
- cargo deadlinks --dir target/doc | ||
|
||
- rust: nightly | ||
env: DESCRIPTION="WASM via emscripten, stdweb and wasm-bindgen" | ||
install: | ||
- rustup target add wasm32-unknown-unknown | ||
- rustup target add wasm32-unknown-emscripten | ||
- nvm install 9 | ||
- ./utils/ci/install_cargo_web.sh | ||
- cargo web prepare-emscripten | ||
- cargo web -V | ||
- cargo list | grep install-update || cargo install -f cargo-update | ||
- cargo install-update -i cargo-update wasm-bindgen-cli wasm-pack | ||
addons: | ||
chrome: stable | ||
script: | ||
# Testing wasm32-unknown-emscripten fails because of rust-lang/rust#49877 | ||
# However, we can still build and link all tests to make sure that works. | ||
# This is actually useful as it finds stuff such as rust-random/rand#669 | ||
- EMCC_CFLAGS="-s ERROR_ON_UNDEFINED_SYMBOLS=0" cargo web test --target wasm32-unknown-emscripten --no-run | ||
#- cargo web test --target wasm32-unknown-emscripten | ||
#- cargo web test --nodejs --target wasm32-unknown-emscripten | ||
#- cargo build --target wasm32-unknown-unknown # without any features | ||
- cargo build --target wasm32-unknown-unknown --features=wasm-bindgen | ||
- cargo web test --target wasm32-unknown-unknown --features=stdweb | ||
- cargo build --manifest-path tests/wasm_bindgen/Cargo.toml --target wasm32-unknown-unknown | ||
- wasm-bindgen --nodejs target/wasm32-unknown-unknown/debug/getrandom_wasm_bindgen_test.wasm --out-dir tests/wasm_bindgen/js | ||
- node tests/wasm_bindgen/js/index.js | ||
- wasm-pack test --node tests/wasm_bindgen | ||
|
||
- rust: nightly | ||
env: DESCRIPTION="cross-platform build only" | ||
install: | ||
- rustup target add x86_64-sun-solaris | ||
- rustup target add x86_64-unknown-cloudabi | ||
- rustup target add x86_64-unknown-freebsd | ||
#- rustup target add x86_64-unknown-fuchsia | ||
- rustup target add x86_64-unknown-netbsd | ||
- rustup target add x86_64-unknown-redox | ||
script: | ||
- cargo build --target=x86_64-sun-solaris --all-features | ||
- cargo build --target=x86_64-unknown-cloudabi --all-features | ||
- cargo build --target=x86_64-unknown-freebsd --all-features | ||
#- cargo build --target=x86_64-unknown-fuchsia --all-features | ||
- cargo build --target=x86_64-unknown-netbsd --all-features | ||
- cargo build --target=x86_64-unknown-redox --all-features | ||
|
||
# Trust cross-built/emulated targets. We must repeat all non-default values. | ||
- rust: stable | ||
sudo: required | ||
dist: trusty | ||
services: docker | ||
env: DESCRIPTION="Linux (MIPS, big-endian)" TARGET=mips-unknown-linux-gnu | ||
install: | ||
- sh utils/ci/install.sh | ||
- source ~/.cargo/env || true | ||
script: | ||
- bash utils/ci/script.sh | ||
|
||
- rust: stable | ||
sudo: required | ||
dist: trusty | ||
services: docker | ||
env: DESCRIPTION="Android (ARMv7)" TARGET=armv7-linux-androideabi | ||
install: | ||
- sh utils/ci/install.sh | ||
- source ~/.cargo/env || true | ||
script: | ||
- bash utils/ci/script.sh | ||
|
||
before_install: | ||
- set -e | ||
- rustup self update | ||
|
||
script: | ||
- cargo test | ||
- cargo test --examples | ||
|
||
after_script: set +e | ||
|
||
cache: | ||
cargo: true | ||
directories: | ||
- .local/share/cargo-web | ||
|
||
before_cache: | ||
# Travis can't cache files that are not readable by "others" | ||
- chmod -R a+r $HOME/.cargo | ||
|
||
notifications: | ||
email: | ||
on_success: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
environment: | ||
|
||
# At the time this was added AppVeyor was having troubles with checking | ||
# revocation of SSL certificates of sites like static.rust-lang.org and what | ||
# we think is crates.io. The libcurl HTTP client by default checks for | ||
# revocation on Windows and according to a mailing list [1] this can be | ||
# disabled. | ||
# | ||
# The `CARGO_HTTP_CHECK_REVOKE` env var here tells cargo to disable SSL | ||
# revocation checking on Windows in libcurl. Note, though, that rustup, which | ||
# we're using to download Rust here, also uses libcurl as the default backend. | ||
# Unlike Cargo, however, rustup doesn't have a mechanism to disable revocation | ||
# checking. To get rustup working we set `RUSTUP_USE_HYPER` which forces it to | ||
# use the Hyper instead of libcurl backend. Both Hyper and libcurl use | ||
# schannel on Windows but it appears that Hyper configures it slightly | ||
# differently such that revocation checking isn't turned on by default. | ||
# | ||
# [1]: https://curl.haxx.se/mail/lib-2016-03/0202.html | ||
RUSTUP_USE_HYPER: 1 | ||
CARGO_HTTP_CHECK_REVOKE: false | ||
|
||
matrix: | ||
- TARGET: x86_64-pc-windows-msvc | ||
- TARGET: i686-pc-windows-msvc | ||
install: | ||
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe | ||
- rustup-init.exe -y --default-host %TARGET% | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
- rustc -V | ||
- cargo -V | ||
|
||
build: false | ||
|
||
test_script: | ||
- cargo test | ||
- cargo test --examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.