From 3ed29858828153cea0e6061e6a51e2503dbf3ce4 Mon Sep 17 00:00:00 2001 From: markcty Date: Thu, 10 Aug 2023 03:22:13 +0800 Subject: [PATCH] add ci build configuration --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml 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