Skip to content

Commit

Permalink
Updated Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx authored and Max Klinger committed Feb 13, 2024
1 parent 9da1a17 commit 0dd26a1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ on:
tags: [ '*' ]

workflow_dispatch:
inputs:
build:
description: 'Build WebAssembly binding files.'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Install wasm-pack'
run: |
Expand All @@ -25,12 +22,14 @@ jobs:
- name: 'Build WebAssembly'
run: |
rustup target add wasm32-unknown-unknown
pushd ./crates/lib
wasm-pack build --release --target web --out-name index
popd
mkdir -p artifacts
find pkg -type f \( -name "*.js" -o -name "*.d.ts" -o -name "*.wasm" \) -exec cp {} artifacts \;
find crates/lib/pkg -type f \( -name "*.js" -o -name "*.d.ts" -o -name "*.wasm" \) -exec cp {} artifacts \;
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'wasm'
path: artifacts/*
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
rustup component add clippy
cargo clippy --features=macro -- -D warnings
boostrap:
bootstrap:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
13 changes: 0 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,3 @@ codegen-units = 1
panic = 'abort'
strip = true

[package]
name = 'grass-wasm'
edition = "2021"
version = "0.1.0"

[lib]
path = "crates/lib/src/lib.rs"
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "0.2"
grass_compiler = { path = "crates/compiler" }
getrandom = { version = "0.2", features = ["js"] }
5 changes: 4 additions & 1 deletion crates/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@ required-features = ["commandline"]
[lib]
name = "grass"
path = "src/lib.rs"
# crate-type = ["cdylib", "rlib"]
crate-type = ["cdylib", "rlib"]
bench = false


[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --features=macro --no-deps --open
features = ["macro"]
rustdoc-args = ["--cfg", "doc_cfg"]

[dependencies]
wasm-bindgen = "0.2"
getrandom = { version = "0.2", features = ["js"] }
grass_compiler = { path = "../compiler", version = "=0.13.2", default-features = false }
include_sass = { path = "../include_sass", version = "0.13.2", optional = true }
clap = { version = "4.3.10", optional = true }
Expand Down

0 comments on commit 0dd26a1

Please sign in to comment.