forked from openimsdk/open-im-server
-
Notifications
You must be signed in to change notification settings - Fork 0
191 lines (164 loc) · 4.44 KB
/
openimci.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
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: OpenIM CI Auto Build
on:
push:
branches:
- main
- release-*
paths-ignore:
- "docs/**"
- "README.md"
- "README_zh-CN.md"
- "**.md"
- "docs/**"
- "CONTRIBUTING.md"
pull_request:
branches:
- main
- release-*
paths-ignore:
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING/**"
- "**.md"
- "docs/**"
workflow_dispatch:
jobs:
build-linux:
name: Execute OpenIM Script On Linux
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
environment:
name: openim
strategy:
matrix:
arch: [arm64, armv7, amd64]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Set up Docker for Linux
run: |
sudo docker compose up -d
sudo sleep 30 # Increased sleep time for better stability
timeout-minutes: 20 # Increased timeout for Docker setup
- name: init
run: sudo bash bootstrap.sh
timeout-minutes: 20
- name: Build, Start, Check Services and Print Logs for Linux
run: |
sudo mage
sudo mage start
sudo mage check
- name: Restart Services and Print Logs
run: |
sudo mage stop
sudo mage start
sudo mage check
# build-mac:
# name: Execute OpenIM Script On macOS
# runs-on: macos-latest
# permissions:
# contents: write
# pull-requests: write
# environment:
# name: openim
# strategy:
# matrix:
# arch: [arm64, armv7, amd64]
#
# steps:
# - uses: actions/checkout@v3
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '1.21'
# while ! docker system info > /dev/null 2>&1; do
# echo "Waiting for Docker to start..."
# sleep 10 # Increased delay to ensure Docker starts properly
# done
# - name: Install Docker
# run: |
# brew install docker
# brew install docker-compose
# sleep 10
# docker-compose up -d
# sleep 30
# timeout-minutes: 20
#
# - name: init
# run: sudo bash bootstrap.sh
# timeout-minutes: 20
# - name: Build, Start, Check Services and Print Logs for Linux
# run: |
# sudo mage
# sudo mage start
# sudo mage check
# - name: Restart Services and Print Logs
# run: |
# sudo mage stop
# sudo mage start
# sudo mage check
# build-windows:
# name: Execute OpenIM Script On Windows
# runs-on: windows-latest
# permissions:
# contents: write
# pull-requests: write
# environment:
# name: openim
# strategy:
# matrix:
# arch: [arm64, armv7, amd64]
#
# steps:
# - uses: actions/checkout@v3
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '1.21'
# - name: Set up Docker for Windows
# run: |
# $images = @("zookeeper", "redis", "kafka")
# foreach ($image in $images) {
# $tag = "$image:latest"
# docker pull $tag | Out-Null
# if ($LASTEXITCODE -ne 0) {
# Write-Host "Skipping $image as it is not available for Windows"
# } else {
# Write-Host "Successfully pulled $image"
# }
# }
# docker compose up -d
# Start-Sleep -Seconds 30
# timeout-minutes: 20
# shell: pwsh
# - name: init
# run: bootstrap.bat
# timeout-minutes: 20
# - name: Build, Start, Check Services and Print Logs for Linux
# run: |
# mage
# mage start
# mage check
# - name: Restart Services and Print Logs
# run: |
# mage stop
# mage start
# mage check