Coder Social home page Coder Social logo

Comments (7)

elibroftw avatar elibroftw commented on June 16, 2024 1

GitHub actions is all amd64 so you'll have to build the app image on your machine instead of relying on the GitHub action.

from modern-desktop-app-template.

PMLS3 avatar PMLS3 commented on June 16, 2024

Thank you

from modern-desktop-app-template.

PMLS3 avatar PMLS3 commented on June 16, 2024

@elibroftw I was just wondering if something like this can work for armv

build_arm:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup ARM build environment
uses: pguyot/[email protected]
with:
base_image: dietpi:rpi_armv8_bullseye
cpu: cortex-a53
bind_mount_repository: true
image_additional_mb: 10240
optimize_image: false
commands: |
export HOME=/root
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
apt-get update -y --allow-releaseinfo-change
apt-get upgrade -y
apt-get autoremove -y
apt-get install curl
curl https://sh.rustup.rs -sSf | sh -s -- -y
. "$HOME/.cargo/env"
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash
apt-get install -y nodejs
npm install next@latest react@latest react-dom@latest eslint-config-next@latest
apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
cargo install tauri-cli
npm install
cargo build --verbose
- name: Upload deb bundle
uses: actions/upload-artifact@v3
with:
name: Debian Bundle
path: ${{ github.workspace }}/src-tauri/target/release/bundle/deb/tauri_1.4_arm64.deb

 Im still getting root errors but it seems like a workaround?
 
 thank you in advance

from modern-desktop-app-template.

elibroftw avatar elibroftw commented on June 16, 2024

What errors are you getting? I'll take a look soon.

from modern-desktop-app-template.

elibroftw avatar elibroftw commented on June 16, 2024

I see you used this https://tauri.app/v1/guides/building/linux#cross-compiling-tauri-applications-for-arm-based-devices

from modern-desktop-app-template.

PMLS3 avatar PMLS3 commented on June 16, 2024

I see you used this https://tauri.app/v1/guides/building/linux#cross-compiling-tauri-applications-for-arm-based-devices

I am trying too yes

`name: ARMv7 Linux Build
on:
push:
tags:
- "v*"
workflow_dispatch:

env:
APP_NAME: "KIOSK"

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

  - name: Build changelog
    id: build_changelog
    run: |
      PREV_TAG=$(git tag --list v* | tail -n2 | head -n1)
      echo "changelog=$(git log $PREV_TAG...${{ github.ref_name }} --pretty=format:"- %s")" >> $GITHUB_OUTPUT
outputs:
  changelog: ${{ steps.build_changelog.outputs.changelog }}

release:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
needs: changelog
steps:
- name: Checkout repository
uses: actions/checkout@v4

  - name: Setup Node.js
    uses: actions/setup-node@v4
    with:
      node-version: latest

  - name: Setup pnpm
    uses: pnpm/action-setup@v3
    with:
      version: 8

  - name: Setup Rust
    run: |
      rustup update --no-self-update

  - name: Install Ubuntu dependencies
    if: matrix.platform == 'ubuntu-latest'
    run: |
      sudo apt update
      xargs sudo apt install -y < environment/apt_packages.txt
      sudo apt install -y qemu qemu-user-static binfmt-support parted wget dosfstools zip

  - name: Change directory and build
    run: |
      cd src-tauri

  - name: Setup ARM build environment
    uses: pguyot/[email protected]
    with:
      base_image: raspios_lite:latest
      cpu: cortex-a7
      bind_mount_repository: true
      image_additional_mb: 10240
      optimize_image: false
      commands: |
        # Rust complains (rightly) that $HOME doesn't match eid home
        export HOME=/root
        # Workaround to CI worker being stuck on Updating crates.io index
        export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
        # Install setup prerequisites
        apt-get update -y --allow-releaseinfo-change
        apt-get upgrade -y
        apt-get autoremove -y
        apt-get install curl
        curl https://sh.rustup.rs -sSf | sh -s -- -y
        . "$HOME/.cargo/env"
        curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash
        # Install framework specific packages
        apt-get install -y nodejs
        npm install next@latest react@latest react-dom@latest eslint-config-next@latest
        # Install build tools and tauri-cli requirements
        apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
        cargo install tauri-cli
        # Install frontend dependencies
        npm install
        # Build the application
        cargo tauri build

  - name: Build Tauri app for ARMv7 Linux
    uses: tauri-apps/tauri-action@v0
    env:
      CI: true
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
      TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
      TARGET: armv7-unknown-linux-gnueabihf
    with:
      tagName: ${{ github.ref_name }}
      releaseName: "${{ env.APP_NAME }} v__VERSION__"
      releaseBody: |
        ${{needs.changelog.outputs.changelog}}
        See the assets to download this version and install.
      releaseDraft: true
      prerelease: false

`

