Skip to content

Commit 2fa7678

Browse files
committed
Squashed commit of the following:
commit 4efcf1b Author: Eugene <inbox@null.page> Date: Wed Jan 22 23:07:24 2025 +0100 Update build.yml commit abea964 Author: Eugene <inbox@null.page> Date: Wed Jan 22 22:59:28 2025 +0100 Update build.yml commit 2e7b66a Author: Eugene <inbox@null.page> Date: Wed Jan 22 22:40:11 2025 +0100 native arm64 build
1 parent c6939b1 commit 2fa7678

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,25 @@ jobs:
130130
path: artifact-zip
131131

132132
Linux-Build:
133-
runs-on: ubuntu-24.04
133+
runs-on: ${{matrix.os}}
134134
needs: Lint
135135
strategy:
136136
matrix:
137137
include:
138138
- build-arch: x64
139139
arch: amd64
140140
rust_triple: x86_64-unknown-linux-gnu
141+
os: ubuntu-24.04
141142
- build-arch: arm64
142143
arch: arm64
143144
rust_triple: aarch64-unknown-linux-gnu
144145
triplet: aarch64-linux-gnu-
146+
os: ubuntu-24.04-arm
145147
- build-arch: arm
146148
arch: armhf
147149
rust_triple: arm-unknown-linux-gnueabihf
148150
triplet: arm-linux-gnueabihf-
151+
os: ubuntu-24.04
149152
fail-fast: false
150153

151154
env:
@@ -167,6 +170,10 @@ jobs:
167170
with:
168171
node-version: 22
169172

173+
- name: Install FPM
174+
run: |
175+
sudo gem install fpm
176+
170177
- run: rustup target add ${{matrix.rust_triple}}
171178

172179
- name: Install dependencies
@@ -176,12 +183,12 @@ jobs:
176183
177184
- name: Setup tar to run as root
178185
run: sudo chmod u+s "$(command -v tar)"
179-
if: matrix.build-arch != 'x64'
186+
if: matrix.build-arch == 'arm'
180187

181188
- name: Download cached sysroot
182189
uses: actions/cache@v3
183190
id: dl-cached-sysroot
184-
if: matrix.build-arch !='x64'
191+
if: matrix.build-arch == 'arm'
185192
with:
186193
key: sysroot-${{matrix.build-arch}}
187194
path: /${{matrix.build-arch}}-sysroot
@@ -191,7 +198,7 @@ jobs:
191198
sudo apt-get update -y && sudo apt-get install debootstrap qemu-user-static binfmt-support -y
192199
sudo qemu-debootstrap --include=libfontconfig1-dev,libsecret-1-dev,libnss3,libatk1.0-0,libatk-bridge2.0-0,libgdk-pixbuf2.0-0,libgtk-3-0,libgbm1 --variant=buildd --exclude=snapd --components=main,restricted,universe,multiverse --extractor=dpkg-deb --arch ${{matrix.arch}} bionic /${{matrix.build-arch}}-sysroot/ http://ports.ubuntu.com/ubuntu-ports/
193200
sudo find /${{matrix.build-arch}}-sysroot -type l -lname '/*' -exec sh -c 'file="$0"; dir=$(dirname "$file"); target=$(readlink "$0"); prefix=$(dirname "$dir" | sed 's@[^/]*@\.\.@g'); newtarget="$prefix$target"; ln -snf $newtarget $file' {} \; ;
194-
if: matrix.build-arch != 'x64' && steps.dl-cached-sysroot.outputs.cache-hit != 'true'
201+
if: matrix.build-arch == 'arm' && steps.dl-cached-sysroot.outputs.cache-hit != 'true'
195202

196203
- name: Setup env to use ${{matrix.build-arch}} sysroot
197204
run: |
@@ -206,9 +213,9 @@ jobs:
206213
elif [[ ${{matrix.arch}} == 'arm64' ]]; then
207214
echo "PKG_CONFIG_PATH=/${{matrix.build-arch}}-sysroot/usr/lib/pkgconfig/:/${{matrix.build-arch}}-sysroot/usr/lib/aarch64-linux-gnu/pkgconfig/" >> $GITHUB_ENV
208215
fi
209-
if: matrix.build-arch != 'x64'
216+
if: matrix.build-arch == 'arm'
210217

211-
- name: Install npm_modules (amd64)
218+
- name: Install npm_modules (native)
212219
run: |
213220
npm i -g yarn node-gyp
214221
yarn --network-timeout 1000000 --arch=${{matrix.build-arch}} --target-arch=${{matrix.build-arch}}
@@ -225,6 +232,7 @@ jobs:
225232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
226233
KEYGEN_TOKEN: ${{ secrets.KEYGEN_TOKEN }}
227234
USE_HARD_LINKS: false
235+
USE_SYSTEM_FPM: true
228236
# DEBUG: electron-builder,electron-builder:*
229237

230238
- name: Build web resources (amd64 only)

0 commit comments

Comments
 (0)