diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5e3011d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build and Check + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install latest toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + override: true + target: wasm32-wasi + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --target=wasm32-wasi + - name: Build the project + uses: actions-rs/cargo@v1 + with: + command: build + args: --verbose --target=wasm32-wasi --release