diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c643f63 --- /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 }}