Skip to content

Commit

Permalink
Tauri 2.0
Browse files Browse the repository at this point in the history
This is a half-working copy of Museeks ported to Tauri 2.0.

This is highly experimental, many things are broken.

```bash
yarn
cargo test --manifest-path src-tauri/Cargo.toml
yarn tauri dev
```

![Screenshot 2024-02-25 at 22 47 30](https://github.com/martpie/museeks/assets/1311607/cd4481dd-c021-4881-becb-5c321848927b)

ghstack-source-id: 7c4b17e4659c35c8aa0fbddc277fd22e7ca4b846
Pull Request resolved: #745
  • Loading branch information
martpie committed Mar 1, 2024
1 parent 2772031 commit d066988
Show file tree
Hide file tree
Showing 260 changed files with 11,171 additions and 7,738 deletions.
1 change: 0 additions & 1 deletion .eslintignore
@@ -1,4 +1,3 @@
node_modules
dist
.vscode
build
3 changes: 3 additions & 0 deletions .eslintrc.js → .eslintrc.cjs
@@ -1,5 +1,8 @@
/* eslint-env node */
module.exports = {
env: {
node: true,
},
root: true,
extends: [
'eslint:recommended',
Expand Down
161 changes: 36 additions & 125 deletions .github/workflows/build.yml
Expand Up @@ -21,27 +21,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 20

- name: Display Node.js and npm informations
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Generate types
run: cargo test --manifest-path src/tauri

- name: 'Test: formatting'
run: 'yarn run test:formatting'

- name: 'Test: typings'
run: 'yarn run test:typings'

- name: 'Test: TS/JS linting'
run: 'yarn run test:lint'

Expand All @@ -51,138 +48,52 @@ jobs:
- name: 'Test: unit'
run: 'yarn run test:unit'

- name: 'Test: typings'
run: 'yarn run test:typings'

- name: Build application
run: yarn run build

- uses: actions/upload-artifact@v3
with:
name: application-build
path: dist/
# - uses: actions/upload-artifact@v4
# with:
# name: application-build
# path: dist/

# Documentation on environments:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners

binaries-linux:
runs-on: ubuntu-latest
needs: [qa]

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Display Node.js and npm informations
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- uses: actions/download-artifact@v3
with:
name: application-build
path: dist/

- name: Install Linux dependencies
run: |
sudo apt update
sudo apt install --no-install-recommends -y libopenjp2-tools rpm gcc-multilib g++-multilib
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Package Linux binaries
# - name: Package Linux/Windows binaries
run: yarn run package:l
# run: yarn run package:lw
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v3
with:
name: binaries-linux
path: |
build/museeks-linux-i386.deb
build/museeks-linux-amd64.deb
build/museeks-linux-i386.AppImage
build/museeks-linux-x86_64.AppImage
build/museeks-linux-i686.rpm
build/museeks-linux-x86_64.rpm
build/museeks-linux-x64.tar.gz
binaries-macos:
runs-on: macos-latest
needs: [qa]
binaries:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Display Node.js and npm informations
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
node-version: 20

- uses: actions/download-artifact@v3
with:
name: application-build
path: dist/

- name: Install production dependencies
run: yarn install --frozen-lockfile

- name: Package macOS binaries
run: yarn run package:m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- uses: actions/upload-artifact@v3
with:
name: binaries-macos
path: |
build/museeks-macos-arm64.dmg
build/museeks-macos-x64.dmg
binaries-windows:
runs-on: windows-latest
needs: [qa]

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Display Node.js and npm informations
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
- uses: actions/download-artifact@v3
with:
name: application-build
path: dist/
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install dependencies
- name: install frontend dependencies
run: yarn install --frozen-lockfile

- name: Package Windows binaries
run: yarn run package:w
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v3
with:
name: binaries-windows
path: |
build/museeks-win-x64-setup.exe
build/museeks-win-x64-portable.exe
includeRelease: false
includeUpdaterJson: false
77 changes: 19 additions & 58 deletions .gitignore
Expand Up @@ -4,65 +4,26 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock
node_modules
dist
dist-ssr
*.local

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

dist/main/*
dist/renderer/*
dist/preload/*
cache/
build/
.vscode
# Editor directories and files
.vscode/*
!.vscode/extensions.json

.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Generated files
src/generated/typings/*
!src/generated/typings/index.ts
src-tauri/gen
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Expand Up @@ -4,6 +4,7 @@
"csstools.postcss",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint",
"ZixuanChen.vitest-explorer"
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer"
]
}
68 changes: 0 additions & 68 deletions electron-builder.yml

This file was deleted.

0 comments on commit d066988

Please sign in to comment.