-
Notifications
You must be signed in to change notification settings - Fork 0
214 lines (178 loc) · 5.52 KB
/
dev.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
202
203
204
205
206
207
208
209
210
211
212
213
214
name: dev
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: env-prepare
run: |
systemctl status docker
echo "------------------------------------------------"
sudo rm /etc/docker/daemon.json
sudo cp .github/docker/daemon.json /etc/docker/daemon.json
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo cp .github/docker/override.conf /etc/systemd/system/docker.service.d/override.conf
sudo systemctl daemon-reload
echo "------------------------------------------------"
sudo systemctl restart docker.service
sleep 5
docker info
echo "------------------------------------------------"
mkdir -p $HOME/.chord
cp -r $PWD/zero/devops/chord/conf $HOME/.chord/
mkdir -p $HOME/.chord/lib
mkdir -p $HOME/.chord/output
find $HOME/.chord/
echo "------------------------------------------------"
sudo apt-get update
sudo apt-get install curl
rustup update
- name: task-build
run: |
cd .chord
npm install
npm run build
- name: service-boot
run: |
docker-compose -f docker-compose.yml up -d
sleep 30
curl -X GET "http://127.0.0.1:9200/_cat/indices?v"
- name: dubbo-build
run: |
cd action/src/action/dubbo/generic-gateway
mvn package
cp target/dubbo-generic-gateway-0.0.1-SNAPSHOT.jar $HOME/.chord/lib/dubbo-generic-gateway-0.0.1-SNAPSHOT.jar
cd ../../../../..
pwd
echo "------------------------------------------------"
cd zero/test/dubbo_provider
mvn package
java -jar target/dubbo-provider-0.0.1-SNAPSHOT.jar &
sleep 10
cd ../../..
pwd
echo "------------------------------------------------"
- name: chord-build-cache-simple
uses: actions/cache@v2
with:
key: build-target-linux-gnu-simple-${{ hashFiles('Cargo.lock') }}
path: |
./target
- name: chord-build-simple
run: |
chmod -R 777 $PWD
make -C .chord/src/cdylib/cdylib_example/bin
cargo --version
./build.sh
find $(pwd)
- name: chord-test
run: |
./target/release/chord run -i$PWD/.chord/dist
- name: chord-target-upload
uses: actions/upload-artifact@v2
with:
name: x86_64-unknown-linux-gnu
retention-days: 1
if-no-files-found: error
path: |
target/release/chord
target/release/chord-web
- name: extra-upload
uses: actions/upload-artifact@v2
with:
name: extra
retention-days: 1
if-no-files-found: error
path: |
action/src/action/dubbo/generic-gateway/target/dubbo-generic-gateway-0.0.1-SNAPSHOT.jar
windows:
runs-on: windows-2022
steps:
- name: checkout
uses: actions/checkout@v2
- name: env-prepare
run: |
rustup update
- name: chord-build-cache-simple
uses: actions/cache@v2
with:
key: build-target-windows-msvc-simple-${{ hashFiles('Cargo.lock') }}
path: |
./target
- name: chord-build-simple
run: |
chmod -R 777 $PWD
cargo --version
cargo build --all-features --verbose --release
- name: chord-target-upload
uses: actions/upload-artifact@v2
with:
name: x86_64-pc-windows-msvc
retention-days: 1
if-no-files-found: error
path: |
target/release/chord.exe
target/release/chord-web.exe
windows-gnu:
runs-on: windows-2022
steps:
- name: checkout
uses: actions/checkout@v2
- name: env-prepare
run: |
rustup update
rustup default stable-x86_64-pc-windows-gnu
- name: chord-build-cache-simple
uses: actions/cache@v2
with:
key: build-target-windows-gnu-simple-${{ hashFiles('Cargo.lock') }}
path: |
./target
- name: chord-build-simple
run: |
chmod -R 777 $PWD
cargo --version
cargo build --all-features --verbose --release
- name: chord-target-upload
uses: actions/upload-artifact@v2
with:
name: x86_64-pc-windows-gnu
retention-days: 1
if-no-files-found: error
path: |
target/release/chord.exe
target/release/chord-web.exe
macos:
runs-on: macos-11
steps:
- name: checkout
uses: actions/checkout@v2
- name: env-prepare
run: |
rustup update
- name: chord-build-cache-simple
uses: actions/cache@v2
with:
key: build-target-apple-darwin-simple-${{ hashFiles('Cargo.lock') }}
path: |
./target
- name: chord-build-simple
run: |
chmod -R 777 $PWD
cargo --version
./build.sh
- name: chord-target-upload
uses: actions/upload-artifact@v2
with:
name: x86_64-apple-darwin
retention-days: 1
if-no-files-found: error
path: |
target/release/chord
target/release/chord-web