Skip to content

Improve CI for web targets #108

New issue

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

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

Already on GitHub? # to your account

Merged
merged 5 commits into from
Sep 21, 2019
Merged

Improve CI for web targets #108

merged 5 commits into from
Sep 21, 2019

Conversation

josephlr
Copy link
Member

@josephlr josephlr commented Sep 20, 2019

This PR uses simplifies the testing story for getrandom. All targets now use the same testing file (eliminating the need for a separate tests/wasm_bindgen crate).

We also use .cargo/config to allow users to run cargo test normally for wasm32-wasi or wasm32-unknown bindgen. This just requires that wasmtime or wasm-bindgen-test-runner exist in the user's path.

The CI for these targets has been overhauled:

  • Tests are now actually run a larger number of targets:
    • wasm32-wasi
    • stdweb: Node and Chrome
    • wasm-bindgen: Node, Firefox, and Chrome
  • Tests are built/linked for asmjs-unknown-emscripten
  • We download pre-built binaries for all our dependancies

Results:

  • Less code
  • Less duplication
  • More tests are run
  • WASM CI is much faster. Decreased from 13 mins to 4.5 mins

This is not part of #98, so it can be merged into master.

Run WASI tests, and run both stdweb/wasm-bindgen on both node and in browsers

These changes also remove the need for a separate tests/wasm_bindgen
Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I would wait for @dhardy to review it as well.

josephlr and others added 3 commits September 19, 2019 18:36
@josephlr josephlr force-pushed the ci branch 5 times, most recently from 92e5ff3 to f6c8766 Compare September 20, 2019 06:19
@josephlr josephlr changed the title Simplify CI process for WASM Improve CI for web targets Sep 20, 2019
@josephlr
Copy link
Member Author

Updated description to reflect the scope of these changes.

@dhardy this is ready, the CI runs significantly faster now.

@dhardy
Copy link
Member

dhardy commented Sep 20, 2019

I would prefer that someone more familiar with WASM could review. @stevebob wrote this test originally (rand#696).

Copy link
Member

@dhardy dhardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants