Skip to content

Commit e3aa81e

Browse files
WIP
1 parent 53aeb28 commit e3aa81e

2 files changed

Lines changed: 96 additions & 20 deletions

File tree

.github/workflows/build-mac-bundle.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,16 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919

20-
- name: Setup Node
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version-file: .nvmrc
24-
cache: npm
25-
cache-dependency-path: |
26-
package-lock.json
27-
frontend/package-lock.json
28-
29-
- name: Install Rust via rustup
30-
uses: actions-rs/toolchain@v1
20+
- name: Setup Rust
21+
uses: actions-rust-lang/setup-rust-toolchain@v1
3122
with:
3223
toolchain: stable
33-
profile: minimal
3424
override: true
3525

3626
- name: Add wasm target
3727
run: rustup target add wasm32-unknown-unknown
3828

39-
- name: Cache cargo
29+
- name: Cache Cargo
4030
uses: actions/cache@v4
4131
with:
4232
path: |
@@ -45,7 +35,16 @@ jobs:
4535
target
4636
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
4737

48-
- name: Install Homebrew dependencies
38+
- name: Setup Node
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version-file: .nvmrc
42+
cache: npm
43+
cache-dependency-path: |
44+
package-lock.json
45+
frontend/package-lock.json
46+
47+
- name: Install Native Dependencies
4948
run: |
5049
brew update
5150
brew install \
@@ -59,17 +58,17 @@ jobs:
5958
echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> $GITHUB_ENV
6059
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
6160
62-
- name: Install Rust CLI tools (prebuilt via cargo-binstall)
61+
- name: Install CLI Tools via Cargo Binstall
6362
run: |
64-
cargo binstall --no-confirm wasm-pack
65-
cargo binstall --no-confirm cargo-about
66-
cargo binstall --no-confirm "wasm-bindgen-cli@${WASM_BINDGEN_CLI_VERSION}"
63+
cargo binstall --no-confirm --force wasm-pack
64+
cargo binstall --no-confirm --force cargo-about
65+
cargo binstall --no-confirm --force "wasm-bindgen-cli@${WASM_BINDGEN_CLI_VERSION}"
6766
68-
- name: Build desktop
67+
- name: Build Mac Bundle
6968
run: |
7069
npm run build-desktop
7170
72-
- name: Upload Linux Bundle
71+
- name: Upload Mac Bundle
7372
uses: actions/upload-artifact@v4
7473
with:
7574
name: graphite-mac-bundle
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build Windows Bundle
2+
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
WASM_BINDGEN_CLI_VERSION: "0.2.100"
14+
BINSTALL_DISABLE_TELEMETRY: "true"
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Rust
21+
uses: actions-rust-lang/setup-rust-toolchain@v1
22+
with:
23+
toolchain: stable
24+
override: true
25+
26+
- name: Add wasm target
27+
run: rustup target add wasm32-unknown-unknown
28+
29+
- name: Cache Cargo
30+
uses: actions/cache@v4
31+
with:
32+
path: |
33+
C:\Users\runneradmin\.cargo\registry
34+
C:\Users\runneradmin\.cargo\git
35+
target
36+
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
37+
38+
- name: Setup Node
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version-file: .nvmrc
42+
cache: npm
43+
cache-dependency-path: |
44+
package-lock.json
45+
frontend/package-lock.json
46+
47+
- name: Setup Cargo Binstall
48+
uses: cargo-bins/cargo-binstall@main
49+
50+
- name: Native Dependencies
51+
shell: pwsh
52+
run: |
53+
winget install --id LLVM.LLVM -e --accept-package-agreements --accept-source-agreements
54+
winget install --id Kitware.CMake -e --accept-package-agreements --accept-source-agreements
55+
winget install --id OpenSSL.OpenSSL -e --accept-package-agreements --accept-source-agreements
56+
winget install --id WebAssembly.Binaryen -e --accept-package-agreements --accept-source-agreements
57+
winget install --id GnuWin32.PkgConfig -e --accept-package-agreements --accept-source-agreements
58+
59+
"OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" | Out-File -FilePath $env:GITHUB_ENV -Append
60+
"PKG_CONFIG_PATH=C:\Program Files\OpenSSL-Win64\lib\pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
61+
62+
- name: Install CLI Tools via Cargo Binstall
63+
shell: pwsh
64+
run: |
65+
cargo binstall --no-confirm --force wasm-pack
66+
cargo binstall --no-confirm --force cargo-about
67+
cargo binstall --no-confirm --force "wasm-bindgen-cli@$env:WASM_BINDGEN_CLI_VERSION"
68+
69+
- name: Build Windows Bundle
70+
shell: pwsh
71+
run: npm run build-desktop
72+
73+
- name: Upload Windows Bundle
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: graphite-windows-bundle
77+
path: target/release/Graphite

0 commit comments

Comments
 (0)