build.yml 645 B

1234567891011121314151617181920212223242526272829
  1. name: build
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: setup Rust toolchain
  13. run: |
  14. curl https://sh.rustup.rs -sSf | sh -s -- -y
  15. export PATH="$HOME/.cargo/bin:$PATH"
  16. rustup target add wasm32-wasi
  17. - name: build
  18. run: |
  19. export PATH="$HOME/.cargo/bin:$PATH"
  20. cargo build
  21. - name: build examples on WASI
  22. run: |
  23. export PATH="$HOME/.cargo/bin:$PATH"
  24. cargo build --examples
  25. - name: test publish
  26. run: |
  27. cargo publish --dry-run