From 7ed721af610d262adc728618a5f3715e8faccaa9 Mon Sep 17 00:00:00 2001 From: Pawel Bogut Date: Sat, 14 Oct 2023 13:09:32 +0200 Subject: [PATCH] chore: add test workflow --- .github/workflows/test.yml | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..59c9ab7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,57 @@ +name: Rust + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + strategy: + fail-fast: false + matrix: + build: + - { + NAME: linux-x64, + OS: ubuntu-22.04, + TARGET: x86_64-unknown-linux-gnu, + } + - { + NAME: windows-x64, + OS: windows-2022, + TARGET: x86_64-pc-windows-msvc, + } + - { + NAME: windows-arm64, + OS: windows-2022, + TARGET: aarch64-pc-windows-msvc, + } + - { + NAME: darwin-x64, + OS: macos-12, + TARGET: x86_64-apple-darwin, + } + - { + NAME: darwin-arm64, + OS: macos-12, + TARGET: aarch64-apple-darwin, + } + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + - uses: actions/checkout@v3 + + - name: Setup Rust env + uses: "./.github/actions/setup-rust-env" + + - name: Build + run: cargo build --verbose --target ${{ matrix.build.TARGET }} + + - name: Run tests + run: cargo test --verbose --target ${{ matrix.build.TARGET }}