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