build-and-test.yml (731B)
1 name: Build & Test 2 3 on: 4 workflow_call: 5 inputs: 6 os: 7 required: true 8 type: string 9 additional-setup: 10 required: false 11 type: string 12 13 jobs: 14 run: 15 runs-on: ${{ inputs.os }} 16 steps: 17 - name: Checkout Code 18 uses: actions/checkout@v4 19 with: 20 submodules: recursive 21 22 - name: Rust toolchain 23 uses: dtolnay/rust-toolchain@stable 24 25 - name: Rust cache 26 uses: Swatinem/rust-cache@v2 27 28 - name: Additional Setup (if specified) 29 if: ${{ inputs.additional-setup != '' }} 30 run: ${{ inputs.additional-setup }} 31 32 - name: Build 33 run: cargo build --release 34 35 - name: Run Tests 36 run: cargo test --release