From 14ede9a452c5c4ef48932e7028f8b9ed7244c40e Mon Sep 17 00:00:00 2001 From: Xabi Losada Date: Mon, 10 Jun 2024 12:27:20 +0200 Subject: [PATCH] fix: fix ubuntu 2 --- .github/workflows/desktop_artifacts.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop_artifacts.yml b/.github/workflows/desktop_artifacts.yml index c23a82b35..364240780 100644 --- a/.github/workflows/desktop_artifacts.yml +++ b/.github/workflows/desktop_artifacts.yml @@ -35,14 +35,20 @@ jobs: sudo apt-get update sudo apt-get install -y gcc-aarch64-linux-gnu libssl-dev pkg-config - - name: Set environment variables for OpenSSL + - name: Download and set up OpenSSL for cross-compilation if: matrix.target == 'aarch64-unknown-linux-gnu' run: | - export OPENSSL_DIR=/usr + wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz + tar -xzf openssl-1.1.1k.tar.gz + cd openssl-1.1.1k + ./Configure linux-aarch64 --prefix=$HOME/openssl-aarch64 --cross-compile-prefix=aarch64-linux-gnu- + make -j$(nproc) + make install_sw + cd .. + export OPENSSL_DIR=$HOME/openssl-aarch64 export PKG_CONFIG_PATH=$OPENSSL_DIR/lib/pkgconfig export PKG_CONFIG_ALLOW_CROSS=1 export PKG_CONFIG_SYSROOT_DIR=/ - cargo build -p calimero-node --release --target ${{ matrix.target }} - name: Cache cargo registry uses: actions/cache@v3 @@ -60,6 +66,12 @@ jobs: key: ${{ runner.os }}-cargo-build-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo-build- + - name: Build the crate for aarch64 + if: matrix.target == 'aarch64-unknown-linux-gnu' + env: + OPENSSL_DIR: $HOME/openssl-aarch64 + run: cargo build -p calimero-node --release --target ${{ matrix.target }} + - name: Build the crate for x86_64 if: matrix.target == 'x86_64-unknown-linux-gnu' run: cargo build -p calimero-node --release --target ${{ matrix.target }}