forked from FISCO-BCOS/FISCO-BCOS
-
Notifications
You must be signed in to change notification settings - Fork 0
192 lines (190 loc) · 7.74 KB
/
release.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
name: FISCO-BCOS release Actions
on:
push:
tags-ignore:
- v1.*
branches-ignore:
- "**"
release:
types: [published, created]
jobs:
compile_macOS_release:
name: upload standard binary of macOS
runs-on: macos-latest
# if: startsWith(github.ref,'v2')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: install rust language
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-06-17
override: true
- uses: actions/cache@v2
id: cache
with:
path: |
/home/runner/.hunter
/Users/runner/.hunter/
deps/src
ccache
key: hunter-clang-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
hunter-clang-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
hunter-clang-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-
hunter-clang-v1-notest-${{ runner.temp }}-
- name: install macOS dependencies
run: brew install ccache libomp
- name: configure
run: export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) && CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake . -DCMAKE_BUILD_TYPE=Release -DTEST=ON -DBUILD_STATIC=ON -DHUNTER_CONFIGURATION_TYPES=Release
- name: compile
run: make -j2 && make tar
- name: tar BcosProBuilder
run: mv tools/BcosProBuilder . && tar -cvzf BcosProBuilder.tgz BcosProBuilder
- name: tar fisco-bcos for macOS
run: mv fisco-bcos-air/ bin/ && cp tools/BcosAirBuilder/build_chain.sh bin/ && cd bin && strip fisco-bcos && tar -cvzf fisco-bcos.tar.gz fisco-bcos build_chain.sh
- name: Upload fisco-bcos binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/fisco-bcos.tar.gz
asset_name: fisco-bcos-macOS-x86_64.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosNodeService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-pro/BcosNodeService.tgz
asset_name: BcosNodeService-macOS-x86_64.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosRpcService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-pro/BcosRpcService.tgz
asset_name: BcosRpcService-macOS-x86_64.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosGatewayService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-pro/BcosGatewayService.tgz
asset_name: BcosGatewayService-macOS-x86_64.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload build_chain.sh
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tools/BcosAirBuilder/build_chain.sh
asset_name: build_chain.sh
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosProBuilder
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: BcosProBuilder.tgz
asset_name: BcosProBuilder.tgz
tag: ${{ github.ref }}
overwrite: true
compile_centos_release:
name: upload standard binary of linux
runs-on: ubuntu-latest
container:
image: docker.io/centos:7
volumes:
- /github/home/.hunter:/github/home/.hunter
- /__w/FISCO-BCOS:/__w/FISCO-BCOS
steps:
- name: install CentOS dependencies
run: |
yum install -y epel-release centos-release-scl
yum install -y git make gcc gcc-c++ glibc-static glibc-devel cmake3 ccache devtoolset-7 libzstd-devel zlib-devel flex bison python-devel python3-devel && source /opt/rh/devtoolset-7/enable
alias cmake='cmake3'
yum install -y https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum swap -y git git224-core
git --version
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: install rust language
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-06-17
override: true
- uses: actions/cache@v2
id: cache
with:
path: |
/home/runner/.hunter
/github/home/.hunter
deps/src
ccache
key: hunter-centos-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
hunter-centos-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
hunter-centos-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-
hunter-centos-v1-notest-${{ runner.temp }}-
- name: configure and compile
run: |
source /opt/rh/devtoolset-7/enable
cmake3 . -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC=ON -DTEST=OFF -DHUNTER_CONFIGURATION_TYPES=Release
make -j4
make tar
- name: tar BcosProBuilder
run: mv tools/BcosProBuilder . && tar -cvzf BcosProBuilder.tgz BcosProBuilder
- name: tar fisco-bcos for CentOS
run: mkdir bin && mv fisco-bcos-air/fisco-bcos bin && cd bin && strip fisco-bcos && tar -cvzf fisco-bcos.tar.gz fisco-bcos
- name: Upload fisco-bcos binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/fisco-bcos.tar.gz
asset_name: fisco-bcos-linux-x86_64.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosNodeService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-pro/BcosNodeService.tgz
asset_name: BcosNodeService-linux-x86_64.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosRpcService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-pro/BcosRpcService.tgz
asset_name: BcosRpcService-linux-x86_64.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosGatewayService binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fisco-bcos-pro/BcosGatewayService.tgz
asset_name: BcosGatewayService-linux-x86_64.tgz
tag: ${{ github.ref }}
overwrite: true
- name: Upload build_chain.sh
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tools/BcosAirBuilder/build_chain.sh
asset_name: build_chain.sh
tag: ${{ github.ref }}
overwrite: true
- name: Upload BcosProBuilder
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: BcosProBuilder.tgz
asset_name: BcosProBuilder.tgz
tag: ${{ github.ref }}
overwrite: true