forked from flexflow/flexflow-train
-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (111 loc) · 3.59 KB
/
per-lib-check.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
137
138
139
name: "per-lib-checks"
on: [push, pull_request, workflow_dispatch]
concurrency:
group: build-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
cmake-build:
name: Library CMake Build
runs-on: ubuntu-20.04
strategy:
max-parallel: 1
matrix:
gpu_backend: ["cuda"]
fail-fast: false
steps:
- name: Checkout Git Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Add helpers directory to path
run: echo "${PWD}/.github/workflows/helpers" >> $GITHUB_PATH
- name: Install nix
uses: cachix/install-nix-action@v25
with:
github_access_token: '${{ secrets.GITHUB_TOKEN }}'
- uses: cachix/cachix-action@v14
with:
name: ff
skipPush: true
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: setup nix develop shell
uses: nicknovitski/[email protected]
with:
arguments: "--accept-flake-config .#ci"
- name: ccache
uses: hendrikmuhs/[email protected]
# - name: Install system dependencies
# run: FF_GPU_BACKEND=${{ matrix.gpu_backend }} .github/workflows/helpers/install_dependencies.sh
# - name: Install conda and FlexFlow dependencies
# uses: conda-incubator/setup-miniconda@v2
# with:
# activate-environment: flexflow
# environment-file: packaging/conda/environment.yml
# auto-activate-base: false
- name: Regenerate all dtgen files
run: |
proj dtgen --force
- name: Run cmake
run: |
cmake_${{ matrix.gpu_backend }}.sh
- name: Build utils
run: |
build_libs.sh utils
- name: Build op-attrs
run: |
build_libs.sh op-attrs
- name: Build pcg
run: |
build_libs.sh pcg
- name: Build kernels
run: |
build_libs.sh kernels
- name: Build substitutions
run: |
build_libs.sh substitutions
- name: Build compiler
run: |
build_libs.sh compiler
- name: Build substitution-generator
run: |
build_libs.sh substitution-generator
- name: Build local-execution
run: |
build_libs.sh local-execution
- name: Test utils
run: |
test_libs.sh utils
- name: Test op-attrs
run: |
test_libs.sh op-attrs
- name: Test pcg
run: |
test_libs.sh pcg
- name: Test substitutions
run: |
test_libs.sh substitutions
# - name: Test compiler
# run: |
# test_libs.sh compiler
- name: Test substitution-generator
run: |
test_libs.sh substitution-generator
- name: Test local-execution
run: |
test_libs.sh local-execution
- name: Generate code coverage
run: |
echo "gitwork: $GITHUB_WORKSPACE"
lcov --capture --directory . --output-file main_coverage.info
lcov --extract main_coverage.info "$GITHUB_WORKSPACE/lib/*" --output-file main_coverage.info
lcov --remove main_coverage.info "$GITHUB_WORKSPACE/lib/*.dtg.h" "$GITHUB_WORKSPACE/lib/*.dtg.cc" --output-file main_coverage.info
lcov --list main_coverage.info
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: main_coverage.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
verbose: true