Skip to content

Commit 0db2a14

Browse files
committed
Fix ARM64 repositories config for aarch64 workflow
1 parent 2f5ec5c commit 0db2a14

File tree

1 file changed

+35
-18
lines changed

1 file changed

+35
-18
lines changed

.github/workflows/linux-aarch64-nightly.yml

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ jobs:
3232
with:
3333
targets: aarch64-unknown-linux-gnu
3434

35-
- name: Fix apt sources to jammy only
36-
run: |
37-
sudo sed -i 's/noble/jammy/g' /etc/apt/sources.list
38-
sudo rm -f /etc/apt/sources.list.d/*.list
39-
40-
- name: Enable multiarch and add ARM64 ports repo
35+
- name: Configure ARM64 repositories and Install Dependencies
4136
run: |
4237
sudo dpkg --add-architecture arm64
43-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/arm64-ports.list
44-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/arm64-ports.list
45-
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/arm64-ports.list
38+
39+
# Add ARM64 sources to a new file, preserving existing amd64 sources
40+
sudo tee /etc/apt/sources.list.d/arm64-sources.list << EOF
41+
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse
42+
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse
43+
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse
44+
EOF
45+
4646
sudo apt-get update
4747
48-
- name: Install cross-compilation dependencies
49-
run: |
48+
# Install required packages including cross-compilation tools and arm64 libraries
49+
# Combine installations from your original two apt-get install steps
5050
sudo apt-get install -y \
5151
build-essential \
5252
pkg-config \
@@ -68,28 +68,48 @@ jobs:
6868
libfuse2 \
6969
qemu-user-static
7070
71-
- name: Setup pkg-config for cross compilation
71+
# Configure pkg-config for cross-compilation (this part seems okay)
72+
echo "PKG_CONFIG=/usr/bin/aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV
73+
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
74+
75+
- name: Install Dependencies
76+
run: npm install
77+
78+
- name: Setup cross-compilation environment
7279
run: |
73-
sudo tee /usr/bin/aarch64-linux-gnu-pkg-config > /dev/null << 'EOF'
80+
sudo apt-get install -y \
81+
crossbuild-essential-arm64 \
82+
pkg-config \
83+
libssl-dev:arm64 \
84+
libssl-dev \
85+
openssl:arm64 \
86+
file \
87+
desktop-file-utils \
88+
libfuse2 \
89+
qemu-user-static
90+
91+
# Setup pkg-config
92+
sudo tee /usr/bin/aarch64-linux-gnu-pkg-config << 'EOF'
7493
#!/bin/sh
7594
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig
7695
exec pkg-config "$@"
7796
EOF
7897
sudo chmod +x /usr/bin/aarch64-linux-gnu-pkg-config
7998
80-
- name: Setup .cargo config and environment variables
81-
run: |
99+
# Create .cargo/config
82100
mkdir -p .cargo
83101
cat > .cargo/config << EOF
84102
[target.aarch64-unknown-linux-gnu]
85103
linker = "aarch64-linux-gnu-gcc"
86104
ar = "aarch64-linux-gnu-ar"
87105
EOF
88106
107+
# Download and setup appimagetool for ARM64
89108
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage
90109
chmod +x appimagetool-aarch64.AppImage
91110
sudo mv appimagetool-aarch64.AppImage /usr/local/bin/appimagetool
92111
112+
# Set environment variables
93113
echo "PKG_CONFIG=/usr/bin/aarch64-linux-gnu-pkg-config" >> $GITHUB_ENV
94114
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
95115
echo "OPENSSL_DIR=/usr" >> $GITHUB_ENV
@@ -98,9 +118,6 @@ jobs:
98118
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
99119
echo "APPIMAGE_EXTRACT_AND_RUN=1" >> $GITHUB_ENV
100120
101-
- name: Install Dependencies
102-
run: npm install
103-
104121
- name: Build Frontend
105122
run: npm run build
106123

0 commit comments

Comments
 (0)