Skip to content

Build wasm32-unknown-unknown in CI #278

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

Merged
merged 2 commits into from
Dec 7, 2018

Conversation

willglynn
Copy link
Contributor

cargo check --wasm32-unknown-unknown is sufficient to demonstrate that the juniper and juniper_codegen crates can compile for WebAssembly, which should help avoid accidental regressions.

This is a small step towards the goals in #218.

`cargo check --wasm32-unknown-unknown` is sufficient to demonstrate that the
`juniper` and `juniper_codegen` crates can compile for WebAssembly, which should
help avoid accidental regressions.
Copy link
Member

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This looks great, but can you add it to azure pipelines as well?

@willglynn
Copy link
Contributor Author

Added!

I'm new to Azure Pipelines and I wasn't quite sure what approach to take here, so I settled for the one that seemed least invasive. The result was a "Check WebAssembly target" step added to every job, but which runs only for the stable toolchain and is skipped everywhere else.

I also considered expanding the matrix such that "install stable + cargo check --target=wasm32-unknown-unknown" would be a separate job on all three platforms. However – as I understand it at least – this would require either a) making the regular build process conditional on whether we're building normally or checking WebAssembly, or b) adding a second unrelated job template and expanding it separately from the azure-pipelines.yml in the root. Adding a two-line step to the existing jobs and conditionally executing it seemed like the better option.

@LegNeato LegNeato merged commit 4858f90 into graphql-rust:master Dec 7, 2018
@LegNeato
Copy link
Member

LegNeato commented Dec 7, 2018

Sorry this took so long, thanks for the PR! 🍻

@willglynn willglynn deleted the build_wasm_in_ci branch December 7, 2018 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants