fixing aarch64 workflow

This commit is contained in:
Abdenasser 2024-11-07 18:43:56 +01:00
parent 42f8cf1d78
commit 978efa8dcf

View File

@ -70,18 +70,36 @@ jobs:
- name: Install Dependencies
run: npm install
- name: Setup pkg-config for ARM64
- name: Setup cross-compilation environment
run: |
sudo apt-get install -y crossbuild-essential-arm64 pkg-config
# Create the pkg-config wrapper for aarch64
sudo apt-get install -y \
crossbuild-essential-arm64 \
pkg-config \
libssl-dev:arm64 \
libssl-dev \
openssl:arm64
# Create .cargo/config
mkdir -p .cargo
cat > .cargo/config << EOF
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
ar = "aarch64-linux-gnu-ar"
EOF
# Setup pkg-config
sudo tee /usr/bin/aarch64-linux-gnu-pkg-config << 'EOF'
#!/bin/sh
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
exec pkg-config "$@"
EOF
sudo chmod +x /usr/bin/aarch64-linux-gnu-pkg-config
# Set environment variables
echo "PKG_CONFIG=/usr/bin/aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
echo "OPENSSL_DIR=/usr/include/aarch64-linux-gnu" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
- name: Build Frontend
run: npm run build