From 4f7c12451d1dbfbf0c2c5016fb4e4d06c56f22dc Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 19 Jun 2024 18:52:20 -0700 Subject: [PATCH] updates Signed-off-by: Jess Frazelle --- .github/workflows/cargo-build.yml | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/cargo-build.yml diff --git a/.github/workflows/cargo-build.yml b/.github/workflows/cargo-build.yml new file mode 100644 index 0000000000..f6ed90ae3e --- /dev/null +++ b/.github/workflows/cargo-build.yml @@ -0,0 +1,40 @@ +on: + push: + branches: + - main + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' + - '**/rust-toolchain.toml' + - '**.rs' + - .github/workflows/cargo-build.yml + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +name: cargo build +jobs: + cargobuild: + name: cargo build + runs-on: ubuntu-latest + strategy: + matrix: + dir: ['src/wasm-lib'] + steps: + - uses: actions/checkout@v4 + - name: Install latest rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v2.6.1 + + - name: Run build + run: | + cd "${{ matrix.dir }}" + # We specifically want to test the disable-println feature + # Since it is not enabled by default, we need to specify it + # This is used in kcl-lsp + cargo build --all --features disable-println