|
| 1 | +name: Test Formulae |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - 'Formula/*.rb' |
| 7 | + push: |
| 8 | + branches: [main] |
| 9 | + paths: |
| 10 | + - 'Formula/*.rb' |
| 11 | + |
| 12 | +env: |
| 13 | + # Suppress tap trust warnings for untrusted taps (e.g., aws/tap) on the runner |
| 14 | + HOMEBREW_NO_REQUIRE_TAP_TRUST: 1 |
| 15 | + |
| 16 | +concurrency: |
| 17 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 18 | + cancel-in-progress: true |
| 19 | + |
| 20 | +jobs: |
| 21 | + test-combined: |
| 22 | + name: Test clang-tools (combined) on ${{ matrix.os }} |
| 23 | + runs-on: ${{ matrix.os }} |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + include: |
| 28 | + - os: macos-13 |
| 29 | + arch: Intel (x86_64) |
| 30 | + - os: macos-latest |
| 31 | + arch: Apple Silicon (arm64) |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v7 |
| 34 | + |
| 35 | + - name: Tap and trust local repository |
| 36 | + run: | |
| 37 | + brew untap cpp-linter/homebrew-tap 2>/dev/null || true |
| 38 | + brew tap cpp-linter/homebrew-tap "$PWD" |
| 39 | + brew trust cpp-linter/tap |
| 40 | +
|
| 41 | + - name: Install clang-tools (on ${{ matrix.arch }}) |
| 42 | + run: brew install clang-tools |
| 43 | + timeout-minutes: 10 |
| 44 | + |
| 45 | + - name: Test clang-tools (on ${{ matrix.arch }}) |
| 46 | + run: brew test clang-tools |
| 47 | + timeout-minutes: 5 |
| 48 | + |
| 49 | + test-individual: |
| 50 | + name: Test ${{ matrix.formula }} on ${{ matrix.os }} |
| 51 | + needs: test-combined |
| 52 | + runs-on: ${{ matrix.os }} |
| 53 | + strategy: |
| 54 | + fail-fast: false |
| 55 | + matrix: |
| 56 | + include: |
| 57 | + - os: macos-13 |
| 58 | + arch: Intel (x86_64) |
| 59 | + - os: macos-latest |
| 60 | + arch: Apple Silicon (arm64) |
| 61 | + formula: |
| 62 | + - llvm-cov |
| 63 | + - llvm-profdata |
| 64 | + - llvm-symbolizer |
| 65 | + - clang-scan-deps |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v7 |
| 68 | + |
| 69 | + - name: Tap and trust local repository |
| 70 | + run: | |
| 71 | + brew untap cpp-linter/homebrew-tap 2>/dev/null || true |
| 72 | + brew tap cpp-linter/homebrew-tap "$PWD" |
| 73 | + brew trust cpp-linter/tap |
| 74 | +
|
| 75 | + - name: Install ${{ matrix.formula }} (on ${{ matrix.arch }}) |
| 76 | + run: brew install ${{ matrix.formula }} |
| 77 | + timeout-minutes: 10 |
| 78 | + |
| 79 | + - name: Test ${{ matrix.formula }} (on ${{ matrix.arch }}) |
| 80 | + run: brew test ${{ matrix.formula }} |
| 81 | + timeout-minutes: 5 |
0 commit comments