Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): easier to use mac ci #11194

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 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
# Same label check as above
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,8 @@ jobs:
build-check:
name: Check builds are successful
needs: [build-mac-intel, build-mac-m1]
if: ${{ always() }}
# Likewise, only run if it's triggered by push or "macos-ci" label.
if: always()
runs-on: ubuntu-latest
steps:
- name: Report overall success
Expand Down
Loading