name: Rust PR Actions on: pull_request: branches: - "main" env: CARGO_TERM_COLOR: always permissions: {} jobs: build: name: "Build and Run tests" strategy: fail-fast: false matrix: info: - os: "macos-latest" target: "x86_64-apple-darwin" - os: "macos-latest" target: "aarch64-apple-darwin" runs-on: ${{ matrix.info.os }} permissions: contents: read steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5 with: persist-credentials: false - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 #v2025.09.23 with: components: clippy, rustfmt toolchain: stable targets: ${{ matrix.info.target }} - name: Enable Rust cache uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 #v2.8.1 with: save-if: false - name: Fmt Check run: cargo fmt -- --check - name: Run clippy action to produce annotations run: cargo clippy - name: Download test files run: cd tests && wget -O ./test_data.zip https://github.com/mandiant/macos-UnifiedLogs/releases/download/v1.0.0/test_data.zip && unzip test_data.zip - name: Build tests run: cargo test --no-run --release - name: Run tests run: cargo test --release