forked from TuGraph-family/tugraph-db
-
Notifications
You must be signed in to change notification settings - Fork 0
149 lines (144 loc) · 4.7 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
137
138
139
140
141
142
143
144
145
146
147
148
149
name: ci
on:
push:
pull_request:
branches:
- '*'
env:
TEST_TAG: tugraph/tugraph-ut:test
# Issues TODO:
# 1. Seems GitHub limits the output passed among jobs up to 1MB,
# so we can't break down the entire workflow to multi-jobs.
# 2. For submodules in the repo inside the single job, the git binary in docker image
# should be upgrade to at least 2.18 in order to use actions/checkout@v3
# inside docker instead of running ut and it via Dockerfile.
jobs:
ut_no_asan:
runs-on: ubuntu-latest
steps:
- name: Delete huge unnecessary tools folder
run: |
df -h
echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
echo "Removing large packages"
sudo apt-get update --fix-missing
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
rm -rf /usr/share/dotnet/
rm -rf /opt/hostedtoolcache
df -h
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Unit Test
uses: docker/build-push-action@v4
with:
file: ci/images/github-ci-ubuntu-latest-Dockerfile
context: .
tags: ${{ env.TEST_TAG }}
build-args: |
BUILD_TYPE=no_asan
TEST_TYPE=ut
secrets: |
"CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}"
- name: Check disk space
if: always()
run: df -h
ut_asan:
runs-on: ubuntu-latest
steps:
- name: Delete huge unnecessary tools folder
run: |
df -h
echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
echo "Removing large packages"
sudo apt-get update --fix-missing
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
rm -rf /usr/share/dotnet/
rm -rf /opt/hostedtoolcache
df -h
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Unit Test
uses: docker/build-push-action@v4
with:
file: ci/images/github-ci-ubuntu-latest-Dockerfile
context: .
tags: ${{ env.TEST_TAG }}
build-args: |
BUILD_TYPE=asan
TEST_TYPE=ut
secrets: |
"CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}"
- name: Check disk space
if: always()
run: df -h
it:
runs-on: ubuntu-latest
steps:
- name: Delete huge unnecessary tools folder
run: |
df -h
echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
echo "Removing large packages"
sudo apt-get update --fix-missing
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
rm -rf /usr/share/dotnet/
rm -rf /opt/hostedtoolcache
df -h
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Integration Test
uses: docker/build-push-action@v4
with:
file: ci/images/github-ci-ubuntu-latest-Dockerfile
context: .
tags: ${{ env.TEST_TAG }}
build-args: |
BUILD_TYPE=no_asan
TEST_TYPE=it
secrets: |
"CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}"
- name: Check disk space
if: always()
run: df -h