forked from kubeedge/kubeedge
-
Notifications
You must be signed in to change notification settings - Fork 1
201 lines (168 loc) · 5.51 KB
/
schedule.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: SCHEDULED
on:
workflow_dispatch:
schedule:
# Executes e2e compatibility test every Wednesday at 1:00 AM and if you need to convert to UTC+8 timezone, you need to -8 hours for cron expression
- cron: "0 17 * * 2"
env:
CONTAINER_RUN_OPTIONS: " "
GINKGO_VERSION: "v2.9.5"
jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 30
name: lint
env:
GOPATH: /home/runner/work/${{ github.repository }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
path: ./src/github.com/${{ github.repository }}
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
run: |
sudo apt-get install -y jq
image-prepare:
runs-on: ubuntu-22.04
timeout-minutes: 30
name: Prepare kubeedge/build-tools image
steps:
- name: Pull kubeedge/build-tools image
run: |
docker pull kubeedge/build-tools:1.21.11-ke1
mkdir -p /home/runner/build-tools/
docker save kubeedge/build-tools:1.21.11-ke1 > /home/runner/build-tools/build-tools.tar
- name: Temporarily save kubeedge/build-tools image
uses: actions/upload-artifact@v4
with:
name: build-tools-docker-artifact
path: /home/runner/build-tools
build:
runs-on: ubuntu-22.04
timeout-minutes: 30
name: Multiple build
needs: image-prepare
steps:
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Retrieve saved kubeedge/build-tools image
uses: actions/download-artifact@v4
with:
name: build-tools-docker-artifact
path: /home/runner/build-tools
- name: docker load kubeedge/build-tools image
run: |
docker load < /home/runner/build-tools/build-tools.tar
- run: make
- run: make smallbuild
- run: make crossbuild
- run: make crossbuild ARM_VERSION=GOARM7
- run: make crossbuild WHAT=cloudcore ARM_VERSION=GOARM8
k8s_compatibility_schedule_test:
runs-on: ubuntu-22.04
strategy:
matrix:
protocol:
- WebSocket
- QUIC
version:
- v1.29.2
- v1.28.6
- v1.27.10
- v1.26.13
- v1.25.16
timeout-minutes: 90
name: E2e k8s compatibility test
needs: image-prepare
env:
GO111MODULE: on
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
run: |
command -v ginkgo || go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
go install sigs.k8s.io/[email protected]
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.29.5/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Retrieve saved kubeedge/build-tools image
uses: actions/download-artifact@v4
with:
name: build-tools-docker-artifact
path: /home/runner/build-tools
- name: docker load kubeedge/build-tools image
run: |
docker load < /home/runner/build-tools/build-tools.tar
- name: enable cri config in containerd service
run: |
containerd config default | sudo tee /etc/containerd/config.toml && sudo systemctl restart containerd.service
- run: |
export PROTOCOL=${{ matrix.protocol }}
export KIND_IMAGE=kindest/node:${{ matrix.version }}
export CONTAINER_RUNTIME="containerd"
make e2e
keadm_compatibility_e2e_test:
runs-on: ubuntu-22.04
strategy:
matrix:
version:
- v1.19.0
- v1.18.1
timeout-minutes: 90
name: Keadm compatibility e2e test
env:
GO111MODULE: on
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
run: |
command -v ginkgo || go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
go install sigs.k8s.io/[email protected]
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.29.5/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.4.0
- name: enable cri config in containerd service
run: |
containerd config default | sudo tee /etc/containerd/config.toml && sudo systemctl restart containerd.service
- name: cleanup images
run: docker system prune -a -f
- run: |
export CLOUD_EDGE_VERSION=${{ matrix.version }}
make keadm_compatibility_e2e