Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit ef1f977
Author: 0o-de-lally <>
Date:   Wed Nov 22 14:30:54 2023 -0500

    caching

commit da802e6
Author: 0o-de-lally <>
Date:   Wed Nov 22 14:05:32 2023 -0500

    try again

commit 280fa62
Author: 0o-de-lally <>
Date:   Wed Nov 22 13:36:09 2023 -0500

    try tauri publish with env

commit 2a7d944
Author: 0o-de-lally <>
Date:   Wed Nov 22 13:13:05 2023 -0500

    try fix envvar

commit b8f7b95
Author: 0o-de-lally <>
Date:   Wed Nov 22 12:50:42 2023 -0500

    set env

commit 42b473d
Author: 0o-de-lally <>
Date:   Wed Nov 22 12:39:03 2023 -0500

    debug

commit b7149dc
Author: 0o-de-lally <>
Date:   Wed Nov 22 12:30:55 2023 -0500

    try llvm on m1

commit f762707
Author: 0o-de-lally <>
Date:   Wed Nov 22 12:14:46 2023 -0500

    try setting library path

commit 25e16a1
Author: 0o-de-lally <>
Date:   Wed Nov 22 11:58:31 2023 -0500

    patch runner name

commit f5b55ad
Author: 0o-de-lally <>
Date:   Wed Nov 22 11:56:56 2023 -0500

    update conf.json

commit 4d416f1
Author: 0o-de-lally <>
Date:   Wed Nov 22 11:22:11 2023 -0500

    testing m1 build

commit 52b7fbb
Author: 0o-de-lally <>
Date:   Wed Nov 22 10:38:51 2023 -0500

     create universal profile

commit dd492ea
Author: 0o-de-lally <>
Date:   Sun Nov 19 22:49:21 2023 -0500

    try universal build target

commit 149d1a3
Author: 0o-de-lally <>
Date:   Sun Nov 19 22:46:17 2023 -0500

    try setting release

commit 6934488
Author: 0o-de-lally <>
Date:   Sun Nov 19 22:42:51 2023 -0500

    update framework paths in tauri

commit 029568c
Author: 0o-de-lally <[email protected]>
Date:   Sun Nov 19 15:37:39 2023 -0500

    remove vendor dylib files from root

commit 82721d1
Author: 0o-de-lally <[email protected]>
Date:   Sun Nov 19 14:38:33 2023 -0500

    test use brew gmp

commit 8b32706
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:15:31 2023 -0500

    try running brew gmp first

commit 356b6f4
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:14:28 2023 -0500

    bump version

commit e96bd9d
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:14:02 2023 -0500

    try build on Mac M1 github runner

commit 6ec5699
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:11:35 2023 -0500

    bump version

commit 289f999
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:10:17 2023 -0500

    bump version

commit c280e5a
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:09:48 2023 -0500

    add M1 built libgmp

commit 382ad2a
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:09:33 2023 -0500

    bump version

commit 24ebe8c
Author: 0o-de-lally <[email protected]>
Date:   Thu Nov 16 22:09:14 2023 -0500

    build all canary branches
  • Loading branch information
0o-de-lally committed Nov 22, 2023
1 parent 8234a97 commit e2d3046
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 51 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/release-aarch64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: carpe-release-aarch64

on:
push:
branches:
- '*aarch64*'

env:
LDFLAGS: '/opt/homebrew/lib'
LD_LIBRARY_PATH: '/opt/homebrew/lib'
jobs:
publish:
strategy:
fail-fast: false
matrix:
os: [ macos-latest-xlarge ]
name: build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
### DO NOT REMOVE: uncomment if you need to debug runner ###
- name: setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true

# Setup Rust
- uses: dtolnay/[email protected]
with:
components: rustfmt

# Setup Node.js
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
# checkout
- name: checkout source
uses: actions/checkout@v3


######## MAC ########
- name: osx deps
run: |
brew update
brew reinstall llvm
brew reinstall gmp
- uses: Swatinem/rust-cache@v2
with:
workspaces: ./src-tauri
shared-key: ${{ matrix.os }}
cache-all-crates: true
cache-on-failure: true

######## BUILD ########

- name: yarn installation
run: yarn install


- name: pre-build rust
working-directory: ./src-tauri
run: export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix)/lib && cargo b --release

