Skip to content

Commit

Permalink
fix: fix ubuntu 2
Browse files Browse the repository at this point in the history
  • Loading branch information
xilosada committed Jun 10, 2024
1 parent 5ae96d7 commit 14ede9a
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/desktop_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit 14ede9a

Please sign in to comment.