Skip to content

Commit

Permalink
fix(actions): arm builds??
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Sep 14, 2023
1 parent bdae825 commit cbd130f
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
88 changes: 87 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install MacOS universal target
if: matrix.platform == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Install deps and build
# Include --target universal-apple-darwin for MacOS, otherwise it will only build for x86_64
Expand Down Expand Up @@ -126,4 +130,86 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: Dorion_macos.dmg
path: src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg
path: src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg

build-arm:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 18

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install armv7 target
run: rustup target add armv7-unknown-linux-gnueabihf

- name: Install armv8 target
run: rustup target add aarch64-unknown-linux-gnu

- name: Install deps and build
run: pnpm install && pnpm vupdate && pnpm prebuild && pnpm build && pnpm tauri build --target armv7-unknown-linux-gnu

- name: Build 64 bit arm
run: pnpm tauri build --target aarch64-unknown-linux-gnu

- name: Create empty folders for plugins and themes for armv7
run: mkdir src-tauri/target/armv7-unknown-linux-gnueabihf/release/plugins && mkdir src-tauri/target/armv7-unknown-linux-gnueabihf/release/themes

- name: Create empty folders for plugins and themes for armv8
run: mkdir src-tauri/target/aarch64-unknown-linux-gnu/release/plugins && mkdir src-tauri/target/aarch64-unknown-linux-gnu/release/themes

- name: Create empty config.json for armv7
run: cd src-tauri/target/armv7-unknown-linux-gnueabihf/release && touch config.json

- name: Create empty config.json for armv8
run: cd src-tauri/target/aarch64-unknown-linux-gnu/release && touch config.json

- name: Compress build for armv7
run: cd src-tauri/target/armv7-unknown-linux-gnueabihf/release && tar -czvf dorion_armv7.tar.gz dorion config.json ./plugins ./themes ./injection ./html ./icons

- name: Compress build for armv8
run: cd src-tauri/target/aarch64-unknown-linux-gnu/release && tar -czvf dorion_armv8.tar.gz dorion config.json ./plugins ./themes ./injection ./html ./icons

- name: Upload Linux portable for armv7
uses: actions/upload-artifact@v3
with:
name: Dorion_armv7_portable.tar.gz
path: src-tauri/target/armv7-unknown-linux-gnueabihf/release/dorion_armv7.tar.gz

- name: Upload Linux deb for armv7
uses: actions/upload-artifact@v3
with:
name: Dorion_armv7_deb.tar.gz
path: src-tauri/target/armv7-unknown-linux-gnueabihf/release/bundle/deb/*.deb

- name: Upload Linux portable for armv8
uses: actions/upload-artifact@v3
with:
name: Dorion_armv8_portable.tar.gz
path: src-tauri/target/aarch64-unknown-linux-gnu/release/dorion_armv8.tar.gz

- name: Upload Linux deb for armv8
uses: actions/upload-artifact@v3
with:
name: Dorion_armv8_deb.tar.gz
path: src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/*.deb
6 changes: 6 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ features = [
"Win32_UI_WindowsAndMessaging",
]

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
Expand Down

0 comments on commit cbd130f

Please sign in to comment.