forked from milvus-io/milvus
-
Notifications
You must be signed in to change notification settings - Fork 1
132 lines (127 loc) · 4.02 KB
/
code-checker.yaml
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
name: Code Checker
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
branches:
- master
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'pkg/**'
- 'client/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**'
- 'tests/go_client/**'
- '.github/workflows/code-checker.yaml'
- '.env'
- docker-compose.yml
- Makefile
- '!**.md'
- '!build/ci/jenkins/**'
# FIXME(wxyu): not need to run code check, update the ci-passed rules and remove these two lines
- go.mod
- go.sum
- .golangci.yml
- rules.go
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ubuntu:
name: Code Checker AMD64 Ubuntu 22.04
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
fail-fast: false
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
- name: Code Check
env:
OS_NAME: 'ubuntu22.04'
run: |
./build/builder.sh /bin/bash -c "git config --global --add safe.directory /go/src/github.com/milvus-io/milvus && make check-proto-product && make verifiers"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
amazonlinux:
if: ${{ false }} # skip for now
name: Code Checker Amazonlinux 2023
# Run in amazonlinux docker
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'amazonlinux2023'
- name: Code Check
run: |
sed -i 's/ubuntu22.04/amazonlinux2023/g' .env
./build/builder.sh /bin/bash -c "make install"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'amazonlinux2023'
rockylinux:
if: ${{ false }} # skip for now
name: Code Checker rockylinux8
# Run in amazonlinux docker
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'rockylinux8'
- name: Code Check
run: |
sed -i 's/ubuntu22.04/rockylinux8/g' .env
./build/builder.sh /bin/bash -c "make install"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'rockylinux8'