Skip to content

Commit

Permalink
chore: put logging under leptos (#3)
Browse files Browse the repository at this point in the history
* put logging under leptos

* update release
add build to ci

* clean up ci

* install cargo bininstall
  • Loading branch information
sehz authored Jan 30, 2025
1 parent 61f1e7e commit 5a385a2
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 14 deletions.
58 changes: 57 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: main CI workflow for PR

permissions: read-all

concurrency:
group: ci-${{ github.ref }}
Expand Down Expand Up @@ -47,13 +46,70 @@ jobs:
run: make clippy


build-web:
name: Build web lib
runs-on: ubuntu-latest


steps:
- name: Checkout Source Code
uses: actions/checkout@v4


- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: install wasm target
run: rustup target add ${{ env.WASI_TARGET }}


- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
timeout-minutes: 10

- name: Build web
run: make -C crates/fluvio-web build


build-widget:
name: Build widget
runs-on: ubuntu-latest


steps:
- name: Checkout Source Code
uses: actions/checkout@v4


- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: install wasm target
run: rustup target add ${{ env.WASI_TARGET }}


- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
timeout-minutes: 10

- name: install trunk
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall trunk

- name: Build widget
run: make -C widgets/counter build



# To satisfy the merge queue check
done:
name: Done
needs:
- check
- build-web
- build-widget
runs-on: ubuntu-latest
if: always()
steps:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
WASM_TARGET = wasm32-unknown-unknown
RELEASE = v0.2.0
RELEASE = v0.2.1

fmt:
cargo fmt -- --check
Expand Down
14 changes: 3 additions & 11 deletions crates/fluvio-web/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
BASE_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../../)
include $(BASE_DIR)/common.mk

PROJ_NAME = fluvio-web
build:
cargo build -p $(PROJ_NAME) $(WASM_BUILD_SETTING)

TARGET=--target wasm32-unknown-unknown

# init directory to satify clippy
fake_dist:
mkdir -p release/dist

clean:
rm -rf release/dist
build:
cargo build -p $(PROJ_NAME) $(WASM_BUILD_SETTING) $(TARGET)
1 change: 1 addition & 0 deletions crates/fluvio-web/src/fluvio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl AppServices {

parsed_query.token
} else {
#[cfg(feature = "leptos")]
leptos::logging::log!("No query in fluvio conn string");
None
};
Expand Down
8 changes: 7 additions & 1 deletion widgets/counter/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
build:
trunk build --config release/Trunk.toml
trunk build --config dev/Trunk.toml

serve:
trunk serve --config dev/Trunk.toml


dist:
trunk build --config release/Trunk.toml




RELEASE_TAG = v0.1.0

Expand Down

0 comments on commit 5a385a2

Please sign in to comment.