-
Notifications
You must be signed in to change notification settings - Fork 35
63 lines (53 loc) · 1.56 KB
/
glt-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
name: GLT CI
on:
push:
branches: [ main ]
paths-ignore:
- 'benchmarks/**'
- 'docs/**'
- 'examples/**'
- '**.md'
pull_request:
branches: [ main ]
paths-ignore:
- 'benchmarks/**'
- 'docs/**'
- 'examples/**'
- '**.md'
env:
IMAGE: graphlearn-torch-dev
JOBNAME: glt-ci-${{ github.run_id }}
DESTDIR: /mnt/graphlearn_for_pytorch
jobs:
run-glt-unittests:
runs-on: self-hosted
if: ${{ github.repository == 'alibaba/graphlearn-for-pytorch' }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Update submodules
working-directory: ${{github.workspace}}
run: |
git submodule update --init
- name: Build image
working-directory: ${{github.workspace}}
run: |
docker build -f dockerfiles/${IMAGE}.Dockerfile -t ${IMAGE} .
- name: Launch CI container
working-directory: ${{github.workspace}}
run: |
bash scripts/launch_container.sh ${IMAGE} ${JOBNAME} ${DESTDIR}
- name: Build wheel
run: |
docker exec ${JOBNAME} bash ${DESTDIR}/scripts/build_wheel.sh
- name: Run cpp unit tests
run: |
docker exec ${JOBNAME} bash ${DESTDIR}/scripts/run_cpp_ut.sh
- name: Run python unit tests
run: |
docker exec ${JOBNAME} bash ${DESTDIR}/scripts/run_python_ut.sh
- name: Remove CI container
if: always()
working-directory: ${{github.workspace}}
run: |
bash scripts/remove_container.sh ${JOBNAME}