- name: Build Tauri
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{secrets.TAURI_PRIVATE_KEY}}
TAURI_KEY_PASSWORD: ${{secrets.TAURI_KEY_PASSWORD}}
LIBRARY_PATH: /opt/homebrew/lib
with:
args: ${{contains(github.ref, 'canary') && '--config src-tauri/tauri.conf.aarch64.json --features carpe-canary' || '--config src-tauri/tauri.conf.aarch64.json' }} #pass the rust feature flags for canary if the tag includes "canary"
tagName: ${{contains(github.ref, 'canary') && 'v__VERSION__-canary' || 'v__VERSION__' }} # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: ${{contains(github.ref, 'canary') && 'v__VERSION__-aarch64-canary' || 'v__VERSION__-aarch64' }}
releaseBody: '[draft]'
releaseDraft: true
prerelease: false
56 changes: 24 additions & 32 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
- '[0-9]+.[0-9]+.[0-9]+-canary.[0-9]+'

branches:
- 'canary'
- 'canary*'
- 'ci'
jobs:
publish:
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-11]
os: [ macos-11 ]
name: build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -27,13 +27,6 @@ jobs:

# Setup Rust
- uses: dtolnay/[email protected]
if: matrix.os == 'macos-11'
with:
targets: aarch64-apple-darwin
components: rustfmt

- uses: dtolnay/[email protected]
if: matrix.os == 'windows-latest'
with:
components: rustfmt

Expand All @@ -47,41 +40,40 @@ jobs:
uses: actions/checkout@v3

######## UBUNTU ########
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: build-essential lld pkg-config libclang-dev libwebkit2gtk-4.0-dev libglib2.0-* libssl-dev libgtk-3-dev libappindicator3-dev patchelf librsvg2-dev libvips-dev libgmp-dev
version: 1.0
# - name: install dependencies (ubuntu only)
# if: matrix.os == 'ubuntu-latest'
# uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# packages: build-essential lld pkg-config libclang-dev libwebkit2gtk-4.0-dev libglib2.0-* libssl-dev libgtk-3-dev libappindicator3-dev patchelf librsvg2-dev libvips-dev libgmp-dev
# version: 1.0

######## MAC ########

- name: install gmp
if: matrix.os == 'macos-11'
run: |
brew reinstall gmp
brew --prefix
######## WIN ########

- name: install dependencies (windows only)
if: matrix.os == 'windows-latest'
uses: KyleMayes/install-llvm-action@v1
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
# - name: install dependencies (windows only)
# if: matrix.os == 'windows-latest'
# uses: KyleMayes/install-llvm-action@v1
# with:
# version: "11.0"
# directory: ${{ runner.temp }}/llvm

- name: Set LIBCLANG_PATH
if: matrix.os == 'windows-latest'
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
# - name: Set LIBCLANG_PATH
# if: matrix.os == 'windows-latest'
# run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV


# Package the windows dependencies
- name: copy gmp.dll for build
if: matrix.os == 'windows-latest'
run: |
$var = (get-item $(rustup which rustc)).Directory.Parent.FullName+ '\lib\rustlib\' + (rustc -vV | findstr "host:*").split(':')[1].Trim() + '\lib'
Copy-Item ('${{ github.workspace }}' + '\redist' + '\x86_64\*') -Destination $var -Recurse
# # Package the windows dependencies
# - name: copy gmp.dll for build
# if: matrix.os == 'windows-latest'
# run: |
# $var = (get-item $(rustup which rustc)).Directory.Parent.FullName+ '\lib\rustlib\' + (rustc -vV | findstr "host:*").split(':')[1].Trim() + '\lib'
# Copy-Item ('${{ github.workspace }}' + '\redist' + '\x86_64\*') -Destination $var -Recurse

######## CACHE ########

Expand All @@ -107,7 +99,7 @@ jobs:
TAURI_PRIVATE_KEY: ${{secrets.TAURI_PRIVATE_KEY}}
TAURI_KEY_PASSWORD: ${{secrets.TAURI_KEY_PASSWORD}}
with:
args: ${{contains(github.ref, 'canary') && '--config src-tauri/tauri.conf.canary.json --features carpe-canary --target universal-apple-darwin' || '' }} #pass the rust feature flags for canary if the tag includes "canary"
args: ${{contains(github.ref, 'canary') && '--config src-tauri/tauri.conf.canary.json --features carpe-canary' || '' }} #pass the rust feature flags for canary if the tag includes "canary"
tagName: ${{contains(github.ref, 'canary') && 'v__VERSION__-canary' || 'v__VERSION__' }} # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: ${{contains(github.ref, 'canary') && 'v__VERSION__-canary' || 'v__VERSION__' }}
releaseBody: '[draft]'
Expand Down
1 change: 0 additions & 1 deletion dist/assets/index-699678fd.css

