forked from FISCO-BCOS/FISCO-BCOS
-
Notifications
You must be signed in to change notification settings - Fork 1
208 lines (207 loc) · 8.01 KB
/
workflow.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
name: Others CI check
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
pull_request:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [published, push]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_cppsdk_with_windows:
name: build_cppsdk_with_windows
runs-on: ${{ matrix.os }}
env:
VCPKG_ROOT: c:/vcpkg
strategy:
matrix:
os: [windows-2019]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/cache@v3
id: cache
with:
path: |
deps/
c:/vcpkg
ccache
key: vcpkg-msvc-v3-notest-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
vcpkg-msvc-v3-notest-${{ hashFiles('.github/workflows/workflow.yml') }}
vcpkg-msvc-v3-notest-
# - name: update vcpkg
# run: |
# cd ${{ env.VCPKG_ROOT }} && git fetch --all && git checkout master && git pull
# cd -
- name: Add MSbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: configure and build
run: mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DALLOCATOR=default -DTESTS=OFF -DFULLNODE=OFF -DWITH_LIGHTNODE=OFF -DWITH_TARS_SERVICES=OFF -DWITH_CPPSDK=ON -DWITH_WASM=OFF -DWITH_TIKV=OFF -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake ../ && cmake --build . --parallel 3
#name: Others CI check
#on:
# push:
# paths-ignore:
# - "docs/**"
# - "Changelog.md"
# - "README.md"
# pull_request:
# paths-ignore:
# - "docs/**"
# - "Changelog.md"
# - "README.md"
# release:
# types: [published, push]
#concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# cancel-in-progress: true
#
#jobs:
# build:
# name: build
# runs-on: ${{ matrix.os }}
# continue-on-error: true
# strategy:
# fail-fast: false
# matrix:
# os: [macos-12]
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 5
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: nightly-2024-01-10
# override: true
# - name: Prepare vcpkg
# if: runner.os != 'Windows'
# uses: friendlyanon/setup-vcpkg@v1
# with: { committish: 4116148a7f5c09d39da34ffb75f33283796d687b }
# - uses: actions/cache@v2
# id: deps_cache
# with:
# path: |
# deps/
# c:/vcpkg
# !c:/vcpkg/.git
# !c:/vcpkg/buildtrees
# !c:/vcpkg/packages
# !c:/vcpkg/downloads
# key: build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
# restore-keys: |
# build-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
# - name: Build for windows
# if: runner.os == 'Windows'
# run: |
# mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DTESTS=OFF -DFULLNODE=OFF -DWITH_LIGHTNODE=OFF -DWITH_CPPSDK=ON -DWITH_TIKV=OFF -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake ../
# cmake --build . --parallel 3
# - name: Build for linux
# if: runner.os == 'Linux'
# run: |
# sudo apt install -y lcov ccache wget libgmp-dev python3-dev
# export GCC='gcc-10'
# export CXX='g++-10'
# mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DTESTS=ON -DCOVERAGE=ON -DWITH_LIGHTNODE=ON -DWITH_CPPSDK=ON -DWITH_TIKV=OFF -DWITH_TARS_SERVICES=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
# cmake --build . --parallel 3
# - name: Build for macos
# if: runner.os == 'macOS'
# run: |
# brew install ccache gmp lcov libomp pkg-config
# mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DTESTS=ON -DCOVERAGE=ON -DWITH_LIGHTNODE=ON -DWITH_CPPSDK=ON -DWITH_TIKV=OFF -DWITH_TARS_SERVICES=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
# cmake --build . --parallel 3
# - name: Test
# if: runner.os != 'Windows'
# run: |
# cd build && CTEST_OUTPUT_ON_FAILURE=TRUE ctest
# make coverage
# - name: Generate covreage report
# if: runner.os == 'Linux'
# uses: codecov/codecov-action@v2
# with:
# version: "v0.1.15"
# file: ./build/coverage.info
# name: FISCO BCOS 3.0.0 coverage
# fail_ci_if_error: true
## build_centos:
## name: build_centos
## runs-on: ${{ matrix.os }}
## continue-on-error: true
## strategy:
## fail-fast: false
## matrix:
## os: [ubuntu-20.04]
## tikv: ['WITH_TIKV=ON', 'WITH_TIKV=OFF']
## container: docker.io/centos:7
## steps:
## - uses: actions/checkout@v2
## with:
## fetch-depth: 5
## - uses: actions/cache@v2
## id: deps_cache
## with:
## path: |
## /home/runner/.ccache
## /Users/runner/.ccache/
## deps/
## key: centos-notest-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
## restore-keys: |
## centos-notest-${{ matrix.os }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
## centos-notest-${{ matrix.os }}-${{ github.base_ref }}-
## centos-notest-${{ matrix.os }}-
## - name: Prepare centos tools
## run: |
## yum install -y epel-release centos-release-scl flex bison patch gmp-static
## yum install -y devtoolset-10 devtoolset-11 llvm-toolset-7.0 rh-perl530-perl cmake3 zlib-devel ccache lcov python-devel python3-devel
## yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
## yum install -y git
## yum remove -y cmake
## alias cmake='cmake3'
## - name: Prepare vcpkg
## if: runner.os != 'Windows'
## uses: friendlyanon/setup-vcpkg@v1
## with: { committish: 7e3dcf74e37034eea358934a90a11d618520e139 }
## - uses: actions-rs/toolchain@v1
## with:
## toolchain: nightly-2024-01-10
## override: true
## - name: Build
## run: |
## . /opt/rh/devtoolset-10/enable
## . /opt/rh/rh-perl530/enable
## export LIBCLANG_PATH=/opt/rh/llvm-toolset-7.0/root/lib64/
## export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
## . /opt/rh/llvm-toolset-7.0/enable
## mkdir -p build
## cd build
## alias cmake='cmake3'
## ln -s /usr/bin/cmake3 /usr/bin/cmake
## echo "alias cmake=cmake3" >> ~/.bashrc
## cmake3 -DCMAKE_BUILD_TYPE=Release -DTESTS=ON -DWITH_LIGHTNODE=OFF -DWITH_CPPSDK=OFF -DWITH_TARS_SERVICES=ON -D${{ matrix.tikv }} -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
## cmake3 --build . --parallel 3
## - name: Test with tikv
## if: matrix.tikv == 'WITH_TIKV=ON'
## run: |
## export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
## mkdir -p /root/.tiup/bin/
## curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
## source /github/home/.profile
## tiup update --self && tiup update playground
## tiup clean --all
## tiup playground v5.4.2 --mode tikv-slim --without-monitor &
## sleep 15
## export OMP_NUM_THREADS=1
## cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test
## - name: Test
## if: matrix.tikv == 'WITH_TIKV=OFF'
## run: |
## export OMP_NUM_THREADS=1
## cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test