From 12cfef46afce9d9123ce6707637676c9bafcdf37 Mon Sep 17 00:00:00 2001 From: Zach Grimaldi Date: Fri, 29 Nov 2024 10:40:09 -0500 Subject: [PATCH] feat(cicd): adds basic build/test workflow --- .github/workflows/build-and-test.yml | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..eb08a87 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,43 @@ +name: Build and Test Library + +on: + push: + paths: + - "src/**" + - "Cargo.toml" + - ".github/workflows/build-and-test.yml" # This file + branches: + - main + + pull_request: + paths: + - "src/**" + - "Cargo.toml" + - ".github/workflows/build-and-test.yml" # This file + + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Build project + run: cargo build --release + + - name: Test project + run: cargo test + + - name: Build Examples + run: cargo build --release --examples \ No newline at end of file