forked from milvus-io/milvus
-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (109 loc) · 3.35 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
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/**'
- '.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 20.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
with:
os: 'ubuntu20.04'
- name: Code Check
env:
OS_NAME: 'ubuntu20.04'
run: |
./build/builder.sh /bin/bash -c "make check-proto-product && make verifiers"
amazonlinux:
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
with:
os: 'amazonlinux2023'
- name: Code Check
run: |
sed -i 's/ubuntu20.04/amazonlinux2023/g' .env
./build/builder.sh /bin/bash -c "make install"
rockylinux:
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
with:
os: 'rockylinux8'
- name: Code Check
run: |
sed -i 's/ubuntu20.04/rockylinux8/g' .env
./build/builder.sh /bin/bash -c "make install"