Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
61 changes: 24 additions & 37 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,11 @@ jobs:
with:
components: rustfmt, clippy

- name: Cache Cargo dependencies
uses: actions/cache@v4
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
shared-key: rust-build
cache-on-failure: true

- name: Check Rust formatting
run: cargo fmt --all -- --check
Expand All @@ -70,22 +63,19 @@ jobs:
with:
targets: wasm32-unknown-unknown

- name: Cache Cargo dependencies
uses: actions/cache@v4
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-wasm-
${{ runner.os }}-cargo-
workspaces: |
. -> target
arrow-db-wasm -> target
shared-key: wasm-build
cache-on-failure: true

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
uses: jetli/[email protected]
with:
version: "latest"

- name: Build WASM (release mode)
run: wasm-pack build ./arrow-db-wasm --target web --out-dir ../arrow-db-browser/arrow-db-wasm
Expand Down Expand Up @@ -142,22 +132,19 @@ jobs:
with:
targets: wasm32-unknown-unknown

- name: Cache Cargo dependencies
uses: actions/cache@v4
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-wasm-
${{ runner.os }}-cargo-
workspaces: |
. -> target
arrow-db-wasm -> target
shared-key: wasm-build
cache-on-failure: true

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
uses: jetli/[email protected]
with:
version: "latest"

- name: Build WASM (release mode)
run: wasm-pack build ./arrow-db-wasm --target web --out-dir ../arrow-db-browser/arrow-db-wasm
Expand Down
12 changes: 12 additions & 0 deletions arrow-db-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@ wasm-bindgen-test = "0.3.43"
debug-js-glue = true
demangle-name-section = true
dwarf-debug-info = false

[profile.release]
# Optimize for speed of compilation rather than runtime performance in CI
# This significantly reduces build times
opt-level = 2 # Use O2 instead of O3 (faster compilation)
lto = "thin" # Use thin LTO instead of full LTO (much faster)
codegen-units = 16 # More codegen units = faster parallel compilation

[profile.release.package."*"]
# For dependencies, optimize for speed (they don't change often and are cached)
opt-level = 3
codegen-units = 1
Loading