Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: put logging under leptos #3

Merged
merged 4 commits into from
Jan 30, 2025
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
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