-
Notifications
You must be signed in to change notification settings - Fork 161
65 lines (59 loc) · 2.35 KB
/
ci-macos.yml
File metadata and controls
65 lines (59 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI (macOS)
on:
pull_request:
branches:
- main
- gh/**
# Only run if the ciflow/macos label is present until we build
# confidence in stability.
# We include 'labeled' so the workflow triggers when ciflow/macos is added.
# 'synchronize' (new pushes) still carries the PR's current labels, so a PR
# that already has ciflow/macos will continue to run on subsequent pushes.
# The actual gating on the label is done via 'if' conditions on each job.
types: [opened, synchronize, reopened, labeled]
push:
branches:
- main
workflow_dispatch: # Allows manual triggering
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true
jobs:
build-cpu-macos:
name: Build CPU (macOS)
# macOS CI is expensive — don't run on every PR. Require the 'ciflow/macos' label.
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ciflow/macos')
uses: ./.github/workflows/build-cpu-macos.yml
with:
artifact-name: monarch-cpu-macos-${{ github.sha }}-py3.10
runner: macos-latest
test-cpu-python-macos:
name: Test CPU Python (macOS)
needs: build-cpu-macos
uses: ./.github/workflows/test-cpu-python-macos.yml
with:
artifact-name: monarch-cpu-macos-${{ github.sha }}-py3.10
runner: macos-latest
test-cpu-rust-macos:
name: Test CPU Rust (macOS)
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ciflow/macos')
uses: ./.github/workflows/test-cpu-rust-macos.yml
with:
runner: macos-latest
status-check:
name: Status Check
runs-on: ubuntu-latest
needs: [test-cpu-python-macos, test-cpu-rust-macos]
if: always()
steps:
- name: Check all jobs status
run: |
python_result="${{ needs.test-cpu-python-macos.result }}"
rust_result="${{ needs.test-cpu-rust-macos.result }}"
if [[ "$python_result" == "success" || "$python_result" == "skipped" ]] &&
[[ "$rust_result" == "success" || "$rust_result" == "skipped" ]]; then
echo "All jobs passed or were skipped"
else
echo "One or more jobs failed"
exit 1
fi