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

chore: [DNM] tauri v2 upgrade #1100

Merged
merged 50 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b4c09bb
split out tauri commands for readability
shanimal08 Nov 28, 2024
602b081
Merge branch 'main' into chore/split_commands
shanimal08 Nov 28, 2024
e5cc6b4
merge: resolve conflicts
shanimal08 Nov 28, 2024
c2824ce
merge: conflicts
shanimal08 Nov 29, 2024
4c71ee8
[rebase] upgrade to Tauri V2
shanimal08 Nov 29, 2024
88e8bdb
fix: npm and windows deps | ci: rm sentry token for beta builds
shanimal08 Nov 29, 2024
17bf24e
wip: fix mining
shanimal08 Nov 29, 2024
348ccb7
fix: add back miner_metrics emit after rebase
shanimal08 Nov 29, 2024
6c110bd
ci: revert sentry secret check
shanimal08 Nov 29, 2024
932297e
wip: clean up systray | (un)minimize actions
shanimal08 Nov 29, 2024
c16b75c
fix: windows import | cleaned up interval | cleaned up passed appHand…
shanimal08 Nov 29, 2024
39174b9
fix: shell permissions
shanimal08 Nov 29, 2024
7ff00fd
fix: rm unnecessary process permission
shanimal08 Nov 29, 2024
9932fb2
cleanups: rm dupe init | reorder screens
shanimal08 Dec 2, 2024
7a13260
merge: resolve conflicts
shanimal08 Dec 2, 2024
d4467ae
wip: windows build
shanimal08 Dec 2, 2024
e4d85e7
move structs
shanimal08 Dec 2, 2024
f837479
merge: resolve conflicts
shanimal08 Dec 2, 2024
561ba2e
merge: resolve conflicts
shanimal08 Dec 2, 2024
bd5ec7b
fixes after merge
shanimal08 Dec 2, 2024
e14c458
merge: conflicts
shanimal08 Dec 2, 2024
b323dfd
update shutdown + fix import
shanimal08 Dec 2, 2024
27756b9
remove borked version str
shanimal08 Dec 2, 2024
559e321
fix again
shanimal08 Dec 2, 2024
567c9f2
fix reference windows
shanimal08 Dec 2, 2024
220524d
merge main
shanimal08 Dec 3, 2024
9abf30b
fix: webview ref | restart after seedwords | more safeguards on tx hi…
shanimal08 Dec 3, 2024
134929f
fix: clippy
shanimal08 Dec 3, 2024
7977c36
merge main
shanimal08 Dec 3, 2024
03b27c4
review: changes requested
shanimal08 Dec 3, 2024
e08de5f
Merge branch 'main' into build-chore-upgrade-tauri-v2
shanimal08 Dec 3, 2024
217c2c6
check: remove features arr from cargo toml
shanimal08 Dec 3, 2024
18f10ad
wip: fix sentry init
shanimal08 Dec 4, 2024
f3fa2dc
fix: dedupe sentry x plugin
shanimal08 Dec 4, 2024
fc33480
include openssl as dependencies
Misieq01 Nov 21, 2024
00b3908
fix: autoupdate on V2 (#1188)
shanimal08 Dec 5, 2024
da33a79
merge: resolve conflicts
shanimal08 Dec 5, 2024
b36da74
fixes after merge
shanimal08 Dec 5, 2024
3588ae0
fix wallet creation crash
Misieq01 Dec 5, 2024
1759140
Fix longer shutdowns
Misieq01 Dec 5, 2024
69749bb
remove unnecessary thread spawn
Misieq01 Dec 5, 2024
2f8011d
remove log
Misieq01 Dec 5, 2024
00d55e4
fix gpu_detection and gpu_status generation
Misieq01 Dec 5, 2024
40f6af9
cargo fmt
Misieq01 Dec 5, 2024
b54eeb9
fix: v2 issues (#1191)
brianp Dec 5, 2024
6ea58b8
merge: resolve conflicts
shanimal08 Dec 5, 2024
fdec942
merge: resolve conflicts again
shanimal08 Dec 5, 2024
38c8808
fix pubkey
shanimal08 Dec 5, 2024
f5a0827
Merge branch 'main' into build-chore-upgrade-tauri-v2
shanimal08 Dec 5, 2024
c963cc9
Merge branch 'main' into build-chore-upgrade-tauri-v2
brianp Dec 5, 2024
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
195 changes: 47 additions & 148 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: CI
workflow_dispatch:
push:
branches:
- "ci-*"
- 'ci-*'
pull_request:
types:
- opened
Expand All @@ -21,37 +21,35 @@ concurrency:
permissions: {}

jobs:
clippy:
name: clippy
runs-on: [ ubuntu-latest ]
cargo-checks:
name: cargo checks (fmt, clippy, check)
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: created empty dist dir
- uses: actions/checkout@v4
- name: create empty dist dir
run: |
mkdir dist

- name: install dependencies (linux)
if: startsWith(runner.os,'Linux')
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --assume-yes \
libwebkit2gtk-4.0-dev \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libprotobuf-dev \
protobuf-compiler

- name: toolchain
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (linux/OpenCL)
run: |
sudo apt-get install --no-install-recommends --assume-yes \
opencl-headers \
ocl-icd-opencl-dev

- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: cache cargo files and outputs
if: ${{ ( startsWith(runner.environment,'github-hosted') ) && ( ! startsWith(github.ref, 'refs/tags/v') ) }}
uses: swatinem/rust-cache@v2
- uses: swatinem/[email protected]
with:
workspaces: './src-tauri -> target'

Expand All @@ -60,7 +58,7 @@ jobs:
run: |
cargo fmt --all -- --check

- name: clippy check (with lints)
- name: clippy lint
working-directory: ./src-tauri
env:
AIRDROP_BASE_URL: http://localhost:4000
Expand All @@ -69,22 +67,18 @@ jobs:
run: |
cargo install cargo-lints
cargo lints clippy --all-targets --all-features
- name: cargo check
working-directory: ./src-tauri
run: |
cargo check --release --all-targets --workspace

machete:
name: machete
runs-on: [ ubuntu-latest ]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: cache cargo files and outputs
if: ${{ ( startsWith(runner.environment,'github-hosted') ) && ( ! startsWith(github.ref, 'refs/tags/v') ) }}
uses: swatinem/rust-cache@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/[email protected]
with:
workspaces: './src-tauri -> target'

Expand All @@ -94,46 +88,50 @@ jobs:
cargo install cargo-machete
cargo machete

cargo-check:
name: cargo-check
runs-on: [ ubuntu-latest ]
tauri-test-build:
name: tauri-build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- uses: actions/checkout@v4
- name: install dependencies (linux)
if: startsWith(runner.os,'Linux')
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --assume-yes \
libwebkit2gtk-4.0-dev \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libprotobuf-dev \
protobuf-compiler

- name: toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: install dependencies (linux/OpenCL)
run: |
sudo apt-get install --no-install-recommends --assume-yes \
opencl-headers \
ocl-icd-opencl-dev

- name: cache cargo files and outputs
if: ${{ ( startsWith(runner.environment,'github-hosted') ) && ( ! startsWith(github.ref, 'refs/tags/v') ) }}
uses: swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
- name: Install dependencies (node)
run: npm ci
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/[email protected]
with:
workspaces: './src-tauri -> target'

- name: cargo check
- name: cargo tauri build
working-directory: ./src-tauri
run: |
cargo check --release --all-targets --workspace --locked
cargo install tauri-cli --version "^2" --locked
cargo tauri --version
cargo tauri build --ci --bundles deb

file-licenses:
# disable for now
if: ${{ false }}
name: file-licenses
runs-on: [ ubuntu-latest ]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -145,102 +143,3 @@ jobs:
rg --version || exit 1
- name: run the license check
run: ./scripts/file_license_check.sh

i18n-checks:
name: i18n-checks
runs-on: [ ubuntu-latest ]
steps:
- name: checkout
uses: actions/checkout@v4

- name: install jsonlint
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --assume-yes \
python3-demjson

- name: basic jsonlint
run: |
find public -iname '*.json' -print0 | \
xargs -0 -n1 jsonlint -v

- name: setup folder for logs
run: |
mkdir -p ${{ runner.temp }}/i18n_logs

- name: i18n compare
continue-on-error: true
working-directory: ./public/locales
run: |
python3 ../../scripts/i18n_checker.py \
compare --en-locale-path en \
--base-path . \
--search-path .. \
--output-dir ${{ runner.temp }}/i18n_logs

- name: i18n unused
continue-on-error: true
working-directory: ./public/locales
run: |
python3 ../../scripts/i18n_checker.py \
unused --en-locale-path en \
--base-path . \
--search-path .. \
--output-dir ${{ runner.temp }}/i18n_logs

- name: Artifact upload for i18n checks
uses: actions/upload-artifact@v4
with:
name: i18n-logs
path: ${{ runner.temp }}/i18n_logs

tauri-build:
name: tauri-build
runs-on: [ ubuntu-latest ]
steps:
- name: checkout
uses: actions/checkout@v4

- name: install dependencies (linux)
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --assume-yes \
libwebkit2gtk-4.0-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libprotobuf-dev \
protobuf-compiler

- name: install dependencies (linux/OpenCL)
run: |
sudo apt-get install --no-install-recommends --assume-yes \
opencl-headers \
ocl-icd-opencl-dev

- name: Node.js setup
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'

- name: Install dependencies (node)
run: |
npm --version
npm install

- name: toolchain
uses: dtolnay/rust-toolchain@stable

- name: cache cargo files and outputs
if: ${{ ( startsWith(runner.environment,'github-hosted') ) && ( ! startsWith(github.ref, 'refs/tags/v') ) }}
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: cargo tauri build
working-directory: ./src-tauri
run: |
cargo install tauri-cli --version "1.6.4"
cargo tauri --version
cargo tauri build --ci --bundles deb
32 changes: 15 additions & 17 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name: Lint
on: pull_request

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install Node.js dependencies
run: npm ci
- name: check lint/prettier errors
run: npm run lint
- name: check taplo
run: npm run lint:taplo
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: lts/*
- name: Install Node.js dependencies
run: npm ci
- name: check lint/prettier errors
run: npm run lint
- name: check taplo
run: npm run lint:taplo
83 changes: 83 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: PR
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}

permissions: {}

jobs:
check-signed-commits:
name: Check signed commits
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: 1Password/check-signed-commits-action@v1
check-title:
name: Check title
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
npm install -g @commitlint/cli @commitlint/config-conventional
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
- name: Lint Title
env:
PR_TITLE: ${{github.event.pull_request.title}}
run: |
echo "$PR_TITLE" | commitlint
check-i18n:
name: Check i18n
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install jsonlint
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --assume-yes \
python3-demjson

- name: Basic jsonlint
run: |
find public -iname '*.json' -print0 | \
xargs -0 -n1 jsonlint -v

- name: setup folder for logs
run: |
mkdir -p ${{ runner.temp }}/i18n_logs

- name: i18n compare
continue-on-error: true
working-directory: ./public/locales
run: |
python3 ../../scripts/i18n_checker.py \
compare --en-locale-path en \
--base-path . \
--search-path .. \
--output-dir ${{ runner.temp }}/i18n_logs

- name: i18n unused
continue-on-error: true
working-directory: ./public/locales
run: |
python3 ../../scripts/i18n_checker.py \
unused --en-locale-path en \
--base-path . \
--search-path .. \
--output-dir ${{ runner.temp }}/i18n_logs

- name: Artifact upload for i18n checks
uses: actions/upload-artifact@v4
with:
name: i18n-logs
path: ${{ runner.temp }}/i18n_logs
Loading
Loading