File tree 6 files changed +45
-22
lines changed
6 files changed +45
-22
lines changed Original file line number Diff line number Diff line change 45
45
python -m pip install maturin
46
46
rustup target add x86_64-unknown-linux-musl
47
47
48
+ - name : Install GMP
49
+ if : startsWith(matrix.os, 'ubuntu')
50
+ run : |
51
+ sudo apt-get install lzip -y
52
+ curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | lzip -dc | tar x && \
53
+ cd gmp-6.2.1 && ./configure --enable-fat --with-pic && \
54
+ make -j 6 && sudo make install && cd .. && rm -rf gmp-6.2.1
55
+
48
56
- name : Build Windows
49
57
if : startsWith(matrix.os, 'windows')
50
58
run : |
@@ -114,11 +122,12 @@ jobs:
114
122
115
123
- name : Install dependencies
116
124
run : |
125
+ sudo apt-get install lzip -y
126
+ curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | lzip -dc | tar x && \
127
+ cd gmp-6.2.1 && ./configure --enable-fat --with-pic && \
128
+ make -j 6 && sudo make install && cd .. && rm -rf gmp-6.2.1
117
129
python -m pip install maturin
118
130
rustup target add x86_64-unknown-linux-musl
119
- sudo apt install libgmp3-dev
120
- ls -la /usr/lib64
121
- ls -la /usr/lib
122
131
123
132
- name : Build
124
133
env :
Original file line number Diff line number Diff line change 20
20
os : [ ARM64 ] # , ubuntu-latest ]
21
21
22
22
steps :
23
+
24
+ - uses : Chia-Network/actions/clean-workspace@main
25
+
23
26
- name : Checkout repository
24
27
uses : actions/checkout@v2
25
28
with :
41
44
echo $PATH && \
42
45
curl -L https://sh.rustup.rs > rustup-init.sh && \
43
46
sh rustup-init.sh -y && \
44
- yum -y install openssl-devel && \
45
- yum -y install gmp && \
46
- ls -la /usr/lib64/ && \
47
+ yum -y install sudo openssl-devel && \
48
+ curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.bz2 | tar -xj && \
49
+ cd gmp-6.2.1 && ./configure --enable-fat --with-pic && \
50
+ make -j 6 && sudo make install && cd .. && rm -rf gmp-6.2.1 && \
47
51
source $HOME/.cargo/env && \
48
52
rustup target add aarch64-unknown-linux-musl && \
49
53
rm -rf venv && \
Original file line number Diff line number Diff line change 23
23
with :
24
24
fetch-depth : 0
25
25
26
+ - name : Install GMP
27
+ run : |
28
+ sudo apt-get install lzip -y
29
+ curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | lzip -dc | tar x && \
30
+ cd gmp-6.2.1 && ./configure --enable-fat --with-pic && \
31
+ make -j 6 && sudo make install && cd .. && rm -rf gmp-6.2.1
32
+
26
33
- name : Set up rusts
27
34
uses : actions-rs/toolchain@v1
28
35
with :
Original file line number Diff line number Diff line change 37
37
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust.sh
38
38
arch -arm64 sh rust.sh -y
39
39
40
- - name : install GMP
40
+ - name : Install GMP
41
41
run : |
42
42
curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | tar x
43
43
cd gmp-6.2.1
53
53
. ./venv/bin/activate
54
54
export PATH=~/.cargo/bin:$PATH
55
55
arch -arm64 pip install maturin
56
- arch -arm64 maturin build --no-sdist -i python - -release --strip --cargo-extra-args="--features=openssl"
56
+ arch -arm64 maturin build --no-sdist --release --strip --cargo-extra-args="--features=openssl"
57
57
58
58
- name : Install clvm_rs wheel
59
59
run : |
Original file line number Diff line number Diff line change 70
70
bash -exc '\
71
71
curl -L https://sh.rustup.rs > rustup-init.sh && \
72
72
sh rustup-init.sh -y && \
73
- yum -y install openssl-devel && \
74
- yum -y install gmp && \
75
- ls -la /usr/lib64 && \
73
+ yum -y install sudo openssl-devel && \
74
+ curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.bz2 | tar -xj && \
75
+ cd gmp-6.2.1 && ./configure --enable-fat --with-pic && \
76
+ make -j 6 && sudo make install && cd .. && rm -rf gmp-6.2.1 && \
76
77
source $HOME/.cargo/env && \
77
78
rustup target add x86_64-unknown-linux-musl && \
78
79
rm -rf venv && \
@@ -245,6 +246,16 @@ jobs:
245
246
- uses : actions/checkout@v2
246
247
with :
247
248
fetch-depth : 1
249
+ - name : Install GMP
250
+ run : |
251
+ sudo apt-get install lzip -y
252
+ curl -L https://gmplib.org/download/gmp/gmp-6.2.1.tar.lz | lzip -dc | tar x
253
+ cd gmp-6.2.1
254
+ ./configure --enable-fat --with-pic
255
+ make -j 6
256
+ sudo make install
257
+ cd ..
258
+ rm -rf gmp-6.2.1
248
259
- name : Install rust
249
260
uses : actions-rs/toolchain@v1
250
261
with :
Original file line number Diff line number Diff line change 1
1
fn main ( ) {
2
- #[ cfg( target_os = "windows" ) ]
3
- {
2
+ if cfg ! ( windows) {
4
3
println ! ( "cargo:rustc-link-lib=mpir" ) ;
5
4
println ! ( "cargo:rustc-link-search=mpir_gc_x64" ) ;
6
- }
7
- #[ cfg( target_os = "linux" ) ]
8
- {
9
- println ! ( "cargo:rustc-link-lib=gmp" ) ;
10
- println ! ( "cargo:rustc-link-search=/usr/lib64" ) ;
11
- println ! ( "cargo:rustc-link-search=/usr/lib" ) ;
12
- }
13
- #[ cfg( target_os = "macos" ) ]
14
- {
5
+ } else {
15
6
println ! ( "cargo:rustc-link-lib=gmp" ) ;
7
+ println ! ( "cargo:rustc-link-search=/usr/local/lib" ) ;
16
8
println ! ( "cargo:rustc-link-search=/opt/homebrew/lib" ) ;
17
9
}
18
10
}
You can’t perform that action at this time.
0 commit comments