forked from FISCO-BCOS/FISCO-BCOS
-
Notifications
You must be signed in to change notification settings - Fork 0
182 lines (179 loc) · 6.97 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
name: FISCO-BCOS GitHub Actions
on:
push:
branches-ignore:
- "**-1.3"
- "**-1.5"
tags-ignore:
- v1.*
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
pull_request:
# branches:
# - '**'
release:
types: [published, created, edited]
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: check commit
if: ${{ runner.os == 'Linux' && github.base_ref != 'master' && github.event_name == 'pull_request' }}
run: bash tools/ci/check-commit.sh
- uses: actions/cache@v2
id: cache
with:
path: deps/src
key: deps-v6-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
deps-v6-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v6-${{ runner.temp }}-${{ github.base_ref }}-
deps-v6-${{ runner.temp }}-
- uses: actions/cache@v2
id: ccache
with:
path: ccache
key: ccache-v3-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
ccache-v3-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
ccache-v3-${{ runner.temp }}-${{ github.base_ref }}-
ccache-v3-${{ runner.temp }}-
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8.0.382'
- name: install macOS dependencies
if: runner.os == 'macOS'
run: brew install openssl@1.1 ccache gmp
- name: install Ubuntu dependencies
if: runner.os == 'Linux'
run: sudo apt install -y git curl build-essential clang cmake libssl-dev zlib1g-dev ccache libgmp-dev flex bison patch
- name: configure
run: CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DTESTS=ON .
- name: compile
run: make -j2
- name: run uint tests
run: CTEST_OUTPUT_ON_FAILURE=TRUE make test
macOS_integration_test:
name: build_integration_test
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8.0.382'
- uses: actions/cache@v2
id: cache
with:
path: deps/src
key: deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-
deps-v3-notest-${{ runner.temp }}-
deps-v3-${{ runner.temp }}-
- uses: actions/cache@v2
id: ccache
with:
path: ccache
key: ccache-v2-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
ccache-v2-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
ccache-v2-notest-${{ runner.temp }}-${{ github.base_ref }}-
ccache-v2-notest-${{ runner.temp }}-
- name: install macOS dependencies
run: brew install openssl@1.1 ccache
- name: configure
run: cmake .
- name: compile
run: make -j2
- name: run integration testing
run: cd tools && bash ci/ci_check.sh
- name: tar fisco-bcos for macOS
run: cd bin && strip fisco-bcos && tar -zcf fisco-bcos.tar.gz fisco-bcos
- uses: actions/upload-artifact@v2
with:
name: fisco-bcos-macOS.tar.gz
path: bin/fisco-bcos.tar.gz
ubuntu16_integration_test:
name: ubuntu16_integration_test
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/cache@v2
id: cache
with:
path: deps/src
key: deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-
deps-v3-notest-${{ runner.temp }}-
deps-v3-${{ runner.temp }}-
- uses: actions/cache@v2
id: ccache
with:
path: ccache
key: ccache-v2-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
ccache-v2-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
ccache-v2-notest-${{ runner.temp }}-${{ github.base_ref }}-
ccache-v2-notest-${{ runner.temp }}-
- name: install ubuntu dependencies
run: sudo apt install -y git curl build-essential clang cmake openssl libssl-dev zlib1g-dev ccache libgmp-dev flex bison
- name: configure
run: cmake .
- name: compile
run: make -j2
- name: run integration testing
run: cd tools && bash ci/ci_check.sh
ubuntu20_integration_test:
name: ubuntu20_test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- uses: actions/cache@v2
id: cache
with:
path: deps/src
key: deps-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
deps-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-
deps-v0-notest-${{ runner.temp }}-
deps-v0-${{ runner.temp }}-
- uses: actions/cache@v2
id: ccache
with:
path: ccache
key: ccache-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
ccache-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
ccache-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-
ccache-v0-notest-${{ runner.temp }}-
- name: install ubuntu dependencies
run: sudo apt install -y git curl build-essential clang cmake openssl libssl-dev zlib1g-dev ccache libgmp-dev flex bison
- name: configure
run: cmake . -DARCH_NATIVE=on
- name: compile
run: make -j2
- name: run integration testing
run: cd tools && bash ci/ci_check.sh