2020 env : {},
2121 targetPath : " target/release/" ,
2222 }
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+ }
2330 - {
2431 os : " macos-latest" ,
2532 arch : " amd64" ,
@@ -68,15 +75,38 @@ jobs:
6875 default : true
6976 components : clippy, rustfmt
7077
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+
7192 - name : Install latest Rust stable toolchain
7293 uses : actions-rs/toolchain@v1
73- if : matrix.config.arch == 'aarch64'
94+ if : matrix.config.arch == 'aarch64' && matrix.config.os == 'macos-latest'
7495 with :
7596 toolchain : stable
7697 default : true
7798 components : clippy, rustfmt
7899 target : aarch64-apple-darwin
79100
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+
80110 - name : build release
81111 uses : actions-rs/cargo@v1
82112 if : matrix.config.arch != 'aarch64'
@@ -86,11 +116,18 @@ jobs:
86116
87117 - name : build release
88118 uses : actions-rs/cargo@v1
89- if : matrix.config.arch == 'aarch64'
119+ if : matrix.config.arch == 'aarch64' && matrix.config.os == 'macos-latest'
90120 with :
91121 command : build
92122 args : " --all-features --release --target aarch64-apple-darwin"
93123
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+
94131 - name : package release assets
95132 shell : bash
96133 run : |
0 commit comments