Skip to content

Commit

Permalink
chore(ci): easier to use mac ci (#11194)
Browse files Browse the repository at this point in the history
Now one can label their PR with macos-ci, with the tradeoff that it will
now always show as a skipped check otherwise
  • Loading branch information
ludamad authored Jan 13, 2025
1 parent c4f4452 commit 9ab4cee
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci-mac.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
name: CI (Mac)

on:
push:
branches:
- master
- '*/*mac-build'
pull_request:
types: [synchronize, labeled]

jobs:
build-mac-intel:
name: Build on Mac x86_64-apple-darwin
# Run this job if it's a direct push OR if a PR is labeled with "macos-ci".
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'macos-ci'))
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Create Mac Build Environment
run: brew install cmake ninja llvm@16
Expand All @@ -29,12 +35,15 @@ jobs:
build-mac-m1:
name: Build on Mac aarch64-apple-darwin
# Run this job if it's a direct push OR if a PR is labeled with "macos-ci".
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'macos-ci'))
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Create Mac Build Environment
run: brew install cmake ninja
Expand All @@ -48,7 +57,7 @@ jobs:
build-check:
name: Check builds are successful
needs: [build-mac-intel, build-mac-m1]
if: ${{ always() }}
if: always()
runs-on: ubuntu-latest
steps:
- name: Report overall success
Expand Down

0 comments on commit 9ab4cee

Please sign in to comment.