This file was deleted.

2 changes: 0 additions & 2 deletions dist/assets/index-cf00d38c.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/assets/index-cf00d38c.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="module" crossorigin src="/assets/index-cf00d38c.js"></script>
<link rel="stylesheet" href="/assets/index-699678fd.css">
<script type="module" crossorigin src="/assets/index-48a2a9b5.js"></script>
<link rel="stylesheet" href="/assets/index-0968cf85.css">
</head>
<body>

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev:canary": "tauri dev --config src-tauri/tauri.conf.canary.json --features carpe-canary",
"dev:web": "vite",
"build": "tauri build",
"build:universal": "tauri build --target universal-apple-darwin --cfg tokio_unstable",
"build:universal": "tauri build --target universal-apple-darwin",
"build:aarch64": "RUSTFLAGS='--cfg tokio_unstable' tauri build --target aarch64-apple-darwin",
"build:canary": "tauri build --config src-tauri/tauri.conf.canary.json --features carpe-canary",
"build:web": "vite build",
"lint": "svelte-check --tsconfig ./tsconfig.json && eslint src && prettier --check src",
Expand Down
18 changes: 6 additions & 12 deletions src-tauri/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,9 @@ rustflags = [
"target-feature=+sse4.2",
]

# # 64 bit MSVC
# [target.x86_64-pc-windows-msvc]
# rustflags = [
# "--cfg",
# "tokio_unstable",
# "-C",
# "force-frame-pointers=yes",
# "-C",
# "force-unwind-tables=yes",
# "-C",
# "link-arg=/STACK:8000000" # Set stack to 8 MB
# ]
# apple
[target.aarch64-apple-darwin]
rustflags = [
"--cfg",
"tokio_unstable"
]
85 changes: 85 additions & 0 deletions src-tauri/tauri.conf.aarch64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"package": {
"productName": "carpe",
"version": "1.0.0-8"
},
"build": {
"distDir": "../dist",
"devPath": "http://localhost:3000",
"beforeDevCommand": "yarn dev:web",
"beforeBuildCommand": "yarn build:web"
},
"tauri": {
"updater": {
"active": true,
"endpoints": [
"https://raw.githubusercontent.com/0LNetworkCommunity/carpe/main/autoupdater/autoupdater_payload.json"
],
"dialog": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQ4MEIzMzc4MzlGMzgwNUUKUldSZWdQTTVlRE1MMkszSGczY1B2OGlOaW5IWXBLdXpZWldKbVl2VGw1RDg0dFNPTHFpYk1WNGkK"
},
"bundle": {
"active": true,
"targets": "all",
"identifier": "com.tauri.Carpe",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"resources": [
"gmp.dll",
"gmp.lib",
"libgmp-10.dll"
],
"externalBin": [],
"copyright": "",
"category": "DeveloperTool",
"shortDescription": "",
"longDescription": "",
"deb": {
"depends": []
},
"macOS": {
"frameworks": [
"/opt/homebrew/Cellar/gmp/6.3.0/lib/libgmp.10.dylib",
"/opt/homebrew/Cellar/gmp/6.3.0/lib/libgmp.dylib",
"/opt/homebrew/Cellar/gmp/6.3.0/lib/libgmpxx.4.dylib",
"/opt/homebrew/Cellar/gmp/6.3.0/lib/libgmpxx.dylib"
],
"minimumSystemVersion": "",
"exceptionDomain": "localhost",
"signingIdentity": null,
"entitlements": null
},
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": "",
"webviewInstallMode": {
"type": "embedBootstrapper"
}
}
},
"allowlist": {
"all": true,
"fs": {
"all": true
}
},
"windows": [
{
"title": "CARPE",
"width": 1000,
"height": 800,
"resizable": true,
"fullscreen": false
}
],
"security": {
"csp": "default-src 'self' blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'"
}
}
}

0 comments on commit e2d3046

Please sign in to comment.