-
Notifications
You must be signed in to change notification settings - Fork 71
136 lines (136 loc) · 4.78 KB
/
ci.yml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Build cunumeric
on:
push:
branches-ignore:
- gh-pages # deployment target branch (this workflow should not exist on that branch anyway)
pull_request:
branches-ignore:
- gh-pages # deployment target branch (this workflow should not exist on that branch anyway)
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 */6 * * *'
env:
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
PROJECT: github-cunumeric-ci
REF: ${{ github.event.pull_request.head.ref || github.ref }}
BASE_REF: ${{ github.event.pull_request.base.ref || github.ref }}
EVENT_NAME: ${{ github.event_name }}
LABEL: ${{ github.event.pull_request.head.label }}
# Prevent output buffering
PYTHONUNBUFFERED: 1
jobs:
build:
if: ${{ github.repository == 'nv-legate/cunumeric' }}
runs-on: self-hosted
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJSON(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJSON(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJSON(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJSON(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Run CI build
run: |
/data/github-runner/legate-bin/setup.sh
cd legate-ci/github-ci/cunumeric
rm -rf ngc-artifacts || true
./build-separate.sh > ${COMMIT}-build.log 2>&1
- name: Process Output
run: |
cd legate-ci/github-ci/cunumeric
cat *artifacts/*/*
if: always()
- name: Upload Build Log
if: always()
uses: actions/upload-artifact@v3
with:
name: build-log
path: ./**/${{ env.COMMIT }}-build.log.gpg
test:
if: ${{ github.repository == 'nv-legate/cunumeric' }}
runs-on: self-hosted
needs: build
strategy:
fail-fast: false
matrix:
include:
- {name: 1 CPU test, options: --cpus 1 --unit --debug, log: cpu}
- {name: 2 CPUs test, options: --cpus 2 --debug, log: cpus}
- {name: GPU test, options: --use cuda --gpus 1 --debug, log: gpu}
- {name: 2 GPUs test, options: --use cuda --gpus 2 --debug, log: gpus}
- {name: OpenMP test, options: --use openmp --omps 1 --ompthreads 2 --debug, log: omp}
- {name: 2 NUMA OpenMPs test, options: --use openmp --omps 2 --ompthreads 2 --numamem 2048 --debug, log: omps}
- {name: Eager execution test, options: --use eager --debug, log: eager}
- {name: mypy, options: mypy, log: mypy}
- {name: documentation, options: docs, log: docs}
name: ${{ matrix.name }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJSON(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJSON(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJSON(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJSON(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Prepare
run: |
/data/github-runner/legate-bin/setup.sh
cd legate-ci/github-ci/cunumeric
if [[ ! -d ngc-artifacts ]]
then
mkdir ngc-artifacts
else
rm -rf ngc-artifacts/*
fi
- name: Test
run: |
cd legate-ci/github-ci/cunumeric
[[ "${{ matrix.name }}" == "Eager"* ]] && export PYTHONFAULTHANDLER=1
./test.sh ${{ matrix.options }} > ${COMMIT}-test-${{ matrix.log }}.log 2>&1
- name: Process output
if: always()
run: |
cd legate-ci/github-ci/cunumeric
/data/github-runner/legate-bin/encrypt.sh ${COMMIT}-test-${{ matrix.log }}.log
cat *artifacts/*/*
- name: Upload Log
if: always()
uses: actions/upload-artifact@v3
with:
name: test-${{ matrix.log }}-log
path: ./**/${{ env.COMMIT }}-test-${{ matrix.log }}.log.gpg