forked from kubeedge/kubeedge
-
Notifications
You must be signed in to change notification settings - Fork 1
151 lines (127 loc) · 4.12 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
name: SCHEDULED
on:
workflow_dispatch:
schedule:
# Exectues 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@v3
with:
go-version: 1.21.x
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ./src/github.com/${{ github.repository }}
- uses: actions/cache@v3
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@v3
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@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Retrieve saved kubeedge/build-tools image
uses: actions/download-artifact@v3
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@v3
with:
go-version: 1.21.x
- uses: actions/cache@v3
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@v3
with:
fetch-depth: 0
- name: Retrieve saved kubeedge/build-tools image
uses: actions/download-artifact@v3
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