Skip to content

Commit

Permalink
refactor: migrate to tauri v2 (#62)
Browse files Browse the repository at this point in the history
* refactor: running pnpm tauri migrate ♻️📌

* refactor: migrating plugins & resolving command imports errors ♻️

* refactor: introduce unwrapResult utility ♻️

* ci: add cargo dev debug env 👷

* fix: bug in path to  dahsboard layout

* refactor: return toast messages from backend ♻️

* refactor: invalidate table rows upon contents changed event ♻️

* chore(deps): update prettier-plugin-tailwindcss to 0.6.1 ⬆️

* refactor: moving files & extracting components ♻️

* chore: remove unused ts-expect-error 🚨

* ci: update package installation in test tauri ubuntu 💚

* revert: downgrade webkit2gtk version for ubuntu ci 👷

* ci: fix glib lib 💚

* ci: use latest version of ubuntu 👷

* ci: update release workflow 💚
  • Loading branch information
kareemmahlees authored May 31, 2024
1 parent 0a6ff6d commit 242c8d1
Show file tree
Hide file tree
Showing 53 changed files with 3,163 additions and 1,534 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- master
workflow_dispatch:

env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.

jobs:
commitlint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,7 +60,7 @@ jobs:
- name: Run Prettier
run: pnpm format:check
clippy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -69,10 +73,7 @@ jobs:
- name: Install tauri specific dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
- name: Setup Node & PNPM
uses: ./.github/actions/setup-node-pnpm
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -82,4 +83,4 @@ jobs:
uses: swatinem/rust-cache@v2

- name: Run Clippy
run: pnpm rust:lint
run: cargo clippy
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
include:
- platform: "macos-latest" # for Arm based macs (M1 and above).
args: "--target aarch64-apple-darwin"
- platform: "macos-latest" # for Intel based macs.
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04"
args: ""
- platform: "windows-latest"
args: ""

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -35,13 +43,15 @@ jobs:
path: apps/meta-x

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Rust cache
uses: swatinem/rust-cache@v2
Expand Down Expand Up @@ -79,4 +89,4 @@ jobs:
releaseId: ${{ github.event.release.id || github.event.inputs.release-id }}
projectPath: ./apps/core
tauriScript: pnpm tauri
args: --config src-tauri/tauri.conf.sidecar.json --features metax
args: --config src-tauri/tauri.conf.sidecar.json --features metax ${{ matrix.args }}
20 changes: 17 additions & 3 deletions .github/workflows/test-tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,24 @@ on:
- "package.json"
workflow_dispatch:

env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.

jobs:
test-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
include:
- platform: "macos-latest" # for Arm based macs (M1 and above).
args: "--target aarch64-apple-darwin"
- platform: "macos-latest" # for Intel based macs.
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04"
args: ""
- platform: "windows-latest"
args: ""

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -37,13 +49,15 @@ jobs:
.github/actions
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Rust cache
uses: swatinem/rust-cache@v2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ next-env.d.ts
*.db
/**/target
**/bin/
**/dist
**/dist
gen
Loading

0 comments on commit 242c8d1

Please sign in to comment.