-
Notifications
You must be signed in to change notification settings - Fork 161
88 lines (76 loc) · 2.48 KB
/
ci.yml
File metadata and controls
88 lines (76 loc) · 2.48 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI
on:
pull_request:
branches:
- main
- gh/**
push:
branches:
- main
tags:
- ciflow/rocm/*
workflow_dispatch: # Allows manual triggering
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
build-gpu:
name: Build GPU
uses: ./.github/workflows/build-gpu.yml
# CPU jobs skip on ciflow/rocm tag push since they already run for the pull_request trigger
build-cpu:
name: Build CPU
if: ${{ !startsWith(github.ref, 'refs/tags/ciflow/rocm/') }}
uses: ./.github/workflows/build-cpu.yml
with:
artifact-name: monarch-cpu-${{ github.sha }}-py3.10
test-cpu-python:
name: Test CPU Python
if: ${{ !startsWith(github.ref, 'refs/tags/ciflow/rocm/') }}
needs: build-cpu
uses: ./.github/workflows/test-cpu-python.yml
with:
artifact-name: monarch-cpu-${{ github.sha }}-py3.10
# Runs pyright as its own check so type errors surface as a separate
# signal. This job is intentionally omitted from status-check.needs so type
# failures never gate test results or merging.
type-check-python:
name: Type Check Python
if: ${{ !startsWith(github.ref, 'refs/tags/ciflow/rocm/') }}
needs: build-cpu
uses: ./.github/workflows/type-check-python.yml
with:
artifact-name: monarch-cpu-${{ github.sha }}-py3.10
test-gpu-python:
name: Test GPU Python
needs: build-gpu
uses: ./.github/workflows/test-gpu-python.yml
test-cpu-rust:
name: Test CPU Rust
if: ${{ !startsWith(github.ref, 'refs/tags/ciflow/rocm/') }}
uses: ./.github/workflows/test-cpu-rust.yml
test-gpu-rust:
name: Test GPU Rust
needs: build-gpu
uses: ./.github/workflows/test-gpu-rust.yml
build-docker:
name: Build Docker image
needs: build-gpu
if: ${{ !startsWith(github.ref, 'refs/tags/ciflow/rocm/') }}
uses: ./.github/workflows/build-docker.yml
with:
# Docker image requires python 3.12
artifact-name: monarch-cuda-${{ github.sha }}-py3.12
status-check:
name: Status Check
runs-on: ubuntu-latest
needs: [test-cpu-python, test-gpu-python, test-cpu-rust, test-gpu-rust]
if: always()
steps:
# Fail if any job failed or was cancelled; skipped jobs are OK
- name: Check all jobs status
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1