Skip to content

Readd rpm but disable compression #1684

Readd rpm but disable compression

Readd rpm but disable compression #1684

Workflow file for this run

name: 'test'
on:
- push
jobs:
test-tauri:
name: Test ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
type: 'desktop'
args: '--target aarch64-apple-darwin'
targetPath: '/aarch64-apple-darwin'
name: 'macos-aarch64'
rust-targets: 'aarch64-apple-darwin'
- platform: 'macos-latest'
type: 'desktop'
args: '--target x86_64-apple-darwin'
targetPath: '/x86_64-apple-darwin'
name: 'macos-x86_64'
rust-targets: 'x86_64-apple-darwin'
- platform: 'ubuntu-24.04'
type: 'desktop'
args: ''
targetPath: ''
name: 'linux'
rust-targets: ''
- platform: 'windows-latest'
type: 'desktop'
args: ''
targetPath: ''
name: 'windows'
rust-targets: ''
- platform: 'ubuntu-24.04'
type: 'android'
args: ''
targetPath: ''
name: 'android'
rust-targets: 'aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android'
runs-on: ${{ matrix.platform }}
steps:
- name: 'Shared: Checkout'
uses: actions/checkout@v4
- name: 'Shared: Set up nasm'
uses: ilammy/setup-nasm@v1
- name: 'Shared: Setup node'
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: 'Shared: Install pnpm'
uses: pnpm/action-setup@v4
with:
version: 9
- name: 'Shared: Install Rust toolchain'
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.rust-targets }}
- name: 'Desktop: Cache dependencies'
if: matrix.type == 'desktop'
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ matrix.name }}
workspaces: src-tauri
cache-on-failure: true
cache-all-crates: true
- name: 'Ubuntu: Install linux dependencies'
if: matrix.name == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: 'Shared: Install frontend dependencies'
run: pnpm install
- name: 'Windows: Install SignPath command'
if: matrix.name == 'windows'
shell: powershell
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -scope CurrentUser -Force -Name SignPath
- name: 'Desktop: Build tauri project'
if: matrix.type == 'desktop'
uses: tauri-apps/tauri-action@v0
env:
SIGNPATH_POLICY_SLUG: test-signing
SIGNPATH_API_KEY: ${{ secrets.SIGNPATH_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
includeDebug: true
includeRelease: false
args: ${{ matrix.args }}
- name: 'Desktop: Upload artifact'
if: matrix.type == 'desktop'
uses: actions/upload-artifact@v4
with:
name: tauri-artifact-${{ matrix.name }}
path: |
./src-tauri/target${{ matrix.targetPath }}/debug/bundle/dmg/*.dmg
./src-tauri/target${{ matrix.targetPath }}/debug/bundle/nsis/*.exe
./src-tauri/target${{ matrix.targetPath }}/debug/bundle/appimage/*.AppImage
./src-tauri/target${{ matrix.targetPath }}/debug/bundle/deb/*.deb
./src-tauri/target${{ matrix.targetPath }}/debug/bundle/rpm/*.rpm
./src-tauri/target${{ matrix.targetPath }}/debug/bundle/macos/*.app
if-no-files-found: error
###########
# Android #
###########
- name: 'Android: Install dependencies'
if: matrix.type == 'android'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake golang-go libunwind-dev
- name: 'Android: Set up JDK 21'
if: matrix.type == 'android'
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: 'Android: Setup Android SDK'
if: matrix.type == 'android'
uses: android-actions/setup-android@v3
- name: 'Android: Set up NDK'
if: matrix.type == 'android'
id: setup-ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: r26d
link-to-sdk: false
add-to-path: false
- name: 'Android: Install tauri cli'
if: matrix.type == 'android'
run: |
cargo install --debug --force --locked tauri-cli
cargo install --debug --force --locked bindgen-cli
- name: 'Android: Decode JKS file'
if: matrix.type == 'android'
run: |
echo "${{ secrets.TAURI_ANDROID_KEYSTORE_FILE }}" | base64 --decode > /tmp/keystore.jks
- name: 'Android: Configure android build'
if: matrix.type == 'android'
run: |
cat <<EOF > src-tauri/gen/android/keystore.properties
password=${{ secrets.TAURI_ANDROID_KEYSTORE_PASSWORD }}
keyAlias=upload
storeFile=/tmp/keystore.jks
EOF
- name: 'Android: Build android project'
if: matrix.type == 'android'
run: |
export ANDROID_SDK_HOME=$ANDROID_HOME
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export ANDROID_NDK=$NDK_HOME
export ANDROID_NDK_HOME=$NDK_HOME
export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
cargo tauri android build
env:
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: 'Android: Upload artifact'
if: matrix.type == 'android'
uses: actions/upload-artifact@v4
with:
name: tauri-artifact-${{ matrix.name }}
path: './src-tauri/gen/android/app/build/outputs'
if-no-files-found: error