File tree Expand file tree Collapse file tree 2 files changed +23
-13
lines changed
Expand file tree Collapse file tree 2 files changed +23
-13
lines changed Original file line number Diff line number Diff line change 88jobs :
99 build-linux :
1010 runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ arch : [amd64, arm64]
1114
1215 steps :
1316 - name : Checkout code
1417 uses : actions/checkout@v4
1518
16- - name : Install system dependencies
19+ - name : Install system dependencies
1720 run : |
1821 rm -rf src-tauri/target/release/bundle/deb/*.deb
19-
2022 sudo apt-get update
21-
2223 sudo apt-get install -y \
2324 snapd \
2425 libgtk-3-dev \
3435 gstreamer1.0-plugins-ugly \
3536 gstreamer1.0-libav \
3637 gstreamer1.0-vaapi
37-
3838 sudo snap install snapcraft --classic
3939
4040 - name : Set up Bun
4343 bun-version : latest
4444
4545 - name : Install Rust
46- uses : dtolnay/rust-toolchain@stable
46+ run : |
47+ rustup default stable
48+ rustup target add x86_64-unknown-linux-gnu
49+ rustup target add aarch64-unknown-linux-gnu
4750
4851 - name : Rust cache
4952 uses : swatinem/rust-cache@v2
@@ -60,15 +63,19 @@ jobs:
6063 run : bun install
6164
6265 - name : Build Linux Deb
63- run : bun tauri build --bundles deb
66+ run : |
67+ if [ "${{ matrix.arch }}" = "amd64" ]; then
68+ bun tauri build --bundles deb --target x86_64-unknown-linux-gnu
69+ else
70+ bun tauri build --bundles deb --target aarch64-unknown-linux-gnu
71+ fi
6472
6573 - name : Build Snap package
6674 run : |
67- sudo snapcraft pack --destructive-mode
75+ sudo snapcraft pack --destructive-mode --target-arch=${{ matrix.arch }}
6876
6977 - name : Upload Snap artifact
7078 uses : actions/upload-artifact@v4
7179 with :
72- name : hyperionbox-linux-snap
80+ name : hyperionbox-linux-snap-${{ matrix.arch }}
7381 path : ./*.snap
74-
Original file line number Diff line number Diff line change @@ -66,7 +66,10 @@ parts:
6666
6767 source : .
6868 override-build : |
69- dpkg -x src-tauri/target/release/bundle/deb/*.deb $SNAPCRAFT_PART_INSTALL/
70- mkdir -p $SNAPCRAFT_PART_INSTALL/meta
71- cp $SNAPCRAFT_PROJECT_DIR/snap_config/snapshots.yaml $SNAPCRAFT_PART_INSTALL/meta/
72- sed -i -e "s|Icon=HyperionBox|Icon=/usr/share/icons/hicolor/256x256@2/apps/HyperionBox.png|g" $SNAPCRAFT_PART_INSTALL/usr/share/applications/HyperionBox.desktop
69+ ARCH_TRIPLET=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
70+ DEB_FILE=$(ls src-tauri/target/${ARCH_TRIPLET}/release/bundle/deb/*.deb | head -n 1)
71+ dpkg -x "$DEB_FILE" "$SNAPCRAFT_PART_INSTALL/"
72+ mkdir -p "$SNAPCRAFT_PART_INSTALL/meta"
73+ cp "$SNAPCRAFT_PROJECT_DIR/snap_config/snapshots.yaml" "$SNAPCRAFT_PART_INSTALL/meta/"
74+ sed -i -e "s|Icon=HyperionBox|Icon=/usr/share/icons/hicolor/256x256@2/apps/HyperionBox.png|g" \
75+ "$SNAPCRAFT_PART_INSTALL/usr/share/applications/HyperionBox.desktop"
You can’t perform that action at this time.
0 commit comments