From 5ae96d7430bd63567828727c27256a7683b054a1 Mon Sep 17 00:00:00 2001 From: Xabi Losada Date: Mon, 10 Jun 2024 12:22:57 +0200 Subject: [PATCH] fix: fix ubuntu --- .github/workflows/desktop_artifacts.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/desktop_artifacts.yml b/.github/workflows/desktop_artifacts.yml index bb4446e31..c23a82b35 100644 --- a/.github/workflows/desktop_artifacts.yml +++ b/.github/workflows/desktop_artifacts.yml @@ -30,11 +30,19 @@ jobs: - name: Install target for ${{ matrix.target }} run: rustup target add ${{ matrix.target }} - - name: Install cross-compilation tools for Linux - if: matrix.target == 'aarch64-unknown-linux-gnu' + - name: Install dependencies for Linux run: | sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu + sudo apt-get install -y gcc-aarch64-linux-gnu libssl-dev pkg-config + + - name: Set environment variables for OpenSSL + if: matrix.target == 'aarch64-unknown-linux-gnu' + run: | + export OPENSSL_DIR=/usr + 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 @@ -52,11 +60,12 @@ jobs: key: ${{ runner.os }}-cargo-build-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo-build- - - name: Build the crate + - 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 }} - name: Upload binary uses: actions/upload-artifact@v3 with: name: calimero-node_${{ matrix.target }} - path: target/${{ matrix.target }}/release/calimero-node* \ No newline at end of file + path: target/${{ matrix.target }}/release/calimero-node*