-
Notifications
You must be signed in to change notification settings - Fork 34
192 lines (189 loc) · 6.76 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
name: WeDPR-Lab-Core GitHub Actions
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
pull_request:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [published, created, edited]
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
jobs:
build_with_macos:
name: build_with_macos
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Nightly default
run: rustup default nightly
- name: install macOS dependencies
if: runner.os == 'macOS'
run: brew install ccache
- name: build
run: cargo build --all --all-targets --verbose --release
- name: run test and bench
run: cargo test && cargo bench
- uses: actions/upload-artifact@v2
with:
name: libffi_java_acv.dylib
path: target/release/libffi_java_acv.dylib
- uses: actions/upload-artifact@v2
with:
name: libffi_java_vcl.dylib
path: target/release/libffi_java_vcl.dylib
- uses: actions/upload-artifact@v2
with:
name: libffi_java_scd.dylib
path: target/release/libffi_java_scd.dylib
- uses: actions/upload-artifact@v2
with:
name: libffi_java_ktb.dylib
path: target/release/libffi_java_ktb.dylib
- uses: actions/upload-artifact@v2
with:
name: libffi_c_scd.dylib
path: target/release/libffi_c_scd.dylib
- uses: actions/upload-artifact@v2
with:
name: libffi_c_vcl.dylib
path: target/release/libffi_c_vcl.dylib
- uses: actions/upload-artifact@v2
with:
name: libffi_c_hdk.dylib
path: target/release/libffi_c_hdk.dylib
- name: build sm-acv
run: cd ffi/ffi_java/ffi_java_acv && cargo clean && cargo build --release --no-default-features --features sm
- name: rename libffi_java_acv
run: mv target/release/libffi_java_acv.dylib target/release/libffi_java_sm_acv.dylib
- uses: actions/upload-artifact@v2
with:
name: libffi_java_sm_acv.dylib
path: target/release/libffi_java_sm_acv.dylib
build_with_centos:
name: build_with_centos
runs-on: ubuntu-latest
container:
image: docker.io/centos:7
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: install rust language
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-01-10
override: true
- name: install CentOS dependencies
run: |
yum install -y epel-release centos-release-scl
yum install -y openssl openssl-devel 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
- name: configure and compile
run: |
cargo build --all --all-targets --verbose --release
cargo test
cargo bench
- uses: actions/upload-artifact@v2
with:
name: libffi_java_acv.so
path: target/release/libffi_java_acv.so
- uses: actions/upload-artifact@v2
with:
name: libffi_java_vcl.so
path: target/release/libffi_java_vcl.so
- uses: actions/upload-artifact@v2
with:
name: libffi_java_scd.so
path: target/release/libffi_java_scd.so
- uses: actions/upload-artifact@v2
with:
name: libffi_java_ktb.so
path: target/release/libffi_java_ktb.so
- uses: actions/upload-artifact@v2
with:
name: libffi_c_scd.so
path: target/release/libffi_c_scd.so
- uses: actions/upload-artifact@v2
with:
name: libffi_c_vcl.so
path: target/release/libffi_c_vcl.so
- uses: actions/upload-artifact@v2
with:
name: libffi_c_hdk.so
path: target/release/libffi_c_hdk.so
- name: build sm-acv
run: cd ffi/ffi_java/ffi_java_acv && cargo clean && cargo build --release --no-default-features --features sm
- name: rename libffi_java_acv
run: mv target/release/libffi_java_acv.so target/release/libffi_java_sm_acv.so
- uses: actions/upload-artifact@v2
with:
name: libffi_java_sm_acv.so
path: target/release/libffi_java_sm_acv.so
build_with_windows:
name: build_with_windows
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: install rust language
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-01-10
override: true
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
- run: vcpkg install openssl:x64-windows-static-md
- name: build and test
run: |
cargo build --all --all-targets --verbose --release
cargo test
cargo bench
- uses: actions/upload-artifact@v2
with:
name: ffi_java_acv.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_java_acv.dll
- uses: actions/upload-artifact@v2
with:
name: ffi_java_vcl.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_java_vcl.dll
- uses: actions/upload-artifact@v2
with:
name: ffi_java_scd.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_java_scd.dll
- uses: actions/upload-artifact@v2
with:
name: ffi_java_ktb.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_java_ktb.dll
- uses: actions/upload-artifact@v2
with:
name: ffi_c_scd.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_c_scd.dll
- uses: actions/upload-artifact@v2
with:
name: ffi_c_vcl.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_c_vcl.dll
- uses: actions/upload-artifact@v2
with:
name: ffi_c_hdk.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_c_hdk.dll
- name: build sm-acv
run: cd ffi/ffi_java/ffi_java_acv && cargo clean && cargo build --release --no-default-features --features sm
- name: rename libffi_java_acv
run: mv D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_java_acv.dll D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_java_sm_acv.dll
- uses: actions/upload-artifact@v2
with:
name: ffi_java_sm_acv.dll
path: D:\a\WeDPR-Lab-Core\WeDPR-Lab-Core\target\release\ffi_java_sm_acv.dll