Run sudo apt-get update && sudo apt-get install -y qemu qemu-user-static binfmt-support parted wget dosfstools zip
sudo: apt-get: command not found
Error: Process completed with exit code 1.
Run case true in
umount: /tauri-linux: not currently mounted
Error: Process completed with exit code 1.
Run sudo update-binfmts --package arm-runner-action --remove arm-runner-action-qemu-arm /usr/bin/qemu-arm-static0
sudo: update-binfmts: command not found
Error: Process completed with exit code 1.

from modern-desktop-app-template.

PMLS3 avatar PMLS3 commented on June 16, 2024

`name: ARMv7 Linux Build
on:
push:
tags:
- "v*"
workflow_dispatch:

env:
APP_NAME: "KIOSK"

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false

  - name: Get pnpm store directory
    shell: bash
    run: |
      echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

  - uses: actions/cache@v3
    name: Setup pnpm cache
    with:
      path: ${{ env.STORE_PATH }}
      key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
      restore-keys: |
        ${{ runner.os }}-pnpm-store-

  - name: Install 7z
    run: sudo apt-get install -y p7zip-full

  - uses: pguyot/[email protected]
    with:
      base_image: raspios_lite:latest
      cpu: cortex-a53
      bind_mount_repository: true
      image_additional_mb: 10240
      optimize_image: false
      commands: |
        # Rust complains (rightly) that $HOME doesn't match eid home
        export HOME=/root
        # Workaround to CI worker being stuck on Updating crates.io index
        export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
        # Install setup prerequisites
        apt-get update -y --allow-releaseinfo-change
        apt-get upgrade -y
        apt-get autoremove -y
        apt-get install curl
        curl https://sh.rustup.rs -sSf | sh -s -- -y
        . "$HOME/.cargo/env"
        curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash
        # Install framework specific packages
        apt-get install -y nodejs
        # Install build tools and tauri-cli requirements
        apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev

  - name: Configure pkg-config for cross-compilation
    run: |
      export PKG_CONFIG_ALLOW_CROSS=1
      export PKG_CONFIG_ALLOW_CROSS_armv7_unknown_linux_gnueabihf=1
      export PKG_CONFIG_SYSROOT_DIR=/usr/arm-linux-gnueabihf/
      export PKG_CONFIG_PATH=/usr/arm-linux-gnueabihf/usr/lib/pkgconfig:/usr/arm-linux-gnueabihf/usr/share/pkgconfig
      export PKG_CONFIG=arm-linux-gnueabihf-pkg-config

  - name: Install dependencies
    run: |
      pnpm install
      rustup target add armv7-unknown-linux-gnueabihf
      pnpm tauri build --target armv7-unknown-linux-gnueabihf

  - name: Upload deb bundle
    uses: actions/upload-artifact@v3
    with:
      name: Debian Bundle
      path: ${{ github.workspace }}/src-tauri/target/release/bundle/deb/tauri_1.4_arm64.deb`

But still getting the following error:

cargo:warning=pkg-config has not been configured to support cross-compilation.
Install a sysroot for the target platform and configure it via
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
cross-compiling wrapper for pkg-config and set it via
PKG_CONFIG environment variable.
warning: build failed, waiting for other jobs to finish...
Error failed to build app: failed to build app
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

from modern-desktop-app-template.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.