From d7887f3851652afd3bd6492a922dd6bd743bb91a Mon Sep 17 00:00:00 2001 From: mjovanc Date: Sat, 20 May 2023 18:25:00 +0200 Subject: [PATCH] Adding workflows --- .github/workflows/main-ci.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/pr-ci.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/main-ci.yml create mode 100644 .github/workflows/pr-ci.yml diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml new file mode 100644 index 0000000..f1bf2f0 --- /dev/null +++ b/.github/workflows/main-ci.yml @@ -0,0 +1,29 @@ +name: build + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + rust: [stable] + + steps: + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Build and test + run: | + cargo build --verbose + cargo test --verbose diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml new file mode 100644 index 0000000..9d12c5f --- /dev/null +++ b/.github/workflows/pr-ci.yml @@ -0,0 +1,26 @@ +name: pr + +on: pull_request + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + rust: [stable] + + steps: + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Build and test + run: | + cargo build --verbose + cargo test --verbose