99
1010 strategy :
1111 matrix :
12- arch : [aarch64, armv7l ]
12+ target : [aarch64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf ]
1313 include :
14- - arch : aarch64
15- cpu : cortex-a72
16- base_image : https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img
14+ - target : aarch64-unknown-linux-gnu
1715 deb : arm64
1816 rpm : aarch64
1917 appimage : aarch64
20- - arch : armv7l
21- cpu : cortex-a7
22- base_image : https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-armhf.img
18+ - target : armv7-unknown-linux-gnueabihf
2319 deb : armhf
2420 rpm : armv7hl
2521 appimage : armv7l
3834 node-version : 20
3935 cache : ' pnpm'
4036
37+ - name : Install Rust
38+ uses : dtolnay/rust-toolchain@stable
39+ with :
40+ targets : ${{ matrix.target }}
41+
42+ - name : Install dependencies
43+ run : |
44+ sudo apt-get update
45+ sudo apt-get install -y libwebkit2gtk-4.1-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev
46+
4147 - uses : actions/cache@v4
4248 with :
4349 path : |
@@ -47,56 +53,33 @@ jobs:
4753 ~/.cargo/git/db/
4854 target/
4955 src-tauri/target/
50- key : ${{ runner.os }}-arm-${{ matrix.arch }}-${{ hashFiles('Cargo.lock') }}
51-
52- - name : Build app
53- uses : pguyot/arm-runner-action@v2.6.5
54- with :
55- base_image : ${{ matrix.base_image }}
56- cpu : ${{ matrix.cpu }}
57- bind_mount_repository : true
58- image_additional_mb : 10240
59- optimize_image : no
60- exit_on_fail : no
61- commands : |
62- # Prevent Rust from complaining about $HOME not matching eid home
63- export HOME=/root
64-
65- # Workaround to CI worker being stuck on Updating crates.io index
66- export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
67-
68- # Install setup prerequisites
69- apt-get update -y --allow-releaseinfo-change
70- apt-get autoremove -y
71- apt-get install -y --no-install-recommends --no-install-suggests curl libwebkit2gtk-4.1-dev build-essential libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf libfuse2 file
72- curl https://sh.rustup.rs -sSf | sh -s -- -y
73- . "$HOME/.cargo/env"
74- curl -fsSL https://deb.nodesource.com/setup_lts.x | bash
75- apt-get install -y nodejs
56+ key : ${{ runner.os }}-arm-${{ matrix.target }}-${{ hashFiles('Cargo.lock') }}
7657
77- # Install frontend dependencies
78- pnpm install
58+ - name : Install frontend dependencies
59+ run : pnpm install
7960
80- # Build the application
81- pnpm run tauri build -- --verbose
61+ - name : Build Tauri app
62+ run : |
63+ export CARGO_TARGET_${{ matrix.target }}_LINKER=arm-linux-gnueabihf-gcc
64+ pnpm run tauri build -- --target ${{ matrix.target }}
8265
8366 - name : Get app version
8467 run : echo "APP_VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
8568
8669 - name : Upload deb bundle
8770 uses : actions/upload-artifact@v4
8871 with :
89- name : Debian Bundle ARM ${{ matrix.arch }}
90- path : ${{ github.workspace }}/src-tauri/target/release/bundle/deb/switch-shuttle_${{ env.APP_VERSION }}_${{ matrix.deb }}.deb
72+ name : Debian Bundle ARM ${{ matrix.target }}
73+ path : ${{ github.workspace }}/src-tauri/target/${{ matrix.target }}/ release/bundle/deb/switch-shuttle_${{ env.APP_VERSION }}_${{ matrix.deb }}.deb
9174
9275 - name : Upload rpm bundle
9376 uses : actions/upload-artifact@v4
9477 with :
95- name : RPM Bundle ARM ${{ matrix.arch }}
96- path : ${{ github.workspace }}/src-tauri/target/release/bundle/rpm/switch-shuttle-${{ env.APP_VERSION }}-1.${{ matrix.rpm }}.rpm
78+ name : RPM Bundle ARM ${{ matrix.target }}
79+ path : ${{ github.workspace }}/src-tauri/target/${{ matrix.target }}/ release/bundle/rpm/switch-shuttle-${{ env.APP_VERSION }}-1.${{ matrix.rpm }}.rpm
9780
9881 - name : Upload appimage bundle
9982 uses : actions/upload-artifact@v4
10083 with :
101- name : AppImage Bundle ARM ${{ matrix.arch }}
102- path : ${{ github.workspace }}/src-tauri/target/release/bundle/appimage/switch-shuttle_${{ env.APP_VERSION }}_${{ matrix.appimage }}.AppImage
84+ name : AppImage Bundle ARM ${{ matrix.target }}
85+ path : ${{ github.workspace }}/src-tauri/target/${{ matrix.target }}/ release/bundle/appimage/switch-shuttle_${{ env.APP_VERSION }}_${{ matrix.appimage }}.AppImage
0 commit comments