20
20
env : {},
21
21
targetPath : " target/release/" ,
22
22
}
23
+ - {
24
+ os : " ubuntu-latest" ,
25
+ arch : " aarch64" ,
26
+ extension : " " ,
27
+ env : { OPENSSL_DIR: "/usr/local/openssl-aarch64" },
28
+ targetPath : " target/aarch64-unknown-linux-gnu/release/" ,
29
+ }
23
30
- {
24
31
os : " macos-latest" ,
25
32
arch : " amd64" ,
@@ -68,15 +75,38 @@ jobs:
68
75
default : true
69
76
components : clippy, rustfmt
70
77
78
+ - name : setup for cross-compile builds
79
+ if : matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
80
+ run : |
81
+ sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
82
+ cd /tmp
83
+ git clone https://github.com/openssl/openssl
84
+ cd openssl
85
+ git checkout OpenSSL_1_1_1l
86
+ sudo mkdir -p $OPENSSL_DIR
87
+ ./Configure linux-aarch64 --prefix=$OPENSSL_DIR --openssldir=$OPENSSL_DIR shared
88
+ make CC=aarch64-linux-gnu-gcc
89
+ sudo make install
90
+ rustup target add aarch64-unknown-linux-gnu
91
+
71
92
- name : Install latest Rust stable toolchain
72
93
uses : actions-rs/toolchain@v1
73
- if : matrix.config.arch == 'aarch64'
94
+ if : matrix.config.arch == 'aarch64' && matrix.config.os == 'macos-latest'
74
95
with :
75
96
toolchain : stable
76
97
default : true
77
98
components : clippy, rustfmt
78
99
target : aarch64-apple-darwin
79
100
101
+ - name : Install latest Rust stable toolchain
102
+ uses : actions-rs/toolchain@v1
103
+ if : matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
104
+ with :
105
+ toolchain : stable
106
+ default : true
107
+ components : clippy, rustfmt
108
+ target : aarch64-unknown-linux-gnu
109
+
80
110
- name : build release
81
111
uses : actions-rs/cargo@v1
82
112
if : matrix.config.arch != 'aarch64'
@@ -86,11 +116,18 @@ jobs:
86
116
87
117
- name : build release
88
118
uses : actions-rs/cargo@v1
89
- if : matrix.config.arch == 'aarch64'
119
+ if : matrix.config.arch == 'aarch64' && matrix.config.os == 'macos-latest'
90
120
with :
91
121
command : build
92
122
args : " --all-features --release --target aarch64-apple-darwin"
93
123
124
+ - name : build release
125
+ uses : actions-rs/cargo@v1
126
+ if : matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
127
+ with :
128
+ command : build
129
+ args : " --all-features --release --target aarch64-unknown-linux-gnu"
130
+
94
131
- name : package release assets
95
132
shell : bash
96
133
run : |
0 commit comments