-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (140 loc) · 4.49 KB
/
Copy pathci.yml
File metadata and controls
171 lines (140 loc) · 4.49 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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
---
name: CI
on: # yamllint disable-line rule:truthy
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
name: Build (${{ matrix.os }} ${{ matrix.build_type }}, CUDA=${{ matrix.cuda_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Testing across Linux and macOS
os: [ubuntu-latest, macos-latest]
build_type: [Debug, Release]
cuda_version: [cpu] # Cuda builds are tested on our containers
steps:
- uses: actions/checkout@v4
- name: Install Clang Dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y clang libc++-dev libc++abi-dev libomp-18-dev
- name: Install OpenMP (MacOS)
if: runner.os == 'macOS'
run: brew install libomp
- name: Build TGN
run: make build BUILD_TYPE=${{ matrix.build_type }} CUDA_VERSION=${{ matrix.cuda_version }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}-${{ matrix.cuda_version }}-${{ matrix.build_type }}
path: build/
test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Testing across Linux and macOS
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Download CPU Debug Build
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.os }}-cpu-Debug
path: build/
- name: Install OpenMP (MacOS)
if: runner.os == 'macOS'
run: brew install libomp
- name: Run Tests
run: make test
cpp-lint:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Download CPU Debug Build
uses: actions/download-artifact@v4
with:
name: build-ubuntu-latest-cpu-Debug
path: build/
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
database: "build"
style: "file" # Use .clang-format config file
tidy-checks: "" # Use .clang-tidy config file
test-on-container:
name: Container Build (Cuda=${{ matrix.cuda_version }})
runs-on: ubuntu-latest
strategy:
matrix:
cuda_version: [cpu, 12.6, 12.8, 13.0]
steps:
- uses: actions/checkout@v4
- name: Build TGN Container
run: docker build --build-arg CUDA_VERSION=${{ matrix.cuda_version }} -t tgn-dev:${{ matrix.cuda_version }} .
- name: Run Tests inside Container
run: |
# If CPU, run tests. If CUDA, just run build to verify compilation.
CMD=$([[ "${{ matrix.cuda_version }}" == "cpu" ]] && echo "make test" || echo "make build")
docker run --rm -v "$(pwd):/workspace:Z" tgn-dev:${{ matrix.cuda_version }} /bin/bash -c "$CMD"
python-tests:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Download CPU Release Build
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.os }}-cpu-Release
path: build/
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install Clang Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y clang libc++-dev libc++abi-dev libomp-18-dev
- name: Install OpenMP (MacOS)
if: runner.os == 'macOS'
run: brew install libomp
- name: Install & Test Python Bindings
run: make test-python
python-tests-on-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Python Suite in Container
run: |
docker build -t tgn-dev .
docker run --rm \
-v "$(pwd):/workspace:Z" \
tgn-dev /bin/bash -c "make test-python"
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install Doxygen
run: |
sudo apt-get update && sudo apt install doxygen
- name: Run Documentation Build
run: make docs