Merge pull request #1 from seamile/dev #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Git Ref (Commit Hash, Tag, or Branch). Leave empty to use the selected branch context.' | |
| required: false | |
| type: string | |
| jobs: | |
| build_and_test: | |
| name: Test - ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.ref }} | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| components: clippy | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Clippy | |
| run: cargo clippy --target ${{ matrix.target }} -- -D warnings | |
| - name: Test | |
| run: cargo test --release --target ${{ matrix.target }} |