Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): provide appimages for older glibc versions #1062

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 66 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ jobs:
target: x86_64-pc-windows-msvc
arch: amd64
cli_only: false
- host: ubuntu-20.04
target: x86_64-unknown-linux-gnu
os: linux
arch: amd64
cli_only: false
- host: ubuntu-22.04
target: x86_64-unknown-linux-gnu
os: linux
Expand Down Expand Up @@ -139,7 +144,7 @@ jobs:
working-directory: "./desktop"

- name: Setup System Dependencies
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false
if: ( matrix.settings.host == 'ubuntu-22.04' || matrix.settings.host == 'ubuntu-20.04' ) && matrix.settings.cli_only == false
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
Expand Down Expand Up @@ -194,11 +199,28 @@ jobs:
run: yarn install
working-directory: "./desktop"

- name: Build Desktop App
- name: Build Desktop App (linux glibc old)
if: matrix.settings.host == 'ubuntu-20.04' && matrix.settings.cli_only == false
uses: tauri-apps/tauri-action@v0.4.0
with:
releaseId: glibc_old_${{ needs.create-release.outputs.release_id }}
projectPath: "./desktop"
args: "--config src-tauri/tauri-linux.conf.json --target ${{ matrix.settings.target }} --features enable-updater --bundles appimage,updater"
includeUpdaterJson: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
# AppImage Signing:
SIGN: ${{ secrets.APP_IMAGE_SIGN }}
SIGN_KEY: ${{ secrets.APP_IMAGE_SIGN_KEY }}
APPIMAGETOOL_SIGN_PASSPHRASE: ${{ secrets.APP_IMAGE_SIGN_PASSPHRASE }}

- name: Build Desktop App (linux glibc new)
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false
uses: tauri-apps/tauri-action@v0.4.0
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
releaseId: glibc_new_${{ needs.create-release.outputs.release_id }}
projectPath: "./desktop"
args: "--config src-tauri/tauri-linux.conf.json --target ${{ matrix.settings.target }} --features enable-updater --bundles appimage,updater"
includeUpdaterJson: true
Expand Down Expand Up @@ -232,14 +254,23 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}

- name: Build linux tar.gz
- name: Build linux tar.gz (glibc old)
if: matrix.settings.host == 'ubuntu-20.04' && matrix.settings.cli_only == false
id: build-desktop-targz-glibc-old
run: |
cd ./desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/dev-pod.AppDir || exit 1
tar --exclude=usr/bin/xdg-open --exclude=usr/lib --exclude=usr/share/doc --exclude=usr/share/glib-2.0 -zcvf dev-pod-desktop.tar.gz usr

mv dev-pod-desktop.tar.gz ../../dev-pod-glibc-old-${{needs.create-release.outputs.package_version}}.tar.gz

- name: Build linux tar.gz (glibc new)
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false
id: build-desktop-targz
id: build-desktop-targz-glibc-new
run: |
cd ./desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/dev-pod.AppDir || exit 1
tar --exclude=usr/bin/xdg-open --exclude=usr/lib --exclude=usr/share/doc --exclude=usr/share/glib-2.0 -zcvf dev-pod-desktop.tar.gz usr

mv dev-pod-desktop.tar.gz ../../dev-pod-${{needs.create-release.outputs.package_version}}.tar.gz
mv dev-pod-desktop.tar.gz ../../dev-pod-glibc-new-${{needs.create-release.outputs.package_version}}.tar.gz

- name: Build Desktop App
if: matrix.settings.host == 'windows-latest' && matrix.settings.cli_only == false
Expand Down Expand Up @@ -352,15 +383,42 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Tar.gz Asset
- name: Upload Tar.gz Asset (glibc old)
if: matrix.settings.host == 'ubuntu-20.04' && matrix.settings.cli_only == false
uses: actions/github-script@v6
with:
script: |
const fs = require("fs")

const releaseId = "${{ needs.create-release.outputs.release_id }}"
const assetName = "dev-pod-glibc-old-${{needs.create-release.outputs.package_version}}.tar.gz"
const assetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/${assetName}`

console.log("Attempting to upload release asset: ", assetName)

await github.rest.repos.uploadReleaseAsset({
headers: {
"content-type": "application/zip",
"content-length": fs.statSync(assetPath).size
},
name: assetName,
data: fs.readFileSync(assetPath),
owner: context.repo.owner,
repo: context.repo.repo,
release_id: releaseId
})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Tar.gz Asset (glibc new)
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false
uses: actions/github-script@v6
with:
script: |
const fs = require("fs")

const releaseId = "${{ needs.create-release.outputs.release_id }}"
const assetName = "dev-pod-${{needs.create-release.outputs.package_version}}.tar.gz"
const assetName = "dev-pod-glibc-new-${{needs.create-release.outputs.package_version}}.tar.gz"
const assetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/${assetName}`

console.log("Attempting to upload release asset: ", assetName)
Expand Down
26 changes: 16 additions & 10 deletions docs/pages/getting-started/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,22 @@ For previous releases, please take a look at the [Github releases page](https://
:::

:::info Linux Packages
**The official package is the Appimage**, it has been tested working on:

- Debian 12 and newer
- Ubuntu 22.04 and newer
- Fedora 32 and newer
- Centos 9stream and newer
- RHEL/Alma Linux/Rocky Linux 9 and newer
- Opensuse Leap 15.3 and newer
- Opensuse Tumbleweed
- Archlinux
**The official package is the Appimage**, there are two versions:

- Old glibc
- Debian 11 and older
- Ubuntu 20.04 and older
- Fedora 30 and older
- Centos 9stream and newer
- RHEL/Alma Linux/Rocky Linux 9 and newer

- New glibc
- Debian 12 and newer
- Ubuntu 22.04 and newer
- Fedora 32 and newer
- Opensuse Leap 15.3 and newer
- Opensuse Tumbleweed
- Archlinux

Make sure you have the following dependencies installed for the Appimage to work (usually already installed in desktop distributions):

Expand Down
Loading