Skip to content

Commit

Permalink
add setup for cross-compile builds
Browse files Browse the repository at this point in the history
  • Loading branch information
VishnuJin committed Mar 31, 2022
1 parent a99664d commit 7e89087
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
os: "ubuntu-latest",
arch: "aarch64",
extension: "",
env: {},
env: { OPENSSL_DIR: "/usr/local/openssl-aarch64" },
targetPath: "target/aarch64-unknown-linux-gnu/release/",
}
- {
Expand Down Expand Up @@ -75,6 +75,20 @@ jobs:
default: true
components: clippy, rustfmt

- name: setup for cross-compile builds
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
run: |
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
cd /tmp
git clone https://github.com/openssl/openssl
cd openssl
git checkout OpenSSL_1_1_1l
sudo mkdir -p $OPENSSL_DIR
./Configure linux-aarch64 --prefix=$OPENSSL_DIR --openssldir=$OPENSSL_DIR shared
make CC=aarch64-linux-gnu-gcc
sudo make install
rustup target add aarch64-unknown-linux-gnu
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'macos-latest'
Expand All @@ -86,7 +100,7 @@ jobs:

- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
if: matrix.config.arch == 'aarch64'&& matrix.config.os == 'ubuntu-latest'
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
with:
toolchain: stable
default: true
Expand Down

0 comments on commit 7e89087

Please sign in to comment.