mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-11-15 07:07:07 +00:00
tauri build test
This commit is contained in:
1 parent
d7ff7d645b
commit
2048076fe6
1 file changed
+122
@@ -0,0 +1,122 @@
|
|||||||
|
name: Desktop beta
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: 'dev'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: desktop-beta-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- platform: macos-latest
|
||||||
|
rust_targets: aarch64-apple-darwin,x86_64-apple-darwin,wasm32-unknown-unknown
|
||||||
|
args: --target universal-apple-darwin
|
||||||
|
bundles: target/universal-apple-darwin/release/bundle/dmg/*.dmg
|
||||||
|
# the oldest supported Ubuntu, so that the AppImage runs on older systems too
|
||||||
|
- platform: ubuntu-22.04
|
||||||
|
rust_targets: wasm32-unknown-unknown
|
||||||
|
args: ''
|
||||||
|
bundles: |
|
||||||
|
target/release/bundle/deb/*.deb
|
||||||
|
target/release/bundle/rpm/*.rpm
|
||||||
|
target/release/bundle/appimage/*.AppImage
|
||||||
|
- platform: windows-latest
|
||||||
|
rust_targets: wasm32-unknown-unknown
|
||||||
|
args: ''
|
||||||
|
bundles: |
|
||||||
|
target/release/bundle/msi/*.msi
|
||||||
|
target/release/bundle/nsis/*.exe
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Install Linux dependencies
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: website/package-lock.json
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.rust_targets }}
|
||||||
|
|
||||||
|
- name: Cache Rust build
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Install wasm-pack
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: wasm-pack
|
||||||
|
|
||||||
|
# the desktop app does not use it, but the website depends on its package
|
||||||
|
- name: Build wasm
|
||||||
|
run: wasm-pack build --target bundler
|
||||||
|
working-directory: wasm
|
||||||
|
|
||||||
|
- name: Install dependencies for website
|
||||||
|
run: npm install --prefix website
|
||||||
|
|
||||||
|
# the key would be readable in the app: it is left empty, so only the MapTiler layer fails
|
||||||
|
- name: Create env file
|
||||||
|
run: echo "PUBLIC_MAPTILER_KEY=" >> website/.env
|
||||||
|
|
||||||
|
- name: Build app
|
||||||
|
run: npx --yes @tauri-apps/cli@2 build ${{ matrix.args }}
|
||||||
|
working-directory: tauri
|
||||||
|
|
||||||
|
# after the build, which gives the app the website it embeds
|
||||||
|
- name: Test engine and app
|
||||||
|
run: cargo test -p gpx-engine -p gpx-studio-desktop
|
||||||
|
|
||||||
|
- name: Upload bundles
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: bundles-${{ matrix.platform }}
|
||||||
|
path: ${{ matrix.bundles }}
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
# replaces the beta release only once every platform is built
|
||||||
|
release:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download bundles
|
||||||
|
uses: actions/download-artifact@v5
|
||||||
|
with:
|
||||||
|
pattern: bundles-*
|
||||||
|
path: bundles
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Publish beta release
|
||||||
|
run: |
|
||||||
|
gh release delete desktop-beta --cleanup-tag --yes || true
|
||||||
|
gh release create desktop-beta bundles/* \
|
||||||
|
--prerelease \
|
||||||
|
--target ${{ github.sha }} \
|
||||||
|
--title "Desktop beta" \
|
||||||
|
--notes "Beta of the desktop app, built from ${{ github.sha }} on the dev branch. The builds are not signed yet: macOS and Windows will warn before opening them."
|
||||||
Reference in new issue
Block a user