forked from FISCO-BCOS/FISCO-BCOS
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (75 loc) · 2.64 KB
/
workflow-self-hosted-centos-upload.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
name: Centos CI Upload
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [push]
pull_request:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_centos:
name: centos ci upload
runs-on: self-hosted-centos-2.0
strategy:
fail-fast: false
env:
DEPS_ROOT: ~/cache/deps
steps:
- name: yum install
run: |
sudo yum update -y -q
sudo yum install -y -q epel-release centos-release-scl flex bison patch gmp-static glibc-static glibc-devel libzstd-devel
sudo yum install -y -q devtoolset-7 llvm-toolset-7.0 rh-perl530-perl cmake3 zlib-devel ccache python-devel python3-devel python3-pip automake openssl git
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/cache@v3
id: cache
with:
path: deps/src
key: deps-x86_64-v0-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/arm_runner.yml') }}
restore-keys: |
deps-x86_64-v0-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/arm_runner.yml') }}
deps-x86_64-v0-${{ runner.temp }}-${{ github.base_ref }}-
deps-x86_64-v0-${{ runner.temp }}-
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.21.0'
- name: configure without tbb
run: |
. /opt/rh/devtoolset-7/enable
. /opt/rh/rh-perl530/enable
mkdir -p build-2
cd build-2
cmake .. -DWITH_TBB=OFF
make fisco-bcos -j4
- name: tar fisco-bcos without tbb
run: cp tools/build_chain.sh build-2/bin/ && cd build-2/bin && strip fisco-bcos && tar -zcf fisco-bcos.tar.gz fisco-bcos build_chain.sh
- uses: actions/upload-artifact@v2
with:
name: fisco-bcos.tar.gz
path: build-2/bin/fisco-bcos.tar.gz
- name: configure and compile
run: |
. /opt/rh/devtoolset-7/enable
. /opt/rh/rh-perl530/enable
mkdir -p build-2
cd build-2
cmake .. -DWITH_TBB=ON
make fisco-bcos -j4
- name: tar fisco-bcos tbb
run: cp tools/build_chain.sh build-2/bin/ && cd build-2/bin && strip fisco-bcos && tar -zcf fisco-bcos.tar.gz fisco-bcos build_chain.sh
- uses: actions/upload-artifact@v2
with:
name: fisco-bcos-without-tbb.tar.gz
path: build-2/bin/fisco-bcos.tar.gz