Skip to content

fixing build

fixing build #446

Workflow file for this run

name: 'Build Test'
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
runner-type:
type: choice
description: 'The type of runner to use'
required: true
default: 'ubuntu-22.04'
options:
- 'ubuntu-22.04'
- 'debian-arm64-latest'
build-for:
type: choice
description: 'The target to build for'
required: true
default: 'desktop'
options:
- 'desktop'
- 'android'
env:
ANDROID_NDK_VERSION: 'r26d'
NODE_VERSION: '20.x'
CI_BUILD_FOR: ${{ github.event.inputs.build-for || 'desktop' }}
CI_RUNNER_TYPE: ${{ github.event.inputs.runner-type || 'ubuntu-22.04' }}
jobs:
build:
runs-on: ${{ github.event.inputs.runner-type || 'ubuntu-22.04' }}
steps:
- uses: actions/checkout@v4
- name: Install Required Packages
if: ${{ runner.os == 'Linux' && env.CI_BUILD_FOR == 'desktop' }}
run: |
sudo apt-get update
sudo apt-get install -y build-essential curl wget file libssl-dev libayatana-appindicator3-dev \
libwebkit2gtk-4.1-dev librsvg2-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust Project
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ runner.os }}-${{ github.event.inputs.runner-type }}-rust
workspaces: src-tauri
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install NPM Dependencies
run: npm ci
- name: Setup JDK
uses: actions/setup-java@v4
if: env.CI_BUILD_FOR == 'android'
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
if: env.CI_BUILD_FOR == 'android'
uses: android-actions/setup-android@v3
- name: Install Android SDK Packages
run: sdkmanager 'build-tools;34.0.0' 'ndk;${{ env.ANDROID_NDK_VERSION }}' 'platforms;android-33'
- name: Check lint
run: npm run ng lint
- name: Build for Desktop
if: env.CI_BUILD_FOR == 'desktop'
run: npm run build -- --features=vendored-openssl
- name: Build for Android
if: env.CI_BUILD_FOR == 'android'
run: |
npm run tauri android init
npm run tauri android build
env:
NDK_HOME: "${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}"